diff mbox series

[v3,5/7] ath79: bsap18x0: pad rootfs image

Message ID 20220607135832.5636-6-tmn505@terefe.re
State Accepted, archived
Headers show
Series ath79: RedBoot devices cleanup and improvment | expand

Commit Message

Tomasz Maciej Nowak June 7, 2022, 1:58 p.m. UTC
From: Tomasz Maciej Nowak <tmn505@gmail.com>

This image is supposed to be written with help of bootloader to the
flash, but as it stands, it's not aligned to block size and RedBoot will
happily create non-aligned partition size in FIS directory. This could
lead to kernel to mark the partition as read-only, therefore pad the
image to block erase size boundary.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
---
 target/linux/ath79/image/generic.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index ad751fd97b58..d87bafbd4e91 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -208,7 +208,7 @@  define Device/adtran_bsap1880
   IMAGE_SIZE := 11200k
   IMAGES += kernel.bin rootfs.bin
   IMAGE/kernel.bin := append-kernel
-  IMAGE/rootfs.bin := append-rootfs | pad-rootfs
+  IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to $$(BLOCKSIZE)
   IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \
 	check-size | sysupgrade-tar rootfs=$$$$@ | append-metadata
 endef