Allow to specify 256k platforms

This commit is contained in:
Philippe Teuwen
2020-11-05 02:32:41 +01:00
parent d500d1d6e9
commit c549478ca5
2 changed files with 14 additions and 0 deletions

View File

@@ -6,10 +6,18 @@ ifneq (,$(FWTAG))
else
INSTALLFWTAG = $(notdir $(INSTALLFW))
endif
FWMAXSIZE = $(shell echo $$(($(PLATFORM_SIZE)*1024)))
BINS = bootrom.bin fullimage.bin $(INSTALLFW)
all: $(BINS)
@FWSIZE=$$(stat -c "%s" $(INSTALLFW));\
if [ $$FWSIZE -gt $(FWMAXSIZE) ]; then \
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
echo "ERROR: Firmware image too large for your platform! $$FWSIZE > $(FWMAXSIZE)"; \
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; \
exit 1; \
fi
bootrom.bin: ../bootrom/obj/bootrom.elf
$(info [=] GEN $@)