diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 53b9c314ef6..4d7f65320c0 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -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