public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 1/3] scripts: Remove build_parallel
Date: Mon, 20 Aug 2018 08:20:42 +0200	[thread overview]
Message-ID: <c1fa93663995da5921ea6242e0c474ac8fa60dd9.1534746044.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1534746044.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1534746044.git.jan.kiszka@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

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 <jan.kiszka@siemens.com>
---
 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


  reply	other threads:[~2018-08-20  6:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20  6:20 [PATCH 0/3] Cleanups, gitlab-ci update Jan Kiszka
2018-08-20  6:20 ` Jan Kiszka [this message]
2018-08-20  6:20 ` [PATCH 2/3] doc: Remove references to wheezy Jan Kiszka
2018-08-20  6:20 ` [PATCH 3/3] gitlab-ci: Update targets, add cross-compilation test Jan Kiszka
2018-08-27 22:09 ` [PATCH 0/3] Cleanups, gitlab-ci update Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1fa93663995da5921ea6242e0c474ac8fa60dd9.1534746044.git.jan.kiszka@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox