summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2024-02-01 05:03:56 +0000
committerDaniel Golle <daniel@makrotopia.org>2024-02-15 19:30:08 +0000
commit6c17d719734c223e7e33e0a890b33610da54a0ae (patch)
tree474f4980f6e056d6e1c48a7c5ef3bf994d22bcf6 /include
parentada3b2190a86fe329d0e45b6a03dbd37e3911611 (diff)
downloadopenwrt-6c17d719734c223e7e33e0a890b33610da54a0ae.tar.gz
openwrt-6c17d719734c223e7e33e0a890b33610da54a0ae.tar.bz2
openwrt-6c17d719734c223e7e33e0a890b33610da54a0ae.zip
scripts: ubinize-image.sh: support static volumes, make size optional
In order to support devices having TF-A FIP image or UBI-aware U-Boot SPL we need to include a static volume for the bootloader. Introduce support for adding additional static volumes by prefixing the filename with ':', eg. UBINIZE_PARTS := fip:=$(STAGING_DIR_IMAGE)/u-boot.fip Also add support for rootfs-in-uImage.FIT setups which don't require a rootfs partition and make the (3rd) size parameter in UBINIZE_PARTS optional (see example above without declared size). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'include')
-rw-r--r--include/image-commands.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 41a5e1198a..9ce97b17cf 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -138,9 +138,11 @@ UBI_NAND_SIZE_LIMIT = $(IMAGE_SIZE) - ($(NAND_SIZE)*20/1024 + 4*$(BLOCKSIZE))
define Build/append-ubi
sh $(TOPDIR)/scripts/ubinize-image.sh \
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
- $(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \
- --rootfs $(IMAGE_ROOTFS) \
+ $(if $(findstring fit,$(1)), \
+ $(if $(KERNEL_IN_UBI),--part fit=$(IMAGE_KERNEL)), \
+ $(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
+ --rootfs $(IMAGE_ROOTFS)) \
$@.tmp \
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \