changeset 93:153ba1a0b427

Break out the qemu build (and squashfs) into something easy to comment out, at least until qemu-0.9.0 ships. (If you skip the host-tools.sh build, it'll expect qemu to already be installed on the host system.)
author Rob Landley <rob@landley.net>
date Mon, 29 Jan 2007 11:50:49 -0500
parents f46f4cda9d81
children b0d786a99986
files build.sh cross-compiler.sh host-tools.sh
diffstat 3 files changed, 47 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Fri Jan 26 11:56:09 2007 -0500
+++ b/build.sh	Mon Jan 29 11:50:49 2007 -0500
@@ -1,5 +1,6 @@
 #!/bin/sh
 
 ./download.sh &&
+./host-tools.sh $1 &&
 ./cross-compiler.sh $1 &&
 ./mini-native.sh $1
--- a/cross-compiler.sh	Fri Jan 26 11:56:09 2007 -0500
+++ b/cross-compiler.sh	Mon Jan 29 11:50:49 2007 -0500
@@ -80,47 +80,6 @@
 
 [ $? -ne 0 ] && dienow
 
-# Skip this part if we're doing a short build.
-
-if [ -z "${BUILD_SHORT}" ]
-then
-
-# Build squashfs
-setupfor squashfs
-cd squashfs-tools &&
-make &&
-cp mksquashfs unsquashfs "${CROSS}/bin" &&
-cd .. &&
-$CLEANUP squashfs*
-
-[ $? -ne 0 ] && dienow
-
-# Build qemu
-
-[ -z "$QEMU_TEST" ] || QEMU_BUILD_TARGET="${QEMU_TEST}-user"
-
-setupfor qemu &&
-./configure --disable-gcc-check --disable-gfx-check \
-  --target-list="${KARCH}-softmmu $QEMU_BUILD_TARGET" --prefix="${CROSS}" &&
-make &&
-make install &&
-cd .. &&
-$CLEANUP qemu-*
-
-[ $? -ne 0 ] && dienow
-
-# A quick hello world program to test the cross-compiler out.
-# Build hello.c dynamic, then static, to verify header/library paths.
-
-"${ARCH}-gcc" -Os "${SOURCES}/toys/hello.c" -o "$WORK"/hello &&
-"${ARCH}-gcc" -Os -static "${SOURCES}/toys/hello.c" -o "$WORK"/hello &&
-([ -z "${QEMU_TEST}" ] || [ x"$(qemu-"${QEMU_TEST}" "${WORK}"/hello)" == x"Hello world!" ]) &&
-echo Cross-toolchain seems to work.
-
-[ $? -ne 0 ] && dienow
-
-fi
-
 cat > "${CROSS}"/README << EOF &&
 Cross compiler for $ARCH
 From http://landley.net/code/firmware
@@ -153,4 +112,14 @@
 
 [ $? -ne 0 ] && dienow
 
+# A quick hello world program to test the cross-compiler out.
+# Build hello.c dynamic, then static, to verify header/library paths.
+
+"${ARCH}-gcc" -Os "${SOURCES}/toys/hello.c" -o "$WORK"/hello &&
+"${ARCH}-gcc" -Os -static "${SOURCES}/toys/hello.c" -o "$WORK"/hello &&
+([ -z "${QEMU_TEST}" ] || [ x"$(qemu-"${QEMU_TEST}" "${WORK}"/hello)" == x"Hello world!" ]) &&
+echo Cross-toolchain seems to work.
+
+[ $? -ne 0 ] && dienow
+
 echo -e "\e[32mCross compiler toolchain build complete.\e[0m"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/host-tools.sh	Mon Jan 29 11:50:49 2007 -0500
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Get lots of predefined environment variables and shell functions.
+
+echo -e "\e[0m"
+echo "=== Building host tools"
+
+source include.sh
+
+mkdir -p "${CROSS}/bin" || dienow
+
+# Build squashfs
+setupfor squashfs
+cd squashfs-tools &&
+make &&
+cp mksquashfs unsquashfs "${CROSS}/bin" &&
+cd .. &&
+$CLEANUP squashfs*
+
+[ $? -ne 0 ] && dienow
+
+# Build qemu
+
+[ -z "$QEMU_TEST" ] || QEMU_BUILD_TARGET="${QEMU_TEST}-user"
+
+setupfor qemu &&
+./configure --disable-gcc-check --disable-gfx-check \
+  --target-list="${KARCH}-softmmu $QEMU_BUILD_TARGET" --prefix="${CROSS}" &&
+make &&
+make install &&
+cd .. &&
+$CLEANUP qemu-*
+
+[ $? -ne 0 ] && dienow
+
+echo -e "\e[32mHost tools build complete.\e[0m"