Mercurial > hg > aboriginal
changeset 423:8029eb9a4a8c
Split out BUILD_NOTOOLS from BUILD_SHORT.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 28 Oct 2008 02:34:22 -0500 |
parents | 372ab2afa692 |
children | e39509d8d925 |
files | mini-native.sh |
diffstat | 1 files changed, 18 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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