From fc92c7275b9ece6d1d27c50e4d1688b9b8444300 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 26 May 2020 19:57:42 +0200 Subject: [PATCH] generic: reduce squashfs block size to 256KiB In OpenWrt 19.07, the block size was increased to 1024KiB for "tiny" devices by default to save flash. Unfortunately, this also significantly increases the cache memory required by squashfs. In my test, the increased block size reduced the image size by ~64KiB, but increased the RAM usage by ~2.6MiB. As most tiny devices have only 32MiB of RAM, this is not a reasonable tradeoff. The ar71xx-generic target already defines an even lower block size of 64KiB. --- targets/generic | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/generic b/targets/generic index 048fee90..91ab783c 100644 --- a/targets/generic +++ b/targets/generic @@ -42,6 +42,8 @@ config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set' config 'CONFIG_PACKAGE_ATH_DEBUG=y' +try_config 'CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256' + config '# CONFIG_KERNEL_IP_MROUTE is not set' config '# CONFIG_KERNEL_IPV6_MROUTE is not set'