[OpenWrt-Devel] [PATCH] image: default block size for squashfs

Alexey N. Vinogradov a.n.vinogradov at gmail.com
Fri Nov 7 01:12:11 EST 2014


Sometimes squashfs is necessary for other targets (say, initramfs). In
this case it may not be explicitly checked in the config, and squash fs
block size will not be explicitly defined. This patch will set this
value to 256k in such case.

Signed-off-by: Alexey N Vinogradov <a.n.vinogradov at gmail.com>
---
diff --git a/include/image.mk b/include/image.mk
index 12322bd..0ef291d 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -47,8 +47,7 @@ endif
 
 JFFS2OPTS += $(MKFS_DEVTABLE_OPT)
 
-SQUASHFS_BLOCKSIZE := $(CONFIG_TARGET_SQUASHFS_BLOCK_SIZE)k
-SQUASHFSOPT := -b $(SQUASHFS_BLOCKSIZE)
+SQUASHFSOPT := -b $(if $(CONFIG_TARGET_SQUASHFS_BLOCK_SIZE),$(CONFIG_TARGET_SQUASHFS_BLOCK_SIZE),256)k
 SQUASHFSOPT += -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1'
 SQUASHFSCOMP := gzip
 LZMA_XZ_OPTIONS := -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list