build: image: add UBIFS kernel packer

This allows packing the kernel into UBIFS like newer
MikroTik NAND devices require.

Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Robert Marko 2021-04-18 19:05:47 +02:00 committed by Hauke Mehrtens
parent 81995a5e77
commit da3261e57c

View File

@ -27,6 +27,15 @@ define Build/append-kernel
dd if=$(IMAGE_KERNEL) >> $@
endef
define Build/package-kernel-ubifs
mkdir $@.kernelubifs
cp $@ $@.kernelubifs/kernel
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
$(KERNEL_UBIFS_OPTS) \
-r $@.kernelubifs $@
rm -r $@.kernelubifs
endef
define Build/append-image
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@
endef