# HG changeset patch # User Rob Landley # Date 1225179262 18000 # Node ID 8029eb9a4a8c2c49921a163c6d19c91d18728ff3 # Parent 372ab2afa69246e634aada382dbf058d62c2aaac Split out BUILD_NOTOOLS from BUILD_SHORT. diff -r 372ab2afa692 -r 8029eb9a4a8c mini-native.sh --- a/mini-native.sh Tue Oct 28 02:33:53 2008 -0500 +++ b/mini-native.sh Tue Oct 28 02:34:22 2008 -0500 @@ -9,24 +9,24 @@ rm -rf "${NATIVE}" -if [ -z "${BUILD_SHORT}" ] +if [ -z "${BUILD_NOTOOLS}" ] then TOOLS="${NATIVE}/tools" + mkdir -p "${TOOLS}/bin" || dienow # Tell the wrapper script where to find the dynamic linker. export UCLIBC_DYNAMIC_LINKER=/tools/lib/ld-uClibc.so.0 export UCLIBC_RPATH=/tools/lib else - TOOLS="${NATIVE}/usr" && - mkdir -p "$TOOLS" && - mkdir "${NATIVE}"/{tmp,proc,sys,dev,etc} && - ln -s usr/bin "${NATIVE}/bin" && - ln -s usr/sbin "${NATIVE}/sbin" && - ln -s usr/lib "${NATIVE}/lib" || dienow + mkdir "${NATIVE}"/{tmp,proc,sys,dev,etc} || dienow + TOOLS="${NATIVE}/usr" + for i in bin sbin lib + do + mkdir -p "$TOOLS/$i" || dienow + ln -s "usr/$i" "${NATIVE}/$i" || dienow + done fi -mkdir -p "${TOOLS}/bin" || dienow - # Build and install Linux kernel. setupfor linux @@ -104,18 +104,23 @@ cp -r "${SOURCES}/native/." "${TOOLS}/" || dienow -if [ ! -z "${BUILD_SHORT}" ] +if [ ! -z "${BUILD_NOTOOLS}" ] then sed -i -e 's@/tools/@/usr/@g' -e 's@/bin/bash@/bin/ash@' \ "${TOOLS}/bin/qemu-setup.sh" || dienow +fi - # If you want to use tinycc, you need to keep the headers but don't need gcc. +# If you want to use tinycc, you need to keep the headers but don't need gcc. +if [ ! -z "$BUILD_SHORT" ] +then + if [ "$BUILD_SHORT" != "headers" ] then rm -rf "${TOOLS}"/include && rm -rf "${TOOLS}/src" || dienow fi + else # Build and install native binutils @@ -225,6 +230,8 @@ [ $? -ne 0 ] && dienow +# End of BUILD_SHORT + fi # Clean up and package the result