diff options
Diffstat (limited to 'qemu_multiarch_testing/hdc.dir/build')
-rwxr-xr-x | qemu_multiarch_testing/hdc.dir/build | 45 |
1 files changed, 45 insertions, 0 deletions
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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | umount /mnt # optional | ||
4 | |||
5 | test -x "bin/busybox-$HOST" && { | ||
6 | echo "Found bin/busybox-$HOST, using it" | ||
7 | cp -a "bin/busybox-$HOST" bin/busybox | ||
8 | bin/busybox --install -s bin/ | ||
9 | # Supply missing stuff (e.g. bzip2): | ||
10 | PATH="$PATH:$PWD/bin" | ||
11 | # Override known-buggy host binaries: | ||
12 | cp -af bin/od `which od` | ||
13 | } | ||
14 | |||
15 | ( | ||
16 | #set -e -x | ||
17 | cd busybox | ||
18 | make defconfig | ||
19 | # Want static build | ||
20 | sed 's/^.*CONFIG_STATIC.*$/CONFIG_STATIC=y/' -i .config | ||
21 | # Drats, newer Aboriginal Linux has no bzip2 | ||
22 | bzip2 </dev/null >/dev/null || { | ||
23 | sed 's/^.*CONFIG_FEATURE_COMPRESS_USAGE.*$/# CONFIG_FEATURE_COMPRESS_USAGE is not set/' -i .config | ||
24 | } | ||
25 | # These won't build because of toolchain/libc breakage: | ||
26 | sed 's/^.*CONFIG_FEATURE_SYNC_FANCY.*$/# CONFIG_FEATURE_SYNC_FANCY is not set/' -i .config # no syncfs() | ||
27 | sed 's/^.*CONFIG_FEATURE_WTMP.*$/# CONFIG_FEATURE_WTMP is not set/' -i .config | ||
28 | sed 's/^.*CONFIG_FEATURE_UTMP.*$/# CONFIG_FEATURE_UTMP is not set/' -i .config | ||
29 | sed 's/^.*CONFIG_FEATURE_INETD_RPC.*$/# CONFIG_FEATURE_INETD_RPC is not set/' -i .config | ||
30 | sed 's/^.*CONFIG_BRCTL.*$/# CONFIG_BRCTL is not set/' -i .config | ||
31 | sed 's/^.*CONFIG_IFPLUGD.*$/# CONFIG_IFPLUGD is not set/' -i .config | ||
32 | make #V=1 || sh | ||
33 | size busybox | ||
34 | ./busybox || echo "Exit code: $?" | ||
35 | if uuencode TEST </dev/null >/dev/null && bzip2 </dev/null >/dev/null; then | ||
36 | bzip2 <busybox | uuencode busybox.bz2 | ||
37 | else | ||
38 | od -tx1 <busybox | ||
39 | fi | ||
40 | #test "x$FTP_PORT" = x || | ||
41 | # ftpput -P "$FTP_PORT" "$FTP_SERVER" strace | ||
42 | ) 2>&1 | tee build.log | ||
43 | mount -o remount,ro /home | ||
44 | sync | ||
45 | sleep 1 | ||