image: adapt mikrotik yafut to allow switch to bootimage YAFFS path
authorJohn Thomson <[email protected]>
Thu, 16 May 2024 00:16:53 +0000 (10:16 +1000)
committerDaniel Golle <[email protected]>
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 <[email protected]>
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" > [email protected] \
-               && yafut -d [email protected] -w -i $@ -o kernel -C 1040 -B 64k -E -P -S $(1) \
+               && yafut -d [email protected] -w -i $@ -o $(if $(findstring v7,$@),bootimage,kernel) -C 1040 -B 64k -E -P -S $(1) \
                && truncate -s $$filesystem_size [email protected] \
                && mv [email protected] $@
 endef