Mercurial > hg > aboriginal
changeset 80:92dd34025932
Teach the cross compiler to only build the qemu targets currently needed,
and disable qemu's graphics support so the host system doesn't need SDL.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 03 Jan 2007 13:16:57 -0500 |
parents | 2af7a4f5b44e |
children | 6dd38c925bc4 |
files | cross-compiler.sh sources/configs/armv4l sources/configs/i686 sources/configs/x86_64 |
diffstat | 4 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/cross-compiler.sh Mon Jan 01 01:00:47 2007 -0500 +++ b/cross-compiler.sh Wed Jan 03 13:16:57 2007 -0500 @@ -93,14 +93,22 @@ cd .. && $CLEANUP squashfs* +[ $? -ne 0 ] && dienow + # Build qemu + +[ -z "$QEMU_TEST" ] || QEMU_BUILD_TARGET="${KARCH}-user" + setupfor qemu && -./configure --disable-gcc-check --prefix="${CROSS}" && +./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. cat > "$WORK"/hello.c << 'EOF' && @@ -117,7 +125,7 @@ "${ARCH}-gcc" -Os "$WORK"/hello.c -o "$WORK"/hello && "${ARCH}-gcc" -Os -static "$WORK"/hello.c -o "$WORK"/hello && -([ ! -z "${SKIP_QEMU_TEST}" ] || [ x"$(qemu-"${KARCH}" "${WORK}"/hello)" == x"Hello world!" ]) && +([ -z "${QEMU_TEST}" ] || [ x"$(qemu-"${KARCH}" "${WORK}"/hello)" == x"Hello world!" ]) && echo Cross-toolchain seems to work. [ $? -ne 0 ] && dienow
--- a/sources/configs/armv4l Mon Jan 01 01:00:47 2007 -0500 +++ b/sources/configs/armv4l Wed Jan 03 13:16:57 2007 -0500 @@ -1,6 +1,8 @@ KARCH=arm KERNEL_PATH=arch/${KARCH}/boot/zImage -# GCC_FLAGS="--with-float=soft" +GCC_FLAGS= #"--with-float=soft" +BINUTILS_FLAGS= +QEMU_TEST=$KARCH # Write out uClibc .config file.
--- a/sources/configs/i686 Mon Jan 01 01:00:47 2007 -0500 +++ b/sources/configs/i686 Wed Jan 03 13:16:57 2007 -0500 @@ -2,6 +2,7 @@ KERNEL_PATH=arch/${KARCH}/boot/bzImage BINUTILS_FLAGS= GCC_FLAGS= +QEMU_TEST=$KARCH # Write out uClibc .config file.
--- a/sources/configs/x86_64 Mon Jan 01 01:00:47 2007 -0500 +++ b/sources/configs/x86_64 Wed Jan 03 13:16:57 2007 -0500 @@ -1,9 +1,8 @@ KARCH=x86_64 -KERNEL_PATH=arch/${KARCH}/boot/zImage +KERNEL_PATH=arch/${KARCH}/boot/bzImage #GCC_FLAGS="-m64" BINUTILS_FLAGS="--enable-64-bit-bfd" -KERNEL_PATH=arch/${KARCH}/boot/bzImage -SKIP_QEMU_TEST=1 +QEMU_TEST= # Write out uClibc .config file.