From c9642d53c4eae651b3ce8ca5fb95bd4585d9b941 Mon Sep 17 00:00:00 2001 From: Jamie Fiedler Date: Tue, 10 Nov 2020 15:02:57 -0500 Subject: [PATCH] bsd/gnu-safe file byte calc --- recovery/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recovery/Makefile b/recovery/Makefile index 1ef142eda..e6e3f7041 100644 --- a/recovery/Makefile +++ b/recovery/Makefile @@ -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)"; \