From 12efcf3285a75d197704d2eef23824b3e4f11e66 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 5 Oct 2015 09:04:04 +0200 Subject: Add qemu_multiarch_testing/ Signed-off-by: Denys Vlasenko --- qemu_multiarch_testing/hdc.dir/build | 45 ++++++++++++++++++++++++++++++++++++ qemu_multiarch_testing/hdc.dir/init | 9 ++++++++ 2 files changed, 54 insertions(+) create mode 100755 qemu_multiarch_testing/hdc.dir/build create mode 100755 qemu_multiarch_testing/hdc.dir/init (limited to 'qemu_multiarch_testing/hdc.dir') diff --git a/qemu_multiarch_testing/hdc.dir/build b/qemu_multiarch_testing/hdc.dir/build new file mode 100755 index 000000000..8a65a5582 --- /dev/null +++ b/qemu_multiarch_testing/hdc.dir/build @@ -0,0 +1,45 @@ +#!/bin/sh + +umount /mnt # optional + +test -x "bin/busybox-$HOST" && { + echo "Found bin/busybox-$HOST, using it" + cp -a "bin/busybox-$HOST" bin/busybox + bin/busybox --install -s bin/ + # Supply missing stuff (e.g. bzip2): + PATH="$PATH:$PWD/bin" + # Override known-buggy host binaries: + cp -af bin/od `which od` +} + +( + #set -e -x + cd busybox + make defconfig + # Want static build + sed 's/^.*CONFIG_STATIC.*$/CONFIG_STATIC=y/' -i .config + # Drats, newer Aboriginal Linux has no bzip2 + bzip2 /dev/null || { + sed 's/^.*CONFIG_FEATURE_COMPRESS_USAGE.*$/# CONFIG_FEATURE_COMPRESS_USAGE is not set/' -i .config + } + # These won't build because of toolchain/libc breakage: + sed 's/^.*CONFIG_FEATURE_SYNC_FANCY.*$/# CONFIG_FEATURE_SYNC_FANCY is not set/' -i .config # no syncfs() + sed 's/^.*CONFIG_FEATURE_WTMP.*$/# CONFIG_FEATURE_WTMP is not set/' -i .config + sed 's/^.*CONFIG_FEATURE_UTMP.*$/# CONFIG_FEATURE_UTMP is not set/' -i .config + sed 's/^.*CONFIG_FEATURE_INETD_RPC.*$/# CONFIG_FEATURE_INETD_RPC is not set/' -i .config + sed 's/^.*CONFIG_BRCTL.*$/# CONFIG_BRCTL is not set/' -i .config + sed 's/^.*CONFIG_IFPLUGD.*$/# CONFIG_IFPLUGD is not set/' -i .config + make #V=1 || sh + size busybox + ./busybox || echo "Exit code: $?" + if uuencode TEST /dev/null && bzip2 /dev/null; then + bzip2 &1 | tee build.log +mount -o remount,ro /home +sync +sleep 1 diff --git a/qemu_multiarch_testing/hdc.dir/init b/qemu_multiarch_testing/hdc.dir/init new file mode 100755 index 000000000..692371db6 --- /dev/null +++ b/qemu_multiarch_testing/hdc.dir/init @@ -0,0 +1,9 @@ +#!/bin/sh + +# Emit a msg to let user know this place was reached +echo "Copying to /home" +# Had a case where cp SEGVs, let's have diagnostics for it +cp -a /mnt /home || { echo "cp: $?"; exit 1; } +cd /home/mnt || { echo "cd: $?"; exit 1; } +exec ./build +echo "Failed to exec ./build" -- cgit v1.2.3