From 52ce606c05ee3ac869f8087292bc3dbb0d25b79b Mon Sep 17 00:00:00 2001 From: Andreas Dannenberg Date: Thu, 15 Jun 2023 19:23:52 -0500 Subject: [PATCH] boot/uboot: add support for building the TI K3 DM into U-Boot Certain TI K3 devices such as AM62x and AM62Ax require a Device Manager (DM) firmnware to be made available to the U-Boot build, which will get packaged into the "tispl.bin" image tree blob during A53 SPL build. Without that DM firmware U-Boot will not be functional. To support this, add a config option called BR2_TARGET_UBOOT_NEEDS_TI_K3_DM to enable this feature, and another option BR2_TARGET_UBOOT_TI_K3_DM_SOC to allow setting the name of the SOC which needs to match the corresponding folder name in the ti-linux-firmware Git repository. Signed-off-by: Andreas Dannenberg Signed-off-by: Thomas Petazzoni --- boot/uboot/Config.in | 19 +++++++++++++++++++ boot/uboot/uboot.mk | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 8b726eaa57..21f19db890 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -240,6 +240,25 @@ config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE U-Boot, and that the TEE variable pointing to OPTEE's tee.elf, is passed during the Buildroot build. +config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM + bool "U-Boot needs TI K3 Device Manager (DM)" + # We use the SoC selection defined for the ti-k3-image-gen + # package + depends on BR2_TARGET_TI_K3_IMAGE_GEN + depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X + help + Some TI K3 devices need the Device Manager (DM) firmware to + be available for the U-Boot build. + +if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM + +config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME + string + default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX + default "am62xx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X + +endif + config BR2_TARGET_UBOOT_NEEDS_OPENSBI bool "U-Boot needs OpenSBI" depends on BR2_TARGET_OPENSBI diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 9f81c0b842..dda606a880 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -186,6 +186,12 @@ UBOOT_DEPENDENCIES += optee-os 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 +UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f +endif + ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y) UBOOT_DEPENDENCIES += opensbi UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin