Mercurial > hg > aboriginal
changeset 120:c91ceb05bc1c
Make host-tools not rebuild stuff that's already there, fix yet more corner
cases in which the ldd/readelf build breaks, and let CROSS_TARGET be set
manually by config files.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 04 Mar 2007 16:15:58 -0500 |
parents | 8575841a1f34 |
children | a787603f0d3d |
files | cross-compiler.sh host-tools.sh include.sh |
diffstat | 3 files changed, 26 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/cross-compiler.sh Sun Mar 04 16:12:49 2007 -0500 +++ b/cross-compiler.sh Sun Mar 04 16:15:58 2007 -0500 @@ -33,7 +33,7 @@ AR_FOR_TARGET="${ARCH}-ar" "${CURSRC}/configure" $GCC_FLAGS \ --prefix="${CROSS}" --host=${CROSS_HOST} --target=${CROSS_TARGET} \ --enable-languages=c --disable-threads --disable-multilib \ - --disable-nls --disable-shared $GCC_FLAGS --program-prefix="${ARCH}-" && + --disable-nls --disable-shared --program-prefix="${ARCH}-" && make all-gcc && make install-gcc && cd .. && @@ -79,7 +79,7 @@ # is to bypass the broken build entirely, and do it by hand. make distclean && make allnoconfig && -make headers KERNEL_HEADERS="${CROSS}/include" && +make CROSS= headers KERNEL_HEADERS=/usr/include && $CC -Os -s -I include utils/readelf.c -o readelf && $CC -Os -s -I ldso/include utils/ldd.c -o ldd && cd .. &&
--- a/host-tools.sh Sun Mar 04 16:12:49 2007 -0500 +++ b/host-tools.sh Sun Mar 04 16:15:58 2007 -0500 @@ -8,24 +8,29 @@ NO_ARCH=1 source include.sh -rm -rf "${HOSTTOOLS}" +#rm -rf "${HOSTTOOLS}" mkdir -p "${HOSTTOOLS}" || dienow # Build toybox +if [ ! -f "$(which toybox)" ] +then +echo which toybox + setupfor toybox && + make defconfig && + make && + make instlist && + make install_flat PREFIX="${HOSTTOOLS}" -setupfor toybox && -make defconfig && -make && -make instlist && -make install_flat PREFIX="${HOSTTOOLS}" - -[ $? -ne 0 ] && dienow + [ $? -ne 0 ] && dienow +fi # As a temporary measure, build User Mode Linux and use _that_ to package # the ext2 image to boot qemu with. -setupfor linux && -cat > mini.conf << EOF +if [ -z "$(which linux)" ] +then + setupfor linux && + cat > mini.conf << EOF CONFIG_MODE_SKAS=y CONFIG_BINFMT_ELF=y CONFIG_HOSTFS=y @@ -37,13 +42,14 @@ CONFIG_EXT2_FS=y CONFIG_PROC_FS=y EOF -make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.conf && -make ARCH=um && -cp linux "${HOSTTOOLS}" && -cd .. && -rm -rf linux-* + make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.conf && + make ARCH=um && + cp linux "${HOSTTOOLS}" && + cd .. && + rm -rf linux-* -[ $? -ne 0 ] && dienow + [ $? -ne 0 ] && dienow +fi # Build squashfs #setupfor squashfs
--- a/include.sh Sun Mar 04 16:12:49 2007 -0500 +++ b/include.sh Sun Mar 04 16:15:58 2007 -0500 @@ -195,7 +195,8 @@ # during mini-native.sh, and the host compiler links binaries against the # wrong libc.) export CROSS_HOST=`uname -m`-walrus-linux - export CROSS_TARGET=${ARCH}-unknown-linux + [ -z "$CROSS_TARGET" ] && CROSS_TARGET=${ARCH}-unknown-linux + export CROSS_TARGET # Read the relevant config file.