define Build/append-ubi
sh $(TOPDIR)/scripts/ubinize-image.sh \
$(if $(UBOOTENV_IN_UBI),--uboot-env) \
- $(foreach part,$(UBINIZE_PARTS),--part $(part)) \
- $(if $(findstring fit,$(1)), \
- $(if $(KERNEL_IN_UBI),--part fit=$(IMAGE_KERNEL)), \
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
- --rootfs $(IMAGE_ROOTFS)) \
+ $(foreach part,$(UBINIZE_PARTS),--part $(part)) \
+ --rootfs $(IMAGE_ROOTFS) \
$@.tmp \
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
$(call Build/check-size,$(UBI_NAND_SIZE_LIMIT)))
endef
+define Build/ubinize-image
+ sh $(TOPDIR)/scripts/ubinize-image.sh \
+ $(if $(UBOOTENV_IN_UBI),--uboot-env) \
+ $(foreach part,$(UBINIZE_PARTS),--part $(part)) \
+ --part $(word 1,$(1))="$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(word 2,$(1))" \
+ $@.tmp \
+ -p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
+ $(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
+ $(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
+ $(UBINIZE_OPTS)
+ cat $@.tmp >> $@
+ rm $@.tmp
+endef
+
define Build/ubinize-kernel
cp $@ $@.tmp
sh $(TOPDIR)/scripts/ubinize-image.sh \