Browse Source

build: image: add UBIFS kernel packer

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

Signed-off-by: Robert Marko <[email protected]>
Robert Marko 4 years ago
parent
commit
da3261e57c
1 changed files with 9 additions and 0 deletions
  1. 9 0
      include/image-commands.mk

+ 9 - 0
include/image-commands.mk

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