Skip to content

Commit

Permalink
build: image: add UBIFS kernel packer
Browse files Browse the repository at this point in the history
This allows packing the kernel into UBIFS like newer
MikroTik NAND devices require.

Signed-off-by: Robert Marko <robimarko@gmail.com>
  • Loading branch information
robimarko authored and hauke committed Nov 28, 2021
1 parent 81995a5 commit da3261e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/image-commands.mk
Expand Up @@ -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
Expand Down

0 comments on commit da3261e

Please sign in to comment.