aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-commands.mk
diff options
context:
space:
mode:
authorRobert Marko <robimarko@gmail.com>2021-04-18 19:05:47 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-11-28 17:17:22 +0100
commitda3261e57cf33d6804222c614c77e13fdb32cf95 (patch)
treeb45810e7d2a582ec4bb3a2d580209dd3bf995452 /include/image-commands.mk
parent81995a5e77c0cc5bf5b59ef4bec78b969c020013 (diff)
downloadupstream-da3261e57cf33d6804222c614c77e13fdb32cf95.tar.gz
upstream-da3261e57cf33d6804222c614c77e13fdb32cf95.tar.bz2
upstream-da3261e57cf33d6804222c614c77e13fdb32cf95.zip
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>
Diffstat (limited to 'include/image-commands.mk')
-rw-r--r--include/image-commands.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 91865e1e7e..23c7bd6133 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -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