From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6591684077090242560 X-Received: by 2002:a19:1295:: with SMTP id 21-v6mr304063lfs.34.1534746046612; Sun, 19 Aug 2018 23:20:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9d4:: with SMTP id 203-v6ls1380705ljj.5.gmail; Sun, 19 Aug 2018 23:20:46 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyXJWMLbX+MCvgcDglB/uC6wYcywhjwtOf4TBkur9FiBHUvsl4hZ449GE+UzxRMX0udFXmZ X-Received: by 2002:a2e:93cf:: with SMTP id p15-v6mr1957954ljh.39.1534746046014; Sun, 19 Aug 2018 23:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534746045; cv=none; d=google.com; s=arc-20160816; b=OPfJLLqiqYLwMJ0vD44gEcWfJ8bfTo6QWnxXTfcKISWQ1fUuS8WPJs5xv9MzOE/6Yh 7/9suRw97veAOquGMIW335L9FcZkLwJF8DtbQW3shN1mudNVG6D2Pv1uz0nSzaC12DEW hxvplrueg4umaQhf/7QXAIFknJBw1BxxVjT8wcwKmIs6SRrMsBszGqce/UnCjuaJ62pl 7RyQIf9KvhIZiCKWtuIGXtPmeB6TQ//cAztNmidao3sG5q1PfKly62xypcH6AJpcz1Ia CacN89NIyrCjDmNlOWaDMPgA4GI2TXA9EjanpMmvKnFD/BMVob7/AzfztNjYv9dbElOo YBpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:references:in-reply-to:message-id:date :subject:to:from:arc-authentication-results; bh=lWoNyfLuuIvyODNjHjIh1o9ORWIgbI1gpmyxykSmksY=; b=j4HkiNkwmax+yPTk7n7MPdQnEO8/okE9PpdfcGPB9V+1nN1gYPlZZJoCcmRiqdLy1e MxskPDjMnwUztQ5L56srgbM4QQ7T4AKWd33rjISRDcX/hqGsl1kFl6bMjp7WqOwjXX4k lV2JPGBOALYPIVYKtybh1uZaJbIgBc0cAsvC3Sv0cm3mtF3+udHMf37bdziiDt4MRPtH PWMOTAzGujkyq31N9uPIFUvKyNH+KbFjBzwxif868DcawqpvpQKmlJA/HMg30uKLzK4Y hCtgrhjsBdUVvv8Y925pH9VXEVW1sbuT3OkNUpSFG90V5kNKZhv0KOzpdxvXrS9zu5iG 08Wg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id a7-v6si254502ljj.1.2018.08.19.23.20.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Aug 2018 23:20:45 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id w7K6KjvM002466 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 20 Aug 2018 08:20:45 +0200 Received: from md1f2u6c.ad001.siemens.net ([139.22.37.21]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w7K6KiHL019637 for ; Mon, 20 Aug 2018 08:20:44 +0200 From: Jan Kiszka To: isar-users Subject: [PATCH 1/3] scripts: Remove build_parallel Date: Mon, 20 Aug 2018 08:20:42 +0200 Message-Id: X-Mailer: git-send-email 2.16.4 In-Reply-To: References: In-Reply-To: References: X-TUID: UJs5WGkCTI+S From: Jan Kiszka We are happily building multiple images in parallel by now, without any indication that things are needlessly serialized. This likely dates back to the situation, possibly both in bitbake and Isar, at the time the script was merged. Signed-off-by: Jan Kiszka --- doc/user_manual.md | 29 ---------------- scripts/build_parallel | 89 -------------------------------------------------- 2 files changed, 118 deletions(-) delete mode 100755 scripts/build_parallel diff --git a/doc/user_manual.md b/doc/user_manual.md index 427f83d..c8f8ad9 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -62,7 +62,6 @@ python3 python3-distutils # in case your host is host > debian 9 qemu qemu-user-static -rxvt-unicode # build_parallel binfmt-support sudo reprepro @@ -175,34 +174,6 @@ tmp/deploy/images/isar-image-base-debian-stretch-qemuamd64.ext4.img tmp/deploy/images/isar-image-base.rpi-sdimg ``` -The BitBake revision included with Isar seems to serialize multiconfig builds. -The following script may be used from the project directory (`isar`) to build -multiple configurations in different build directories faster: - -``` -scripts/build_parallel ../build multiconfig:qemuarm-wheezy:isar-image-base \ - multiconfig:qemuarm-jessie:isar-image-base \ - multiconfig:qemuarm-stretch:isar-image-base \ - multiconfig:qemui386-jessie:isar-image-base \ - multiconfig:qemui386-stretch:isar-image-base \ - multiconfig:qemuamd64-jessie:isar-image-base \ - multiconfig:qemuamd64-stretch:isar-image-base \ - multiconfig:rpi-jessie:isar-image-base -``` - -Created images are: - -``` -../build-1/tmp/deploy/images/isar-image-base-debian-wheezy-qemuarm.ext4.img -../build-2/tmp/deploy/images/isar-image-base-debian-jessie-qemuarm.ext4.img -../build-3/tmp/deploy/images/isar-image-base-debian-stretch-qemuarm.ext4.img -../build-4/tmp/deploy/images/isar-image-base-debian-jessie-qemui386.ext4.img -../build-5/tmp/deploy/images/isar-image-base-debian-stretch-qemui386.wic.img -../build-6/tmp/deploy/images/isar-image-base-debian-jessie-qemuamd64.ext4.img -../build-7/tmp/deploy/images/isar-image-base-debian-stretch-qemuamd64.wic.img -../build-8/tmp/deploy/images/isar-image-base.rpi-sdimg -``` - ### Generate full disk image A bootable disk image is generated if you set IMAGE_TYPE to 'wic-img'. Behind the scenes a tool called `wic` is used to assemble the images. It is controlled by a `.wks` file which you can choose with changing WKS_FILE. Some examples in the tree use that feature already. diff --git a/scripts/build_parallel b/scripts/build_parallel deleted file mode 100755 index 20c8401..0000000 --- a/scripts/build_parallel +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -# -# Build several multiconfig targets in parallel -# -# Bitbake seems to serialize multiconfig builds. -# -# Example usage: -# scripts/build_parallel ../build multiconfig:qemuarm-wheezy:isar-image-base multiconfig:qemuarm-jessie:isar-image-base multiconfig:rpi-jessie:isar-image-base -# -# This software is a part of Isar. -# Copyright (C) 2017 ilbers GmbH -# -# Test: -# - As is -# - With opt_exit=1 -# - With opt_debug=11 - -ES_OK=0 -ES_SYNTAX=1 -ES_RUNTIME=2 -ES_NOTREACHED=255 - -dbg() { - local cat=$1 - local lvl=$2 - shift 2 - if [ "$lvl" -lt $opt_debug ]; then - echo $* >&2 - fi -} - -if [ $# -lt 2 ]; then - echo "$0: ERROR: Too few arguments" >&2 - echo "Usage: $0 BUILD_DIR_TEMPLATE TARGET..." >&2 - exit $ES_SYNTAX -fi - -bdirt=$1 -shift -targets="$*" - -opt_exit=0 -opt_debug=0 - -XTERM=urxvt - -n=`echo $targets |wc -w` -ret=$ES_OK -i=1 - -time ( - for t in $targets; do - # urxvt seems to always return zero, use files to return exit status. - # Provide a value if subprocess fails to write one. - echo $ES_NOTREACHED >${bdirt}-$i-ret - # Exit on success, remain in $XTERM on failure to ease debugging - $XTERM -e bash --init-file <(echo " \ - echo -n \`pwd\`'$ '; \ - tput bold; \ - echo . isar-init-build-env ${bdirt}-$i; \ - tput sgr0; \ - . isar-init-build-env ${bdirt}-$i; \ - echo -n \`pwd\`'$ '; \ - tput bold; \ - echo time bitbake $t; \ - tput sgr0; \ - time bitbake $t; \ - r=\$?; \ - echo \$r >${bdirt}-$i-ret; \ - if [ $opt_exit != 0 -a \$r = $ES_OK ]; then \ - exit $ES_OK; \ - fi") & - pid[$i]=$! - dbg CHLD 10 pid ${pid[$i]} dir ${bdirt}-$i target $t - i=$((i+1)) - done - for i in `seq 1 $n`; do - wait ${pid[$i]} - r=`cat ${bdirt}-$i-ret` - # Don't use -ne to prevent [ errors if $r contains non-numeric garbage - if [ "$r" != $ES_OK ]; then - t=`echo $targets |awk '{ print $'$i' }'` - echo "ERROR: Target $t failed in ${bdirt}-$i with $r" >&2 - rm -f ${bdirt}-$i-ret - ret=$ES_RUNTIME - fi - done) - -exit $ret -- 2.16.4