From 6959684d630600d50d36698cda7cfe523d04feeb Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 8 May 2026 00:18:12 +0000 Subject: [PATCH] fix: trim busybox to archive-focused config --- scripts/build_busybox.sh | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/scripts/build_busybox.sh b/scripts/build_busybox.sh index c807278..68bc424 100755 --- a/scripts/build_busybox.sh +++ b/scripts/build_busybox.sh @@ -7,22 +7,30 @@ PREFIX_NAME="busybox-${VERSION}-linux-amd64-musl-static" mkdir -p "$OUTPUT_DIR" -apk add --no-cache build-base bzip2 curl file linux-headers tar xz +apk add --no-cache \ + build-base \ + bzip2 \ + curl \ + file \ + linux-headers \ + tar \ + xz SRCDIR="${TMPDIR:-/tmp}/busybox-src-${VERSION}" rm -rf "$SRCDIR" mkdir -p "$SRCDIR" -curl -fsSL "https://busybox.net/downloads/busybox-${VERSION}.tar.bz2" | tar -xj -C "$SRCDIR" --strip-components=1 +curl -fsSL "https://busybox.net/downloads/busybox-${VERSION}.tar.bz2" \ + | tar -xj -C "$SRCDIR" --strip-components=1 cd "$SRCDIR" -make defconfig >/dev/null +make allnoconfig >/dev/null set_kconfig() { key="$1" value="$2" if grep -q "^${key}=" .config; then - sed -i "s#^${key}=.*#${key}=${value}#" .config + sed -i "s|^${key}=.*|${key}=${value}|" .config elif grep -q "^# ${key} is not set$" .config; then sed -i "s|^# ${key} is not set$|${key}=${value}|" .config else @@ -31,11 +39,27 @@ set_kconfig() { } set_kconfig CONFIG_STATIC y -set_kconfig CONFIG_FEATURE_SEAMLESS_XZ y +set_kconfig CONFIG_LONG_OPTS y +set_kconfig CONFIG_FEATURE_VERBOSE_USAGE y +set_kconfig CONFIG_FEATURE_COMPRESS_USAGE y +set_kconfig CONFIG_FEATURE_SEAMLESS_GZ y set_kconfig CONFIG_FEATURE_SEAMLESS_BZ2 y +set_kconfig CONFIG_FEATURE_SEAMLESS_XZ y +set_kconfig CONFIG_GUNZIP y +set_kconfig CONFIG_ZCAT y +set_kconfig CONFIG_BUNZIP2 y +set_kconfig CONFIG_BZCAT y +set_kconfig CONFIG_UNLZMA y +set_kconfig CONFIG_LZCAT y set_kconfig CONFIG_UNXZ y set_kconfig CONFIG_XZ y -set_kconfig CONFIG_BZIP2 y +set_kconfig CONFIG_XZCAT y +set_kconfig CONFIG_GZIP y +set_kconfig CONFIG_TAR y +set_kconfig CONFIG_FEATURE_TAR_CREATE y +set_kconfig CONFIG_FEATURE_TAR_FROM y +set_kconfig CONFIG_FEATURE_TAR_GNU_EXTENSIONS y +set_kconfig CONFIG_FEATURE_TAR_AUTODETECT y set_kconfig CONFIG_UNZIP y yes '' | make oldconfig >/dev/null