[PATCH v5 7/8] qualcomm: use mkmbn via binman and stop creating ELF files
Casey Connolly
caleb.connolly at linaro.org
Tue Jul 22 17:34:57 CEST 2025
From: Casey Connolly <casey.connolly at linaro.org>
Remove the load address and REMAKE_ELF from Qualcomm defconfigs. This
information is now encoded in a table in mkmbn.py.
Add a new qcom-binman.dts file to configure binman to build a u-boot.mbn
file.
mkmbn.py is now run by binman during the build process and will emit an
MBN file for supported boards with the appropriate signatures.
This removes the need for additional processing of the image in most
cases.
To avoid having to explicitly disable BINMAN_FDT in all qcom defconfigs,
make it depend on !ARCH_SNAPDRAGON.
We also duplicate the BINMAN_DTB node in mach-snapdragon/kconfig to set
the default path to the qcom binman dtb for configuring binman.
Signed-off-by: Casey Connolly <casey.connolly at linaro.org>
---
arch/arm/Kconfig | 1 +
arch/arm/dts/qcom-binman.dts | 16 ++++++++++++++++
arch/arm/mach-snapdragon/Kconfig | 4 ++++
configs/qcm6490_defconfig | 4 ----
configs/qcom_ipq9574_mmc_defconfig | 1 -
configs/qcs9100_defconfig | 3 ---
lib/Kconfig | 2 +-
7 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 9ed55e6cfacd..1ac94a4ab420 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1122,8 +1122,9 @@ config ARCH_RENESAS
config ARCH_SNAPDRAGON
bool "Qualcomm Snapdragon SoCs"
select ARM64
+ select BINMAN
select DM
select DM_GPIO
select DM_SERIAL
select DM_RESET
diff --git a/arch/arm/dts/qcom-binman.dts b/arch/arm/dts/qcom-binman.dts
new file mode 100644
index 000000000000..da5d4a23d2fa
--- /dev/null
+++ b/arch/arm/dts/qcom-binman.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * (C) Copyright 2025, Linaro Ltd.
+ *
+ * Casey Connolly <casey.connolly at linaro.org>
+ */
+
+/* Configure binman to build a u-boot.mbn */
+/dts-v1/;
+/{
+ binman {
+ u-boot-mbn {
+
+ };
+ };
+};
diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
index 976c0e35fcef..5d734e09570c 100644
--- a/arch/arm/mach-snapdragon/Kconfig
+++ b/arch/arm/mach-snapdragon/Kconfig
@@ -44,5 +44,9 @@ config SYS_CONFIG_NAME
This option contains information about board configuration name.
Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header
will be used for board configuration.
+config BINMAN_DTB
+ string "binman DTB description"
+ default "./arch/arm/dts/qcom-binman.dtb"
+
endif
diff --git a/configs/qcm6490_defconfig b/configs/qcm6490_defconfig
index 54eb5dedaecb..63daa74a451a 100644
--- a/configs/qcm6490_defconfig
+++ b/configs/qcm6490_defconfig
@@ -7,9 +7,5 @@
# Otherwise buildman thinks this isn't an ARM platform
CONFIG_ARM=y
-# Address where U-Boot will be loaded
-CONFIG_TEXT_BASE=0x9fc00000
-CONFIG_REMAKE_ELF=y
-
CONFIG_DEFAULT_DEVICE_TREE="qcom/qcs6490-rb3gen2"
diff --git a/configs/qcom_ipq9574_mmc_defconfig b/configs/qcom_ipq9574_mmc_defconfig
index 720220dc98a8..02ffaf97b624 100644
--- a/configs/qcom_ipq9574_mmc_defconfig
+++ b/configs/qcom_ipq9574_mmc_defconfig
@@ -11,9 +11,8 @@ CONFIG_DEFAULT_DEVICE_TREE="qcom/ipq9574-rdp433"
CONFIG_SYS_LOAD_ADDR=0x50000000
CONFIG_DEBUG_UART_BASE=0x78b1000
CONFIG_DEBUG_UART_CLOCK=1843200
CONFIG_DEBUG_UART=y
-CONFIG_REMAKE_ELF=y
# CONFIG_EFI_LOADER is not set
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
# CONFIG_BOOTSTD is not set
diff --git a/configs/qcs9100_defconfig b/configs/qcs9100_defconfig
index 216dfa3211ec..e1f6d6fdf00e 100644
--- a/configs/qcs9100_defconfig
+++ b/configs/qcs9100_defconfig
@@ -4,11 +4,8 @@
# a dedicated "uefi" partition for edk2/U-Boot)
#include "qcom_defconfig"
-# Address where U-Boot will be loaded
-CONFIG_TEXT_BASE=0xaf000000
-CONFIG_REMAKE_ELF=y
CONFIG_DEFAULT_DEVICE_TREE="qcom/qcs9100-ride-r3"
CONFIG_ENV_IS_IN_SCSI=y
CONFIG_SCSI_ENV_PART_UUID="71cb9cd0-acf1-b6cb-ad91-be9572fe11a9"
# CONFIG_ENV_IS_DEFAULT is not set
diff --git a/lib/Kconfig b/lib/Kconfig
index 6a89f797beff..443363f889b6 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -36,9 +36,9 @@ config BCH
hardware engine required for BCH ECC correction.
config BINMAN_FDT
bool "Allow access to binman information in the device tree"
- depends on BINMAN && DM && OF_CONTROL
+ depends on BINMAN && DM && OF_CONTROL && !ARCH_SNAPDRAGON
default y if OF_SEPARATE || OF_EMBED
help
This enables U-Boot to access information about binman entries,
stored in the device tree in a binman node. Typical uses are to
--
2.50.1
More information about the U-Boot
mailing list