From db8bdf06f45910cdcccc8fce0c9d95a1e0c25013 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sun, 20 Jun 2021 23:38:37 +0300 Subject: [PATCH] busybox: disable bzip2 bzip2 adds about 8kb of size. For tiny builds it's often disabled. It's not directly used by stock OpenWrt programs. Kernel images compressed with bzip2 are also not fully supported. Signed-off-by: Sergey Ponomarev [fix \ indention] Signed-off-by: Paul Spooren (cherry picked from commit bffee5ea192386ffeac81e7b40e9d58a93b85db8) --- package/base-files/files/lib/upgrade/common.sh | 1 - package/base-files/files/lib/upgrade/stage2 | 2 +- package/utils/busybox/Config-defaults.in | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index d3938b9996..33bb1f02e1 100755 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -82,7 +82,6 @@ get_image() { # [ ] local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')" case "$magic" in 1f8b) cmd="zcat";; - 425a) cmd="bzcat";; *) cmd="cat";; esac fi diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2 index e491dda94c..043599658f 100755 --- a/package/base-files/files/lib/upgrade/stage2 +++ b/package/base-files/files/lib/upgrade/stage2 @@ -47,7 +47,7 @@ switch_to_ramfs() { for binary in \ /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \ pivot_root mount_root reboot sync kill sleep \ - md5sum hexdump cat zcat bzcat dd tar \ + md5sum hexdump cat zcat dd tar \ ls basename find cp mv rm mkdir rmdir mknod touch chmod \ '[' printf wc grep awk sed cut \ mtd partx losetup mkfs.ext4 \ diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index b6e3d7f35a..91d1c418ef 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -351,10 +351,10 @@ config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS default n config BUSYBOX_DEFAULT_BUNZIP2 bool - default y + default n config BUSYBOX_DEFAULT_BZCAT bool - default y + default n config BUSYBOX_DEFAULT_UNLZMA bool default n