busybox: disable bzip2
authorSergey Ponomarev <stokito@gmail.com>
Sun, 20 Jun 2021 20:38:37 +0000 (23:38 +0300)
committerPaul Spooren <mail@aparcar.org>
Mon, 21 Jun 2021 00:17:49 +0000 (14:17 -1000)
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 <stokito@gmail.com>
[fix \ indention]
Signed-off-by: Paul Spooren <mail@aparcar.org>
package/base-files/files/lib/upgrade/common.sh
package/base-files/files/lib/upgrade/stage2
package/utils/busybox/Config-defaults.in

index b0a482821dc4c84a881e5fa6c7bc2a3c982ccc85..b59a40456551c80948110046f60de72131d7ccf1 100644 (file)
@@ -96,7 +96,6 @@ get_image() { # <source> [ <command> ]
                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
index b00d0c079ab6d73bd29af404780e673c8793a3be..cb42c956c573f8f03482d971d925bfe9eb083206 100755 (executable)
@@ -39,7 +39,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 nandwrite flash_erase       \
index f9028620a18d7197b9f8aab17c067e4cdcc18827..d078a3995417b96a3136bcea621f4f50e3e600ba 100644 (file)
@@ -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