mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
imx: move BOARD_SIZE_CHECK to main Makefile
We currently have duplicate definitions for BOARD_SIZE_CHECK in Makefile and arch/arm/mach-imx/Makefile. Move the board size check from arch/arm/mach-imx/Makefile to Makefile. Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like an error like the following is thrown: u-boot-dtb.imx exceeds file size limit: limit: 503696 bytes actual: 509720 bytes excess: 6024 bytes make: *** [Makefile:1051: u-boot-dtb.imx] Error 1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
This commit is contained in:
parent
b275030e50
commit
219dee7e38
2 changed files with 1 additions and 16 deletions
1
Makefile
1
Makefile
|
@ -1094,6 +1094,7 @@ endif
|
|||
|
||||
%.imx: %.bin
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
$(BOARD_SIZE_CHECK)
|
||||
|
||||
%.vyb: %.imx
|
||||
$(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@
|
||||
|
|
|
@ -61,21 +61,6 @@ obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o
|
|||
obj-$(CONFIG_CMD_DEKBLOB) += cmd_dek.o
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
|
||||
BOARD_SIZE_CHECK = \
|
||||
@actual=`wc -c $@ | awk '{print $$1}'`; \
|
||||
limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \
|
||||
if test $$actual -gt $$limit; then \
|
||||
echo "$@ exceeds file size limit:" >&2 ; \
|
||||
echo " limit: $$limit bytes" >&2 ; \
|
||||
echo " actual: $$actual bytes" >&2 ; \
|
||||
echo " excess: $$((actual - limit)) bytes" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
else
|
||||
BOARD_SIZE_CHECK =
|
||||
endif
|
||||
|
||||
PLUGIN = board/$(BOARDDIR)/plugin
|
||||
|
||||
ifeq ($(CONFIG_USE_IMXIMG_PLUGIN),y)
|
||||
|
@ -124,7 +109,6 @@ u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log
|
|||
|
||||
u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
$(BOARD_SIZE_CHECK)
|
||||
|
||||
ifeq ($(CONFIG_OF_SEPARATE),y)
|
||||
MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \
|
||||
|
|
Loading…
Add table
Reference in a new issue