bcm4908: pad firmware image bootfs JFFS2 partition to 8 MiB
authorRafał Miłecki <[email protected]>
Wed, 7 Apr 2021 07:30:30 +0000 (09:30 +0200)
committerRafał Miłecki <[email protected]>
Thu, 8 Apr 2021 11:16:13 +0000 (13:16 +0200)
This way MTD "bootfs" partition will be always 8+ MiB. This should be
enough for any custom / future firmware to fit its bootfs (e.g. big
kernel) without having to repertition whole flash. That way we can
preserve UBI and its erase counters during sysupgrade.

Signed-off-by: Rafał Miłecki <[email protected]>
(cherry picked from commit ca9b1f15c424d68af0f372c37c8eee81b36ee7e1)

target/linux/bcm4908/image/Makefile

index c7714ecf59fbd49b38e119f38ccc29f64f53566c..072915602d1af5e3bb0f26c86fd66d9a0b8a97c7 100644 (file)
@@ -20,7 +20,7 @@ define Build/bcm4908img
        cp $(KDIR)/bcm63xx-cfe/$(subst _,$(comma),$(DEVICE_NAME))/cferam.000 $@-bootfs/
        cp $(IMAGE_KERNEL) $@-bootfs/vmlinux.lz
 
-       $(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad --little-endian --squash-uids \
+       $(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad=0x800000 --little-endian --squash-uids \
                -v -e 128KiB -o [email protected] -d $@-bootfs -m none -n
        $(STAGING_DIR_HOST)/bin/bcm4908img create [email protected] -f [email protected] \
                -a 0x20000 -f $@