From f2ae3114a44e72096fe29ad5bacc5081b16f4025 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Fri, 2 Jun 2023 22:19:02 +0200 Subject: busybox: bump to 1.36.1 --- core/busybox/build | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'core/busybox/build') diff --git a/core/busybox/build b/core/busybox/build index 65b1def3..c4144f19 100755 --- a/core/busybox/build +++ b/core/busybox/build @@ -12,12 +12,29 @@ done # Build and install regular busybox. # This excludes utilities which require 'suid' to function. -make CC="${CC:-gcc}" +make CC="${CC:=gcc}" make CONFIG_PREFIX="$1/usr" install # Rename the binary temporarily. mv "$1/usr/bin/busybox" "$1/usr/bin/busybox-nosuid" +# Build and install recovery busybox. +# The only difference of this configuration is that it includes a recovery +# shell. +clsed '/SH_STANDALONE/cCONFIG_FEATURE_SH_STANDALONE=y' .config + +# Create an embedded script for recovery sh +mkdir embed + +# We are not trying to expand here. +# shellcheck disable=SC2016 +printf '[ "$SHLVL" -gt 20 ] && exit 1; exec -a ash "$0" "$@"\n' > embed/rcsh +chmod +x embed/rcsh + +make CC="$CC" +make CONFIG_PREFIX="$1/usr" install +mv "$1/usr/bin/busybox" "$1/usr/bin/rcsh" + # Build and install suid busybox. # This _only_ includes utlities which require 'suid' to function. cp -f .config-suid .config -- cgit v1.2.3