# HG changeset patch # User Rob Landley # Date 1448145879 21600 # Node ID fb05f99ffccecc7533e3bcfbbcd2a36d475598a7 # Parent 191dfad915ba754f08d46e6894375264529d67e5 Collate site-local variables under "MY_XXX" prefix: MY_PATCH_DIR, MY_ROOT_OVERLAY, MY_CROSS_PATH and MY_CROSS_PREFIX. diff -r 191dfad915ba -r fb05f99ffcce build.sh --- a/build.sh Wed Nov 18 09:18:44 2015 -0600 +++ b/build.sh Sat Nov 21 16:44:39 2015 -0600 @@ -112,7 +112,7 @@ # Do we need to build the simple cross compiler? -if [ -z "$CROSS_COMPILER_PATH" ] && not_already simple-cross-compiler +if [ -z "$MY_CROSS_PATH" ] && not_already simple-cross-compiler then # If we need to build cross compiler, assume root filesystem is stale. @@ -125,7 +125,7 @@ # canadian cross. (It's more powerful than we need here, but if you're going # to use the cross compiler in other contexts this is probably what you want.) -if [ -z "$CROSS_COMPILER_PATH" ] && [ ! -z "$CROSS_COMPILER_HOST" ] && +if [ -z "$MY_CROSS_PATH" ] && [ ! -z "$CROSS_COMPILER_HOST" ] && not_already cross-compiler then zap root-filesystem native-compiler system-image @@ -160,7 +160,7 @@ # Not trying to build nommu native compilers for the moment. -if [ -z "$CROSS_COMPILER_PATH" ] && ! grep -q ELF2FLT sources/targets/"$ARCH" && +if [ -z "$MY_CROSS_PATH" ] && ! grep -q ELF2FLT sources/targets/"$ARCH" && not_already native-compiler then zap system-image diff -r 191dfad915ba -r fb05f99ffcce config --- a/config Wed Nov 18 09:18:44 2015 -0600 +++ b/config Sat Nov 21 16:44:39 2015 -0600 @@ -123,12 +123,6 @@ # export ALLOW_PATCH_FAILURE=1 -# If this is set, it's points to a directory containing additional files to -# copy into the root-filesystem. The path is either absolute or -# relative to the aboriginal topdir. - -# export ROOT_OVERLAY="overlay" - # Build more things in parallel. # export FORK=1 @@ -148,18 +142,28 @@ # export CFLAGS="-g -pipe" -# If you don't want to build cross compilers, supply path to existing one. - -# export CROSS_COMPILER_PATH=/path/to/cross-compiler/bin -# export CC_PREFIX=thingy- +# The following paths supplement the build with additional site-specific data. +# Each path is either absolute or relative to the aboriginal topdir. # If you have patches you want patch files outside the aboriginal # patch directory to be applied, supply the path here. Paths to the -# patches are built using the pattern -# ${EXTERNAL_PATCH_DIR}/${PACKAGE}/*.patch -# So one or more patches to apply to linux could be in the +# patches are built using the pattern ${MY_PATCH_DIR}/${PACKAGE}/*.patch +# so one or more patches to apply to linux could be in the # ${EXTERNAL_PATCH_DIR}/linux directory and will be applied in sorted -# order. The path is either absolute or relative to the aboriginal -# topdir. +# order (after the builtin sources/patches/${PACKAGE}-*.patch files). + +# export MY_PATCH_DIR=/path/to/external/patches + +# If this is set, it's points to a directory containing additional files to +# copy into the root-filesystem. (This overwrites existing conflicting files.) + +# export MY_ROOT_OVERLAY="overlay" -# export EXTERNAL_PATCH_DIR=/path/to/external/patches \ No newline at end of file +# If you don't want to build cross compilers, supply path to existing one. +# Setting these tells build.sh not to build host or native compilers +# (the native compiler is very sensitive to libgcc build version skew). + +# export MY_CROSS_PATH=/path/to/cross-compiler/bin +# export MY_CROSS_PREFIX=thingy- + + diff -r 191dfad915ba -r fb05f99ffcce root-filesystem.sh --- a/root-filesystem.sh Wed Nov 18 09:18:44 2015 -0600 +++ b/root-filesystem.sh Sat Nov 21 16:44:39 2015 -0600 @@ -39,10 +39,10 @@ # If user specified different files to put in the root filesystem, add them. # (This overwrites existing files.) -if [ ! -z "$ROOT_OVERLAY" ] +if [ ! -z "$MY_ROOT_OVERLAY" ] then cd "$TOP" - tar -c -C "$ROOT_OVERLAY" . | tar -x -C "$STAGE_DIR" || dienow + tar -c -C "$MY_ROOT_OVERLAY" . | tar -x -C "$STAGE_DIR" || dienow fi # Build toybox diff -r 191dfad915ba -r fb05f99ffcce sources/download_functions.sh --- a/sources/download_functions.sh Wed Nov 18 09:18:44 2015 -0600 +++ b/sources/download_functions.sh Sat Nov 21 16:44:39 2015 -0600 @@ -61,9 +61,9 @@ done # gather external package patches sorted by filename - if [ ! -z "$EXTERNAL_PATCH_DIR" ] && [ -d "${EXTERNAL_PATCH_DIR}/${PACKAGE}" ] + if [ ! -z "$MY_PATCH_DIR" ] && [ -d "${MY_PATCH_DIR}/${PACKAGE}" ] then - for i in "${EXTERNAL_PATCH_DIR}/${PACKAGE}/"*.patch + for i in "${MY_PATCH_DIR}/${PACKAGE}/"*.patch do if [ -f "$i" ] then diff -r 191dfad915ba -r fb05f99ffcce sources/functions.sh --- a/sources/functions.sh Wed Nov 18 09:18:44 2015 -0600 +++ b/sources/functions.sh Sat Nov 21 16:44:39 2015 -0600 @@ -8,12 +8,13 @@ { local i - if [ ! -z "$CROSS_COMPILER_PATH" ] + if [ ! -z "$MY_CROSS_PATH" ] then + CC_PREFIX="$MY_CC_PREFIX" [ -z "$CC_PREFIX" ] && - echo "CROSS_COMPILER_PATH without CC_PREFIX" >&2 && + echo "MY_CROSS_PATH without MY_CC_PREFIX" >&2 && dienow - echo -n "$CROSS_COMPILER_PATH:" + echo -n "$MY_CROSS_PATH:" return fi diff -r 191dfad915ba -r fb05f99ffcce sources/variables.sh --- a/sources/variables.sh Wed Nov 18 09:18:44 2015 -0600 +++ b/sources/variables.sh Sat Nov 21 16:44:39 2015 -0600 @@ -53,10 +53,7 @@ export_if_blank HOSTTOOLS="$BUILD/host" export_if_blank WRAPDIR="$BUILD/record-commands" -if [ ! -z "$EXTERNAL_PATCH_DIR" ] -then - export EXTERNAL_PATCH_DIR=$(readlink -e "$EXTERNAL_PATCH_DIR") -fi +[ ! -z "$MY_PATCH_DIR" ] && export MY_PATCH_DIR="$(readlink -e "$MY_PATCH_DIR")" # Set a default non-arch