[U-Boot] Makefile: run CONFIG_BOARD_SIZE_LIMIT against .img

Message ID 20190111195602.22542-1-simon.k.r.goldschmidt@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot] Makefile: run CONFIG_BOARD_SIZE_LIMIT against .img
Related show

Commit Message

Simon Goldschmidt Jan. 11, 2019, 7:56 p.m.
With the current Makefile, CONFIG_BOARD_SIZE_LIMIT is used to check
the U-Boot binary without devicetree only. This produces wrong results
when OF_SEPARATE is used.

To fix this, run the CONFIG_BOARD_SIZE_LIMIT check on all .img binaries
as well.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---

 Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass Jan. 12, 2019, 9:31 p.m. | #1
On Fri, 11 Jan 2019 at 12:56, Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
> With the current Makefile, CONFIG_BOARD_SIZE_LIMIT is used to check
> the U-Boot binary without devicetree only. This produces wrong results
> when OF_SEPARATE is used.
>
> To fix this, run the CONFIG_BOARD_SIZE_LIMIT check on all .img binaries
> as well.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
>
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Jan. 16, 2019, 5:11 p.m. | #2
On Fri, Jan 11, 2019 at 08:56:02PM +0100, Simon Goldschmidt wrote:

> With the current Makefile, CONFIG_BOARD_SIZE_LIMIT is used to check
> the U-Boot binary without devicetree only. This produces wrong results
> when OF_SEPARATE is used.
> 
> To fix this, run the CONFIG_BOARD_SIZE_LIMIT check on all .img binaries
> as well.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

Patch

diff --git a/Makefile b/Makefile
index 99cb9e434d..56236c64cd 100644
--- a/Makefile
+++ b/Makefile
@@ -1198,6 +1198,7 @@  MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
 u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
 		$(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE
 	$(call if_changed,mkimage)
+	$(BOARD_SIZE_CHECK)
 
 u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE
 	$(call if_changed,mkfitimage)