[openwrt/openwrt] image: adapt mikrotik yafut to allow switch to bootimage YAFFS path

LEDE Commits lede-commits at lists.infradead.org
Mon Sep 29 10:49:32 PDT 2025


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/097049552a0eb24592c757af77124cad6befe060

commit 097049552a0eb24592c757af77124cad6befe060
Author: John Thomson <git at johnthomson.fastmail.com.au>
AuthorDate: Thu May 16 10:16:53 2024 +1000

    image: adapt mikrotik yafut to allow switch to bootimage YAFFS path
    
    Adjust the YAFFS file path written depending on the sysupgrade
    filename.
    Default to kernel (for ELF), switch to bootimage (for NPK) if image name
    has v7.
    
    Signed-off-by: John Thomson <git at johnthomson.fastmail.com.au>
---
 include/image-commands.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index ad57dfd49b..27a85d770e 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -519,7 +519,7 @@ define Build/yaffs-filesystem
 		filesystem_size="filesystem_blocks * 64 * 1024" \
 		filesystem_size_with_reserve="(filesystem_blocks + 2) * 64 * 1024"; \
 		head -c $$filesystem_size_with_reserve /dev/zero | tr "\000" "\377" > $@.img \
-		&& yafut -d $@.img -w -i $@ -o kernel -C 1040 -B 64k -E -P -S $(1) \
+		&& yafut -d $@.img -w -i $@ -o $(if $(findstring v7,$@),bootimage,kernel) -C 1040 -B 64k -E -P -S $(1) \
 		&& truncate -s $$filesystem_size $@.img \
 		&& mv $@.img $@
 endef




More information about the lede-commits mailing list