aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Marko <robimarko@gmail.com>2021-09-20 12:19:37 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-11-28 17:17:22 +0100
commit1fbc9c5e4dea7311236c8f74d6093bc968a710da (patch)
treeb7fd18000ce50183f113320e4259bc13aa6ee166
parent6db4a0372a726ebc1720adf308d698a5df9f1af1 (diff)
downloadupstream-1fbc9c5e4dea7311236c8f74d6093bc968a710da.tar.gz
upstream-1fbc9c5e4dea7311236c8f74d6093bc968a710da.tar.bz2
upstream-1fbc9c5e4dea7311236c8f74d6093bc968a710da.zip
build: image: add command to ubinize the kernel image
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>
-rw-r--r--include/image-commands.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 4b5ff36ebe..f0557936c9 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -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