]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
image: adapt mikrotik yafut to allow switch to bootimage YAFFS path
authorJohn Thomson <git@johnthomson.fastmail.com.au>
Thu, 16 May 2024 00:16:53 +0000 (10:16 +1000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 29 Sep 2025 16:34:51 +0000 (17:34 +0100)
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@johnthomson.fastmail.com.au>
include/image-commands.mk

index ad57dfd49bd3b289f8a775d1b9127c447ca3a81d..27a85d770e99a17e9cc350a9fdd4b27f3c599500 100644 (file)
@@ -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