Преглед изворни кода

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 <[email protected]>
Robert Marko пре 4 година
родитељ
комит
1fbc9c5e4d
1 измењених фајлова са 12 додато и 0 уклоњено
  1. 12 0
      include/image-commands.mk

+ 12 - 0
include/image-commands.mk

@@ -122,6 +122,18 @@ define Build/append-ubi
 	rm [email protected]
 	rm [email protected]
 endef
 endef
 
 
+define Build/ubinize-kernel
+	cp $@ [email protected]
+	sh $(TOPDIR)/scripts/ubinize-image.sh \
+		--kernel [email protected] \
+		$@ \
+		-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
+		$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
+		$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
+		$(UBINIZE_OPTS)
+	rm [email protected]
+endef
+
 define Build/append-uboot
 define Build/append-uboot
 	dd if=$(UBOOT_PATH) >> $@
 	dd if=$(UBOOT_PATH) >> $@
 endef
 endef