Skip to content

Commit

Permalink
build: image: set default parameter for check-size
Browse files Browse the repository at this point in the history
In most cases check-size is used with IMAGE_SIZE and vice versa. Let check-size
use IMAGE_SIZE by default.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
  • Loading branch information
mans0n authored and adschm committed Mar 21, 2020
1 parent 5b392c7 commit 1444e31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@; \
}
Expand Down

0 comments on commit 1444e31

Please sign in to comment.