]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: fix wrg-header image recipe 18836/head
authorShiji Yang <yangshiji66@outlook.com>
Sun, 18 May 2025 12:42:19 +0000 (20:42 +0800)
committerRobert Marko <robimarko@gmail.com>
Thu, 22 May 2025 16:49:31 +0000 (18:49 +0200)
Before generating the factory image, check if the input file
exists. Fix the build error when sysupgrade image is too big:

[mkwrgimg] *** error: stat failed on /builder/shared-workdir/build/build_dir/target-mipsel_24kc_musl/linux-ramips_rt288x/tmp/openwrt-ramips-rt288x-airlink101_ar670w-squashfs-factory.bin, No such file or directory

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18836
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ramips/image/Makefile

index 53b9c314ef65ecf966dadd8654c5b69d3192fd63..4d7f65320c09bcc2e6f6c5656bea09f1ba95cfe6 100644 (file)
@@ -163,7 +163,8 @@ define Build/umedia-header
 endef
 
 define Build/wrg-header
-       mkwrgimg -i $@ -d "/dev/mtdblock/2" -s $(1) -o $@.new
+       -[ -f "$@" ] && \
+       mkwrgimg -i $@ -d "/dev/mtdblock/2" -s $(1) -o $@.new && \
        mv $@.new $@
 endef