Skip to content

Commit

Permalink
build: image: add command to ubinize the kernel image
Browse files Browse the repository at this point in the history
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 <robimarko@gmail.com>
  • Loading branch information
robimarko authored and hauke committed Nov 28, 2021
1 parent 6db4a03 commit 1fbc9c5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/image-commands.mk
Expand Up @@ -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
Expand Down

0 comments on commit 1fbc9c5

Please sign in to comment.