Message ID | 20190402171907.17929-3-xypron.glpk@gmx.de |
---|---|
State | Accepted |
Delegated to: | Philipp Tomsich |
Headers | show |
Series | configs: rk3288: Tinker Board SPL file must fit into 32 KiB | expand |
On 4/2/19 7:19 PM, Heinrich Schuchardt wrote: > 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> Hello Stefano, hello Fabio, there have been some comments to 0/4 indicating that the first patch of the series should be reworked. But I think this one is worth merging on it own. Could you, please, review it and if ok add it to your IMX repository. Best regards Heinrich > --- > v4 > new patch > --- > Makefile | 1 + > arch/arm/mach-imx/Makefile | 16 ---------------- > 2 files changed, 1 insertion(+), 16 deletions(-) > > diff --git a/Makefile b/Makefile > index 9878595a82..6398117e64 100644 > --- a/Makefile > +++ b/Makefile > @@ -1042,6 +1042,7 @@ endif > > %.imx: %.bin > $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ > + $(BOARD_SIZE_CHECK) > > %.vyb: %.imx > $(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@ > diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile > index c3ed62aed6..7985afb154 100644 > --- a/arch/arm/mach-imx/Makefile > +++ b/arch/arm/mach-imx/Makefile > @@ -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),$^) \ > -- > 2.20.1 > >
Hi Heinrich, On Tue, Apr 2, 2019 at 2:19 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > > 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> Yes, it makes sense. No need for a imx specific size check: Reviewed-by: Fabio Estevam <festevam@gmail.com>
On 4/5/19 3:05 PM, Fabio Estevam wrote: > Hi Heinrich, > > On Tue, Apr 2, 2019 at 2:19 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: >> >> 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> > > Yes, it makes sense. No need for a imx specific size check: > > Reviewed-by: Fabio Estevam <festevam@gmail.com> > Thanks for reviewing. @Stefano: I have assigned this single patch to you in patchwork to please pick-up for the imx tree. Best regards Heinrich
On Tue, Apr 02, 2019 at 07:19:05PM +0200, Heinrich Schuchardt wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/Makefile b/Makefile index 9878595a82..6398117e64 100644 --- a/Makefile +++ b/Makefile @@ -1042,6 +1042,7 @@ endif %.imx: %.bin $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ + $(BOARD_SIZE_CHECK) %.vyb: %.imx $(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@ diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index c3ed62aed6..7985afb154 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -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),$^) \
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> --- v4 new patch --- Makefile | 1 + arch/arm/mach-imx/Makefile | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) -- 2.20.1