diff --git a/include/image-commands.mk b/include/image-commands.mk index 2ec1922044..e7db7128b4 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -269,7 +269,7 @@ define Build/xor-image endef define Build/check-size - @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \ + @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE)))))) -ge "$$(stat -c%s $@)" ] || { \ echo "WARNING: Image file $@ is too big" >&2; \ rm -f $@; \ }