boot/u-boot: fix u-boot.stm32 creation on newer version

As reported in commit [1] of the U-Boot project, the config.mk file has
been suppressed in order to use binman to manage FIT
generation. Therefore, the "u-boot.stm32" make target should no longer
be used with recent versions of U-Boot.

The configuration option added by this comit allows the creation of
the u-boot.stm32 image for both recent versions of U-Boot, which use
binman, and older versions.

Legacy handling would have suggested that this new option should
"default y" to preserve existing behavior, but as moving forward all
U-Boot new versions will no longer need this u-boot.stm32 target, it
probably makes sense here to not comply with this backward
compatibility rule, as an exception.

[1] 5564b4cd4d5c69 ("stm32mp: add binman support for STM32MP15x")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Tested-by: David Reaver <me@davidreaver.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Dario Binacchi
2023-07-03 18:01:48 +02:00
committed by Thomas Petazzoni
parent dd194540a1
commit 8771ca8a66
7 changed files with 17 additions and 0 deletions

View File

@@ -395,6 +395,16 @@ config BR2_TARGET_UBOOT_FORMAT_STM32
bool "u-boot.stm32"
depends on BR2_arm
if BR2_TARGET_UBOOT_FORMAT_STM32
config BR2_TARGET_UBOOT_BUILD_FORMAT_STM32_LEGACY
bool "Legacy build (u-boot.stm32 target)"
help
Select this option if you use U-Boot with version older than
2022.01), so that we use the old build target. Otherwise,
binman application is called to create the stm32 binary
format.
endif
config BR2_TARGET_UBOOT_FORMAT_CUSTOM
bool "Custom (specify below)"
help

View File

@@ -133,8 +133,10 @@ endif
ifeq ($(BR2_TARGET_UBOOT_FORMAT_STM32),y)
UBOOT_BINS += u-boot.stm32
ifeq ($(BR2_TARGET_UBOOT_BUILD_FORMAT_STM32_LEGACY),y)
UBOOT_MAKE_TARGET += u-boot.stm32
endif
endif
ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))