From 1fbc9c5e4dea7311236c8f74d6093bc968a710da Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 20 Sep 2021 12:19:37 +0200 Subject: [PATCH] build: image: add command to ubinize the kernel image Newer NAND devices from MikroTik like the hAP ac3 require the kernel to be packed into UBIFS and then ubinized. So, since the ubinize-image.sh script can now ubinize kernel only as well lets add a command for it. This now allows calling ubinize-kernel in the kernel packaging at then end. Signed-off-by: Robert Marko --- include/image-commands.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/image-commands.mk b/include/image-commands.mk index 4b5ff36ebee..f0557936c9d 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -122,6 +122,18 @@ define Build/append-ubi rm $@.tmp endef +define Build/ubinize-kernel + cp $@ $@.tmp + sh $(TOPDIR)/scripts/ubinize-image.sh \ + --kernel $@.tmp \ + $@ \ + -p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \ + $(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \ + $(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \ + $(UBINIZE_OPTS) + rm $@.tmp +endef + define Build/append-uboot dd if=$(UBOOT_PATH) >> $@ endef -- 2.30.2