Merge pull request #1054 from jamiefiedler/fix_stat_filesize_for_bsd

bsd/gnu-safe file byte calc
This commit is contained in:
Iceman 2020-11-10 21:29:21 +01:00 committed by GitHub
commit d19de8d453
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ FWMAXSIZE = $(shell echo $$(($(PLATFORM_SIZE)*1024)))
BINS = bootrom.bin fullimage.bin $(INSTALLFW)
all: $(BINS)
@FWSIZE=$$(stat -c "%s" $(INSTALLFW));\
@FWSIZE=$$(wc -c < $(INSTALLFW));\
if [ $$FWSIZE -gt $(FWMAXSIZE) ]; then \
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
echo "ERROR: Firmware image too large for your platform! $$FWSIZE > $(FWMAXSIZE)"; \