From 438d237775e261ef77c7f3c2e7d36a73eb13a2b5 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 15 Dec 2023 06:54:08 -0600 Subject: [PATCH] Add NOTOYBOX variable to optionally skip the toybox build. --- mkroot/mkroot.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mkroot/mkroot.sh b/mkroot/mkroot.sh index f65515fc..7d7135f5 100755 --- a/mkroot/mkroot.sh +++ b/mkroot/mkroot.sh @@ -156,14 +156,16 @@ for i in ${PKG:+plumbing $PKG}; do done # Build static toybox with existing .config if there is one, else defconfig+sh -announce toybox -[ -n "$PENDING" ] && rm -f .config -grep -q CONFIG_SH=y .config 2>/dev/null && CONF=silentoldconfig || unset CONF -for i in $PENDING sh route; do XX="$XX"$'\n'CONFIG_${i^^?}=y; done -[ -e "$ROOT"/lib/libc.so ] || export LDFLAGS=--static -PREFIX="$ROOT" make clean \ - ${CONF:-defconfig KCONFIG_ALLCONFIG=<(echo "$XX")} toybox install || exit 1 -unset LDFLAGS +if [ -z "$NOTOYBOX" ]; then + announce toybox + [ -n "$PENDING" ] && rm -f .config + grep -q CONFIG_SH=y .config 2>/dev/null && CONF=silentoldconfig || unset CONF + for i in $PENDING sh route; do XX="$XX"$'\n'CONFIG_${i^^?}=y; done + [ -e "$ROOT"/lib/libc.so ] || export LDFLAGS=--static + PREFIX="$ROOT" make clean \ + ${CONF:-defconfig KCONFIG_ALLCONFIG=<(echo "$XX")} toybox install || exit 1 + unset LDFLAGS +fi # ------------------ Part 3: Build + package bootable system ------------------ -- 2.39.2