diff options
-rw-r--r-- | recipes-core/runx/runx/0001-runX-add-bounded-looping-timeout.patch | 35 | ||||
-rw-r--r-- | recipes-core/runx/runx_git.bb | 6 |
2 files changed, 38 insertions, 3 deletions
diff --git a/recipes-core/runx/runx/0001-runX-add-bounded-looping-timeout.patch b/recipes-core/runx/runx/0001-runX-add-bounded-looping-timeout.patch new file mode 100644 index 00000000..b4c6efaf --- /dev/null +++ b/recipes-core/runx/runx/0001-runX-add-bounded-looping-timeout.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 1cf4ff2137252c63687f54e09626850cfab6e9f9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rob Woolley <Rob.Woolley@windriver.com> | ||
3 | Date: Thu, 17 Sep 2020 19:41:06 -0700 | ||
4 | Subject: [PATCH] runX: add bounded / looping timeout | ||
5 | |||
6 | On slower machines, we may need a longer timeout before giving | ||
7 | up. | ||
8 | |||
9 | Signed-off-by: Rob Woolley <Rob.Woolley@windriver.com> | ||
10 | --- | ||
11 | git/runX | 8 +++++++- | ||
12 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/runX b/runX | ||
15 | index 492cb4c..70c95e1 100755 | ||
16 | --- a/runX | ||
17 | +++ b/runX | ||
18 | @@ -119,7 +119,13 @@ then | ||
19 | daemonize $workpath/serial_start \ | ||
20 | "$containerid" \ | ||
21 | "$crundir"/console_pty | ||
22 | - sleep .1 | ||
23 | + for n in 5 4 3 2 1; do | ||
24 | + if [ ! -l "$crundir"/console_pty ]; then | ||
25 | + break; | ||
26 | + else | ||
27 | + sleep .1; | ||
28 | + fi; | ||
29 | + done | ||
30 | daemonize $workpath/serial_fd_handler \ | ||
31 | "$guestconsole" \ | ||
32 | "$crundir"/console_pty | ||
33 | -- | ||
34 | 2.17.1 | ||
35 | |||
diff --git a/recipes-core/runx/runx_git.bb b/recipes-core/runx/runx_git.bb index bf84b2df..53c24641 100644 --- a/recipes-core/runx/runx_git.bb +++ b/recipes-core/runx/runx_git.bb | |||
@@ -12,6 +12,7 @@ SRC_URI = "\ | |||
12 | https://www.kernel.org/pub/linux/kernel/${KERNEL_URL_VER}/${KERNEL_SRC_VER}.tar.xz;destsuffix=git/kernel/build \ | 12 | https://www.kernel.org/pub/linux/kernel/${KERNEL_URL_VER}/${KERNEL_SRC_VER}.tar.xz;destsuffix=git/kernel/build \ |
13 | file://0001-make-kernel-cross-compilation-tweaks.patch \ | 13 | file://0001-make-kernel-cross-compilation-tweaks.patch \ |
14 | file://0001-make-initrd-cross-install-tweaks.patch \ | 14 | file://0001-make-initrd-cross-install-tweaks.patch \ |
15 | file://0001-runX-add-bounded-looping-timeout.patch \ | ||
15 | " | 16 | " |
16 | SRC_URI[md5sum] = "ce9b2d974d27408a61c53a30d3f98fb9" | 17 | SRC_URI[md5sum] = "ce9b2d974d27408a61c53a30d3f98fb9" |
17 | SRC_URI[sha256sum] = "bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491" | 18 | SRC_URI[sha256sum] = "bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491" |
@@ -31,7 +32,7 @@ inherit kernel-arch | |||
31 | 32 | ||
32 | # we have a busybox bbappend that makes /bin available to the | 33 | # we have a busybox bbappend that makes /bin available to the |
33 | # sysroot, and hence gets us the target binary that we need | 34 | # sysroot, and hence gets us the target binary that we need |
34 | DEPENDS = "busybox go-build" | 35 | DEPENDS = "busybox-initrd go-build" |
35 | 36 | ||
36 | # for the kernel build phase | 37 | # for the kernel build phase |
37 | DEPENDS += "openssl-native coreutils-native util-linux-native xz-native bc-native" | 38 | DEPENDS += "openssl-native coreutils-native util-linux-native xz-native bc-native" |
@@ -77,9 +78,8 @@ do_compile() { | |||
77 | 78 | ||
78 | # construct the initrd | 79 | # construct the initrd |
79 | echo "[INFO]: runx: constructing the initrd" | 80 | echo "[INFO]: runx: constructing the initrd" |
80 | |||
81 | cp ${STAGING_DIR_HOST}/bin/busybox.nosuid ${WORKDIR}/busybox | 81 | cp ${STAGING_DIR_HOST}/bin/busybox.nosuid ${WORKDIR}/busybox |
82 | export QEMU_USER=`which qemu-${HOST_ARCH}` | 82 | export QEMU_USER="`which qemu-${HOST_ARCH}` -L ${STAGING_BASELIBDIR}/.." |
83 | export BUSYBOX="${WORKDIR}/busybox" | 83 | export BUSYBOX="${WORKDIR}/busybox" |
84 | export CROSS_COMPILE="t" | 84 | export CROSS_COMPILE="t" |
85 | ${S}/initrd/make-initrd | 85 | ${S}/initrd/make-initrd |