summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Thomson2024-05-16 00:16:53 +0000
committerDaniel Golle2025-09-29 16:34:51 +0000
commit097049552a0eb24592c757af77124cad6befe060 (patch)
treed9044260a2c2b4fb10db86ed1a9e1211a6165a16
parentf473d15816c78a1580ed036107428ed7d51b3142 (diff)
downloadopenwrt-097049552a0eb24592c757af77124cad6befe060.tar.gz
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@johnthomson.fastmail.com.au>
-rw-r--r--include/image-commands.mk2
1 files changed, 1 insertions, 1 deletions
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