mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-05 05:15:25 +02:00
runx: robustness changes
Adding one build and one runtime robustness change: - build: specify the syroot native as a library path to qemu user. This allows us to run dynamic executables - runtime: add a patch to increase the serial fd timeout. We'll drop this once it is merged upstream. Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
d0ef2f0bf7
commit
d945c7a9ed
|
@ -0,0 +1,35 @@
|
||||||
|
From 1cf4ff2137252c63687f54e09626850cfab6e9f9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rob Woolley <Rob.Woolley@windriver.com>
|
||||||
|
Date: Thu, 17 Sep 2020 19:41:06 -0700
|
||||||
|
Subject: [PATCH] runX: add bounded / looping timeout
|
||||||
|
|
||||||
|
On slower machines, we may need a longer timeout before giving
|
||||||
|
up.
|
||||||
|
|
||||||
|
Signed-off-by: Rob Woolley <Rob.Woolley@windriver.com>
|
||||||
|
---
|
||||||
|
git/runX | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/runX b/runX
|
||||||
|
index 492cb4c..70c95e1 100755
|
||||||
|
--- a/runX
|
||||||
|
+++ b/runX
|
||||||
|
@@ -119,7 +119,13 @@ then
|
||||||
|
daemonize $workpath/serial_start \
|
||||||
|
"$containerid" \
|
||||||
|
"$crundir"/console_pty
|
||||||
|
- sleep .1
|
||||||
|
+ for n in 5 4 3 2 1; do
|
||||||
|
+ if [ ! -l "$crundir"/console_pty ]; then
|
||||||
|
+ break;
|
||||||
|
+ else
|
||||||
|
+ sleep .1;
|
||||||
|
+ fi;
|
||||||
|
+ done
|
||||||
|
daemonize $workpath/serial_fd_handler \
|
||||||
|
"$guestconsole" \
|
||||||
|
"$crundir"/console_pty
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
|
@ -12,6 +12,7 @@ SRC_URI = "\
|
||||||
https://www.kernel.org/pub/linux/kernel/${KERNEL_URL_VER}/${KERNEL_SRC_VER}.tar.xz;destsuffix=git/kernel/build \
|
https://www.kernel.org/pub/linux/kernel/${KERNEL_URL_VER}/${KERNEL_SRC_VER}.tar.xz;destsuffix=git/kernel/build \
|
||||||
file://0001-make-kernel-cross-compilation-tweaks.patch \
|
file://0001-make-kernel-cross-compilation-tweaks.patch \
|
||||||
file://0001-make-initrd-cross-install-tweaks.patch \
|
file://0001-make-initrd-cross-install-tweaks.patch \
|
||||||
|
file://0001-runX-add-bounded-looping-timeout.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[md5sum] = "ce9b2d974d27408a61c53a30d3f98fb9"
|
SRC_URI[md5sum] = "ce9b2d974d27408a61c53a30d3f98fb9"
|
||||||
SRC_URI[sha256sum] = "bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491"
|
SRC_URI[sha256sum] = "bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491"
|
||||||
|
@ -31,7 +32,7 @@ inherit kernel-arch
|
||||||
|
|
||||||
# we have a busybox bbappend that makes /bin available to the
|
# we have a busybox bbappend that makes /bin available to the
|
||||||
# sysroot, and hence gets us the target binary that we need
|
# sysroot, and hence gets us the target binary that we need
|
||||||
DEPENDS = "busybox go-build"
|
DEPENDS = "busybox-initrd go-build"
|
||||||
|
|
||||||
# for the kernel build phase
|
# for the kernel build phase
|
||||||
DEPENDS += "openssl-native coreutils-native util-linux-native xz-native bc-native"
|
DEPENDS += "openssl-native coreutils-native util-linux-native xz-native bc-native"
|
||||||
|
@ -77,9 +78,8 @@ do_compile() {
|
||||||
|
|
||||||
# construct the initrd
|
# construct the initrd
|
||||||
echo "[INFO]: runx: constructing the initrd"
|
echo "[INFO]: runx: constructing the initrd"
|
||||||
|
|
||||||
cp ${STAGING_DIR_HOST}/bin/busybox.nosuid ${WORKDIR}/busybox
|
cp ${STAGING_DIR_HOST}/bin/busybox.nosuid ${WORKDIR}/busybox
|
||||||
export QEMU_USER=`which qemu-${HOST_ARCH}`
|
export QEMU_USER="`which qemu-${HOST_ARCH}` -L ${STAGING_BASELIBDIR}/.."
|
||||||
export BUSYBOX="${WORKDIR}/busybox"
|
export BUSYBOX="${WORKDIR}/busybox"
|
||||||
export CROSS_COMPILE="t"
|
export CROSS_COMPILE="t"
|
||||||
${S}/initrd/make-initrd
|
${S}/initrd/make-initrd
|
||||||
|
|
Loading…
Reference in New Issue
Block a user