aboutsummaryrefslogtreecommitdiffstats
path: root/include/image.mk
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2019-08-30 16:52:25 +0200
committerChristian Lamparter <chunkeey@gmail.com>2019-08-30 20:45:40 +0200
commit1c0290c5cc6258c48b8ba46b4f9c85a21de4f875 (patch)
tree915cd6e2fdf61886c39519893e95e8a455d9a6af /include/image.mk
parentdb97cb814cc842b287c54397c3fc145ef5a8f286 (diff)
downloadupstream-1c0290c5cc6258c48b8ba46b4f9c85a21de4f875.tar.gz
upstream-1c0290c5cc6258c48b8ba46b4f9c85a21de4f875.tar.bz2
upstream-1c0290c5cc6258c48b8ba46b4f9c85a21de4f875.zip
build: remove harmful -nopad option from mksquashfs
While the -nopad option prevents mksquashfs from padding the image to an arbitrary 4k. It does not take into consideration that squashfs is programmed to have this 4k padding when it's being used on on a block device... which is its main "use-case". Now, after a week long discussion on the ML that included a back-and-forth between some of the possible options. But this is likely the best KISS patch to deal with the issue right away given the limited resources. From squashfs code point of view, be warned. The 4k padding is not enough when dealing with devices that have a PAGE_SIZE bigger than 4k. if it turns out to be affecting you, then please look-up either: "FS#2460 - kernel panic reading squashfs from ubi volume" bug Or the discussion on the OpenWrt-Devel ML in "amp821xx: use newly added pad-squashfs for Meraki MR24" and "Squashfs breakage lottery with UBI..." before making an educated guess. Note: This will not affect the "tiny"/small flash devices as much as it seems at first. This is because the the rootfs_data partition that follows uses jffs2. And it requires to be aligned to the flash block-size in order to work at all. So either the involved FSes will meet in the middle as before, or not at all. But in that latter case the image was already hoping for the "undefined behaviour" gamble to turn out in its favour and this is probably why this was unnoticed for so long. Fixes: FS#2460 Reported-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'include/image.mk')
-rw-r--r--include/image.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/image.mk b/include/image.mk
index 5d54bc7947..599adfaa10 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -240,7 +240,7 @@ $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))
define Image/mkfs/squashfs
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
- -nopad -noappend -root-owned \
+ -noappend -root-owned \
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
-processors 1
endef