diff mbox series

busybox: store applet usage messages uncompressed

Message ID 20200707131646.18683-1-rsalvaterra@gmail.com
State Accepted
Delegated to: Petr Štetiar
Headers show
Series busybox: store applet usage messages uncompressed | expand

Commit Message

Rui Salvaterra July 7, 2020, 1:16 p.m. UTC
The rootfs squashfs is already highly (XZ) compressed. Storing the applet
messages in compressed form will increase the entropy and reduce the overall
image compression ratio.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
 package/utils/busybox/Config-defaults.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Petr Štetiar July 9, 2020, 3:46 p.m. UTC | #1
Rui Salvaterra <rsalvaterra@gmail.com> [2020-07-07 14:16:47]:

> The rootfs squashfs is already highly (XZ) compressed. Storing the applet
> messages in compressed form will increase the entropy and reduce the overall
> image compression ratio.

Numbers please! :)

-- ynezz
Rui Salvaterra July 9, 2020, 5:09 p.m. UTC | #2
Hi, Petr!

On Thu, 9 Jul 2020 at 16:46, Petr Štetiar <ynezz@true.cz> wrote:
>
> Numbers please! :)

Here you go (compressed vs uncompressed):

busybox (the executable): 364596 vs 384804 bytes.

OpenWrt target images (the kernel image is unchanged, obviously):

omnia-medkit-openwrt-mvebu-cortexa9-cznic_turris-omnia-initramfs.tar.gz:
9163597 vs 9162531 bytes (1066 bytes difference).
openwrt-mvebu-cortexa9-cznic_turris-omnia-initramfs-kernel.bin:
9161688 vs 9160600 bytes (1088 bytes difference).
openwrt-mvebu-cortexa9-cznic_turris-omnia-sysupgrade.img.gz: 9729550
vs 9729230 bytes (320 bytes difference).

All in all, we save just a little bit over 1 kiB. As an added bonus,
we also don't have to decompress the messages twice, (first from
squashfs, then from the bzip2 message storage).

Thanks,
Rui
diff mbox series

Patch

diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
index 91c9b9b5b9..b45cf981ea 100644
--- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in
@@ -24,7 +24,7 @@  config BUSYBOX_DEFAULT_FEATURE_VERBOSE_USAGE
 	default y
 config BUSYBOX_DEFAULT_FEATURE_COMPRESS_USAGE
 	bool
-	default y
+	default n
 config BUSYBOX_DEFAULT_LFS
 	bool
 	default y