[U-Boot] [PATCH 03/13] spl: Kconfig: Add CONFIG_SPL_TEXT_BASE as Kconfig option

Andrew F. Davis afd at ti.com
Thu Aug 18 17:41:36 CEST 2016


Add a new Kconfig CONFIG_SPL_TEXT_BASE. Add its use to
am335x_evm_defconfig, then only conditionally define it in
ti_am335x_common.h when it is not already defined, this allows for
systems that have not fully converted to the Kconfig based config
system to still include this header without redefining this symbol
on platforms that have.

Signed-off-by: Andrew F. Davis <afd at ti.com>
---
 Kconfig                            | 8 ++++++++
 configs/am335x_evm_defconfig       | 1 +
 include/configs/ti_am335x_common.h | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/Kconfig b/Kconfig
index cb5af5b..f67e7c8 100644
--- a/Kconfig
+++ b/Kconfig
@@ -319,6 +319,14 @@ config SYS_TEXT_BASE
 	help
 	  TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
 
+config SPL_TEXT_BASE
+	hex "Text Base"
+	depends on SPL
+	help
+	  When SPL is enabled the image is linked with this as the
+	  starting address in memeory for which the SPL will be loaded.
+	  TODO: Move CONFIG_SPL_TEXT_BASE for all the architecture
+
 config SPL_LOAD_FIT
 	bool "Enable SPL loading U-Boot as a FIT"
 	depends on FIT
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 6885230..b1264d7 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
 CONFIG_SPL=y
+CONFIG_SPL_TEXT_BASE=0x402F0400
 CONFIG_SPL_STACK_R=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_HUSH_PARSER=y
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index bcd56fc..25c9643 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -58,7 +58,9 @@
  * supports X-MODEM loading via UART, and we leverage this and then use
  * Y-MODEM to load u-boot.img, when booted over UART.
  */
+#ifndef CONFIG_SPL_TEXT_BASE
 #define CONFIG_SPL_TEXT_BASE		0x402F0400
+#endif
 #define CONFIG_SPL_MAX_SIZE		(0x4030B800 - CONFIG_SPL_TEXT_BASE)
 #define CONFIG_SYS_SPL_ARGS_ADDR	(CONFIG_SYS_SDRAM_BASE + \
 					 (128 << 20))
-- 
2.9.2



More information about the U-Boot mailing list