[source] image: pass device blocksize to padjffs2
LEDE Commits
lede-commits at lists.infradead.org
Fri Sep 9 03:34:54 PDT 2016
mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/ddd259b0d5d0d4ec0084cb7cb30992b63780e962
commit ddd259b0d5d0d4ec0084cb7cb30992b63780e962
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Sat Sep 3 07:40:15 2016 +0200
image: pass device blocksize to padjffs2
At the moment the padding steps are hardcoded. Especially images for
devices with a 4K sector size can be unnecessarily bloated using the
hardcoded padding steps.
It has been observed that 192Kb of padding was added to the image of a
4MB device, albeit due to the 4K sector size the minimum required extra
padding for the jffs2 rootfs_data is 20Kb.
In worst case it means that the image-size check could fail albeit
there is enough space for all selected packages
For device build code not exposing the blocksize, use the hardcoded
padding further on.
Signed-off-by: Mathias Kresin <dev at kresin.me>
---
include/image-commands.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 6cb5bff..9db150c 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -131,7 +131,8 @@ define Build/pad-to
endef
define Build/pad-rootfs
- $(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) 4 8 16 64 128 256
+ $(STAGING_DIR_HOST)/bin/padjffs2 $@ $(1) \
+ $(if $(BLOCKSIZE),$(BLOCKSIZE:%k=%),4 8 16 64 128 256)
endef
define Build/pad-offset
More information about the lede-commits
mailing list