From 06fb764381d4b9d1feb5d5e272ddb23a5cd7fcfe Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 12 Aug 2019 15:18:43 +0000 Subject: [PATCH] busybox: Compile a second static binary for rescue/initramfs purposes. --- core/busybox/build | 12 ++++++++++++ core/busybox/version | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/busybox/build b/core/busybox/build index 3021f678..0fb1cebe 100755 --- a/core/busybox/build +++ b/core/busybox/build @@ -22,3 +22,15 @@ ln -s /run/runit/supervise.syslogd "$1/etc/sv/syslogd/supervise" # Install busybox config. install -Dm644 busybox.conf "$1/etc/busybox.conf" + +# Build and install a statically compiled busybox. +# This is useful for instances where the system is broken +# and for making an initramfs. +# +# The sleep is required so that 'make' doesn't skip the +# changes due to its 'mtime' checks. +make defconfig +sleep 1 +sed -i'' "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config +make +install -Dm755 busybox "$1/usr/lib/busybox" diff --git a/core/busybox/version b/core/busybox/version index 93cf12a2..36fffa32 100644 --- a/core/busybox/version +++ b/core/busybox/version @@ -1 +1 @@ -1.30.1 17 +1.30.1 18