@@ -290,6 +290,17 @@ config BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN
This option makes sure that the needed binary blobs are copied
into the U-Boot source directory.
+config BR2_TARGET_UBOOT_USE_BINMAN
+ bool "U-Boot use binman"
+ depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema
+ select BR2_TARGET_UBOOT_NEEDS_PYTHON3
+ select BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS
+ select BR2_TARGET_UBOOT_NEEDS_PYLIBFDT
+ help
+ Use binman tool for generation and signing of boot images.
+
+ https://docs.u-boot.org/en/v2024.01/develop/package/binman.html
+
menu "U-Boot binary format"
config BR2_TARGET_UBOOT_FORMAT_AIS
@@ -187,10 +187,12 @@ UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
endif
ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
-UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))
UBOOT_DEPENDENCIES += ti-k3-boot-firmware
+ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),)
+UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))
UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
endif
+endif
ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
UBOOT_DEPENDENCIES += opensbi
@@ -269,6 +271,14 @@ ifeq ($(BR2_TARGET_UBOOT_NEEDS_XXD),y)
UBOOT_DEPENDENCIES += host-vim
endif
+ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),y)
+# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt
+UBOOT_DEPENDENCIES += \
+ host-python-jsonschema \
+ host-python-pyyaml
+UBOOT_MAKE_OPTS += BINMAN_INDIRS=$(BINARIES_DIR)
+endif
+
# prior to u-boot 2013.10 the license info was in COPYING. Copy it so
# legal-info finds it
define UBOOT_COPY_OLD_LICENSE_FILE