[openwrt/openwrt] build: image: add command to ubinize the kernel image
LEDE Commits
lede-commits at lists.infradead.org
Sun Nov 28 09:48:27 PST 2021
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1fbc9c5e4dea7311236c8f74d6093bc968a710da
commit 1fbc9c5e4dea7311236c8f74d6093bc968a710da
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Sep 20 12:19:37 2021 +0200
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 at gmail.com>
---
include/image-commands.mk | 12 ++++++++++++
1 file changed, 12 insertions(+)
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
More information about the lede-commits
mailing list