[openwrt/openwrt] image: add recipe for legacy multiple images
LEDE Commits
lede-commits at lists.infradead.org
Tue Jul 9 03:33:41 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/905338ad609467e1117635a49c5f0c002f9ae237
commit 905338ad609467e1117635a49c5f0c002f9ae237
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed Jun 26 18:52:29 2024 +0200
image: add recipe for legacy multiple images
Asus RT-AX89X has modded U-Boot that boots FIT images fine when manually
using bootm command, however once the image is flashed and device boots via
the default bootcmd it only supports booting via legacy images.
More precisely, it requires the "multi" image format with:
1. kernel
2. ramdisk
3. DTB
So, lets add a recipe based on the existing uImage one.
Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
include/image-commands.mk | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 04213a3be8..cb899a2f30 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -701,6 +701,23 @@ define Build/uImage
mv $@.new $@
endef
+define Build/multiImage
+ $(if $(UIMAGE_TIME),SOURCE_DATE_EPOCH="$(UIMAGE_TIME)") \
+ mkimage \
+ -A $(LINUX_KARCH) \
+ -O linux \
+ -T multi \
+ -C $(word 1,$(1)) \
+ -a $(KERNEL_LOADADDR) \
+ -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
+ -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' \
+ $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \
+ -d $@:$(word 2,$(1)):$(word 3,$(1)) \
+ $(wordlist 4,$(words $(1)),$(1)) \
+ $@.new
+ mv $@.new $@
+endef
+
define Build/xor-image
$(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1)
mv $@.xor $@
More information about the lede-commits
mailing list