diff mbox series

[v3,1/9] Makefile: Only define u-boot.itb rule when applicable

Message ID 20200906032615.40448-2-samuel@sholland.org
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series sunxi: binman fixes and SCP firmware support | expand

Commit Message

Samuel Holland Sept. 6, 2020, 3:26 a.m. UTC
If neither CONFIG_SPL_FIT_SOURCE nor CONFIG_USE_SPL_FIT_GENERATOR is
enabled, U_BOOT_ITS will be undefined, and attempting to make u-boot.itb
will pass invalid arguments to mkimage, causing it to print its help
message.

Remove the rule in that case, so it is more obvious that u-boot.itb is
not something that can be made. This will reduce confusion as platforms
move away from CONFIG_USE_SPL_FIT_GENERATOR, as u-boot.itb was
previously a valid goal for those platforms.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass Sept. 6, 2020, 1:58 p.m. UTC | #1
On Sat, 5 Sep 2020 at 21:26, Samuel Holland <samuel@sholland.org> wrote:
>
> If neither CONFIG_SPL_FIT_SOURCE nor CONFIG_USE_SPL_FIT_GENERATOR is
> enabled, U_BOOT_ITS will be undefined, and attempting to make u-boot.itb
> will pass invalid arguments to mkimage, causing it to print its help
> message.
>
> Remove the rule in that case, so it is more obvious that u-boot.itb is
> not something that can be made. This will reduce confusion as platforms
> move away from CONFIG_USE_SPL_FIT_GENERATOR, as u-boot.itb was
> previously a valid goal for those platforms.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>  Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 65024c74089..d5aa8605c0a 100644
--- a/Makefile
+++ b/Makefile
@@ -1438,11 +1438,13 @@  else
 MKIMAGEFLAGS_u-boot.itb = -E
 endif
 
+ifdef U_BOOT_ITS
 u-boot.itb: u-boot-nodtb.bin \
 		$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),dts/dt.dtb) \
 		$(U_BOOT_ITS) FORCE
 	$(call if_changed,mkfitimage)
 	$(BOARD_SIZE_CHECK)
+endif
 
 u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE
 	$(call if_changed,mkimage)