Skip to contentSkip to conversation

configs: Remove unneeded CONFIG_SYS_LDSCRIPT instances

PATCH New Tom Rini 1 participant 4 messages Jun 2, 2019 – Jun 15, 2019 Arm/Zynq architecture

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/2 configs: Remove unneeded CONFIG_SYS_LDSCRIPT instances

A number of boards set CONFIG_SYS_LDSCRIPT and then end up using one of the default searched LDSCRIPT paths. Remove these customizations.

---
 include/configs/P1010RDB.h        | 2 --
 include/configs/P1022DS.h         | 2 --
 include/configs/T102xQDS.h        | 2 --
 include/configs/T102xRDB.h        | 2 --
 include/configs/T104xRDB.h        | 2 --
 include/configs/T208xQDS.h        | 2 --
 include/configs/T208xRDB.h        | 2 --
 include/configs/T4240QDS.h        | 1 -
 include/configs/T4240RDB.h        | 1 -
 include/configs/am335x_evm.h      | 3 ---
 include/configs/baltos.h          | 3 ---
 include/configs/bav335x.h         | 3 ---
 include/configs/dragonboard410c.h | 2 --
 include/configs/dragonboard820c.h | 1 -
 include/configs/edb93xx.h         | 2 --
 include/configs/p1_p2_rdb_pc.h    | 2 --
 16 files changed, 32 deletions(-)
include/configs/P1010RDB.h +0 -2
index 610091b774ab..964d3db3d75c 100644
@@ -23,7 +23,6 @@
 #define CONFIG_SYS_MMC_U_BOOT_START	(0x11000000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	(96 << 10)
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_COMMON_INIT_DDR
 #endif
@@ -44,7 +43,6 @@
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x11000000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(96 << 10)
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_COMMON_INIT_DDR
 #endif
include/configs/P1022DS.h +0 -2
index 695fdd53930f..ac5eee45210d 100644
@@ -20,7 +20,6 @@
 #define CONFIG_SYS_MMC_U_BOOT_START	(0x11000000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	(128 << 10)
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
-#define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_COMMON_INIT_DDR
 #endif
@@ -37,7 +36,6 @@
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x11000000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(128 << 10)
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_COMMON_INIT_DDR
 #endif
include/configs/T102xQDS.h +0 -2
index 8ad5c848e9c4..7c7ffb602537 100644
@@ -55,7 +55,6 @@
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x00200000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x00200000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
@@ -68,7 +67,6 @@
 #define CONFIG_SYS_MMC_U_BOOT_DST	(0x00200000)
 #define CONFIG_SYS_MMC_U_BOOT_START	(0x00200000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	(260 << 10)
-#define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
include/configs/T102xRDB.h +0 -2
index 86997f5eb755..adb440b25a92 100644
@@ -62,7 +62,6 @@
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x30000000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x30000000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
@@ -79,7 +78,6 @@
 #define CONFIG_SYS_MMC_U_BOOT_DST	(0x30000000)
 #define CONFIG_SYS_MMC_U_BOOT_START	(0x30000000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	(260 << 10)
-#define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
include/configs/T104xRDB.h +0 -2
index 1ec7d7fec44a..de42d53ef9cc 100644
@@ -76,7 +76,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_nand_rcw.cfg
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x30000000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x30000000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define	CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
@@ -108,7 +107,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_spi_rcw.cfg
 #define CONFIG_SYS_MMC_U_BOOT_DST	(0x30000000)
 #define CONFIG_SYS_MMC_U_BOOT_START	(0x30000000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	(260 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define	CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
include/configs/T208xQDS.h +0 -2
index e7b17e2fdcce..8cdc622ccd53 100644
@@ -66,7 +66,6 @@
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x00200000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x00200000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define	CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
@@ -83,7 +82,6 @@
 #define CONFIG_SYS_MMC_U_BOOT_DST	(0x00200000)
 #define CONFIG_SYS_MMC_U_BOOT_START	(0x00200000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	(260 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define	CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
include/configs/T208xRDB.h +0 -2
index 88a44796586e..95672d6cfa65 100644
@@ -56,7 +56,6 @@
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST                (0x00200000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START      (0x00200000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS       (256 << 10)
-#define CONFIG_SYS_LDSCRIPT    "arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
@@ -69,7 +68,6 @@
 #define CONFIG_SYS_MMC_U_BOOT_DST      (0x00200000)
 #define CONFIG_SYS_MMC_U_BOOT_START    (0x00200000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS     (260 << 10)
-#define CONFIG_SYS_LDSCRIPT    "arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
include/configs/T4240QDS.h +0 -1
index 1350a87c90b3..1431d0d2d257 100644
@@ -44,7 +44,6 @@
 #ifndef CONFIG_SPL_BUILD
 #define	CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t4qds/t4_sd_rcw.cfg
 #endif
 
include/configs/T4240RDB.h +0 -1
index 318f1ea4c045..0accdc611947 100644
@@ -35,7 +35,6 @@
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #endif
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/t4rdb/t4_sd_rcw.cfg
 #endif
 
include/configs/am335x_evm.h +0 -3
index 7721907d8f0d..b5fba0a8b08e 100644
@@ -31,9 +31,6 @@
 #define V_OSCK				24000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
 
-/* Custom script for NOR */
-#define CONFIG_SYS_LDSCRIPT		"board/ti/am335x/u-boot.lds"
-
 /* Always 128 KiB env size */
 #define CONFIG_ENV_SIZE			SZ_128K
 
include/configs/baltos.h +0 -3
index 98ec0d626ea8..fbf657fe6596 100644
@@ -25,9 +25,6 @@
 #define V_OSCK				24000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
 
-/* Custom script for NOR */
-#define CONFIG_SYS_LDSCRIPT		"board/vscom/baltos/u-boot.lds"
-
 /* Always 128 KiB env size */
 #define CONFIG_ENV_SIZE			(128 << 10)
 
include/configs/bav335x.h +0 -3
index 3d4d08aa70e1..0525efac8faa 100644
@@ -31,9 +31,6 @@
 #define V_OSCK				24000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
 
-/* Custom script for NOR */
-#define CONFIG_SYS_LDSCRIPT		"board/birdland/bav335x/u-boot.lds"
-
 /* Always 128 KiB env size */
 #define CONFIG_ENV_SIZE			(128 << 10)
 
include/configs/dragonboard410c.h +0 -2
index 7155ebac5c24..bf0e0315c26d 100644
@@ -25,8 +25,6 @@
 /* Generic Timer Definitions */
 #define COUNTER_FREQUENCY		19000000
 
-#define CONFIG_SYS_LDSCRIPT "board/qualcomm/dragonboard410c/u-boot.lds"
-
 /* Fixup - in init code we switch from device to host mode,
  * it has to be done after each HCD reset */
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
include/configs/dragonboard820c.h +0 -1
index cc4a4cb3f405..a41df22273e6 100644
@@ -23,7 +23,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x7fff0)
 #define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x80000)
 #define CONFIG_SYS_BOOTM_LEN		SZ_64M
-#define CONFIG_SYS_LDSCRIPT	"board/qualcomm/dragonboard820c/u-boot.lds"
 
 /* Generic Timer Definitions */
 #define COUNTER_FREQUENCY		19000000
include/configs/edb93xx.h +0 -2
index 3d90dbcf93eb..84cbcdda93ca 100644
@@ -31,8 +31,6 @@
 #define CONFIG_SETUP_MEMORY_TAGS	1
 #define CONFIG_BOOTFILE		"edb93xx.img"
 
-#define CONFIG_SYS_LDSCRIPT	"board/cirrus/edb93xx/u-boot.lds"
-
 #ifdef CONFIG_EDB9301
 #define CONFIG_MACH_TYPE		MACH_TYPE_EDB9301
 #define CONFIG_ENV_SECT_SIZE		0x00020000
include/configs/p1_p2_rdb_pc.h +0 -2
index 9968a343c3c1..8fccd6b77933 100644
@@ -142,7 +142,6 @@
 #define CONFIG_SYS_MMC_U_BOOT_START	(0x11000000)
 #define CONFIG_SYS_MMC_U_BOOT_OFFS	(128 << 10)
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_COMMON_INIT_DDR
 #endif
@@ -159,7 +158,6 @@
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_START	(0x11000000)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS	(128 << 10)
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot.lds"
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_COMMON_INIT_DDR
 #endif
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 configs: Remove unneeded CONFIG_SYS_LDSCRIPT instances

Quoted 4 lines · Tom Rini

A number of boards set CONFIG_SYS_LDSCRIPT and then end up using one of the default searched LDSCRIPT paths. Remove these customizations.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190615/187c515f/attachment.sig>
author
#2 lore raw

PATCH 2/2 configs: Migrate CONFIG_SYS_LDSCRIPT to Kconfig

In reply to Tom Rini

In order to migrate this symbol to Kconfig introduce a new symbol to guard it, CONFIG_SYS_CUSTOM_LDSCRIPT. When that is set we can then provide the exact final location o the script.

---
 Kconfig                                        | 17 +++++++++++++++++
 configs/B4420QDS_NAND_defconfig                |  2 ++
 configs/B4860QDS_NAND_defconfig                |  2 ++
 configs/BSC9131RDB_NAND_SYSCLK100_defconfig    |  2 ++
 configs/BSC9131RDB_NAND_defconfig              |  2 ++
 configs/BSC9132QDS_NAND_DDRCLK100_defconfig    |  2 ++
 configs/BSC9132QDS_NAND_DDRCLK133_defconfig    |  2 ++
 configs/C29XPCIE_NAND_defconfig                |  2 ++
 configs/P1010RDB-PA_36BIT_NAND_defconfig       |  2 ++
 configs/P1010RDB-PA_NAND_defconfig             |  2 ++
 configs/P1010RDB-PB_36BIT_NAND_defconfig       |  2 ++
 configs/P1010RDB-PB_NAND_defconfig             |  2 ++
 configs/P1020RDB-PC_36BIT_NAND_defconfig       |  2 ++
 configs/P1020RDB-PC_NAND_defconfig             |  2 ++
 configs/P1020RDB-PD_NAND_defconfig             |  2 ++
 configs/P1021RDB-PC_36BIT_NAND_defconfig       |  2 ++
 configs/P1021RDB-PC_NAND_defconfig             |  2 ++
 configs/P1022DS_36BIT_NAND_defconfig           |  2 ++
 configs/P1022DS_NAND_defconfig                 |  2 ++
 configs/P1024RDB_NAND_defconfig                |  2 ++
 configs/P1025RDB_NAND_defconfig                |  2 ++
 configs/P2020RDB-PC_36BIT_NAND_defconfig       |  2 ++
 configs/P2020RDB-PC_NAND_defconfig             |  2 ++
 configs/T1023RDB_NAND_defconfig                |  2 ++
 configs/T1024QDS_NAND_defconfig                |  2 ++
 configs/T1024RDB_NAND_defconfig                |  2 ++
 configs/T1040D4RDB_NAND_defconfig              |  2 ++
 configs/T1040RDB_NAND_defconfig                |  2 ++
 configs/T1042D4RDB_NAND_defconfig              |  2 ++
 configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig |  2 ++
 configs/T1042RDB_PI_NAND_defconfig             |  2 ++
 configs/T2080QDS_NAND_defconfig                |  2 ++
 configs/T2080RDB_NAND_defconfig                |  2 ++
 configs/T2081QDS_NAND_defconfig                |  2 ++
 configs/T4160QDS_NAND_defconfig                |  2 ++
 configs/T4240QDS_NAND_defconfig                |  2 ++
 configs/bitmain_antminer_s9_defconfig          |  2 ++
 configs/syzygy_hub_defconfig                   |  2 ++
 configs/topic_miami_defconfig                  |  2 ++
 configs/topic_miamilite_defconfig              |  2 ++
 configs/topic_miamiplus_defconfig              |  2 ++
 configs/zynq_cc108_defconfig                   |  2 ++
 configs/zynq_cse_nand_defconfig                |  2 ++
 configs/zynq_cse_nor_defconfig                 |  2 ++
 configs/zynq_cse_qspi_defconfig                |  2 ++
 configs/zynq_dlc20_rev1_0_defconfig            |  2 ++
 configs/zynq_microzed_defconfig                |  2 ++
 configs/zynq_minized_defconfig                 |  2 ++
 configs/zynq_picozed_defconfig                 |  2 ++
 configs/zynq_z_turn_defconfig                  |  2 ++
 configs/zynq_zc702_defconfig                   |  2 ++
 configs/zynq_zc706_defconfig                   |  2 ++
 configs/zynq_zc770_xm010_defconfig             |  2 ++
 configs/zynq_zc770_xm011_defconfig             |  2 ++
 configs/zynq_zc770_xm011_x16_defconfig         |  2 ++
 configs/zynq_zc770_xm012_defconfig             |  2 ++
 configs/zynq_zc770_xm013_defconfig             |  2 ++
 configs/zynq_zed_defconfig                     |  2 ++
 configs/zynq_zybo_defconfig                    |  2 ++
 configs/zynq_zybo_z7_defconfig                 |  2 ++
 include/configs/B4860QDS.h                     |  1 -
 include/configs/BSC9131RDB.h                   |  1 -
 include/configs/BSC9132QDS.h                   |  1 -
 include/configs/C29XPCIE.h                     |  1 -
 include/configs/P1010RDB.h                     |  2 --
 include/configs/P1022DS.h                      |  1 -
 include/configs/T102xQDS.h                     |  1 -
 include/configs/T102xRDB.h                     |  1 -
 include/configs/T104xRDB.h                     |  1 -
 include/configs/T208xQDS.h                     |  1 -
 include/configs/T208xRDB.h                     |  1 -
 include/configs/T4240QDS.h                     |  1 -
 include/configs/p1_p2_rdb_pc.h                 |  1 -
 include/configs/zynq-common.h                  |  2 --
 scripts/config_whitelist.txt                   |  1 -
 75 files changed, 135 insertions(+), 17 deletions(-)
Kconfig +17 -0
index a02168690f5b..442bb58564c2 100644
@@ -251,6 +251,23 @@ config BUILD_TARGET
 	  special image will be automatically built upon calling
 	  make / buildman.
 
+config SYS_CUSTOM_LDSCRIPT
+	bool "Use a custom location for the U-Boot linker script"
+	help
+	  Normally when linking U-Boot we will look in the board directory,
+	  the CPU directory and finally the "cpu" directory of the architecture
+	  for the ile "u-boot.lds" and use that as our linker.  However, in
+	  some cases we need to provide a different linker script.  To do so,
+	  enable this option and then provide the location under
+	  CONFIG_SYS_LDSCRIPT.
+
+config SYS_LDSCRIPT
+	depends on SYS_CUSTOM_LDSCRIPT
+	string "Custom ldscript location"
+	help
+	  Path within the source tree to the linker script to use for the
+	  main U-Boot binary.
+
 endmenu		# General setup
 
 menu "Boot images"
configs/B4420QDS_NAND_defconfig +2 -0
index 3dc9ed4f8fcf..2afce5e54e6b 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_B4420QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/B4860QDS_NAND_defconfig +2 -0
index 36cc8c250370..8e0fb2baf023 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_B4860QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/BSC9131RDB_NAND_SYSCLK100_defconfig +2 -0
index b789f90f7c3d..b221db174877 100644
@@ -4,6 +4,8 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_BSC9131RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/BSC9131RDB_NAND_defconfig +2 -0
index b3870202a688..921c90fffe4b 100644
@@ -4,6 +4,8 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_BSC9131RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/BSC9132QDS_NAND_DDRCLK100_defconfig +2 -0
index caf6f9bbb1a1..a82544df14b2 100644
@@ -4,6 +4,8 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_BSC9132QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/BSC9132QDS_NAND_DDRCLK133_defconfig +2 -0
index f539b4a45cab..037337254dce 100644
@@ -4,6 +4,8 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_BSC9132QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/C29XPCIE_NAND_defconfig +2 -0
index 44ab55ce4b4d..1a0666fcf20d 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_C29XPCIE=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1010RDB-PA_36BIT_NAND_defconfig +2 -0
index 23c44210620c..f8effe895008 100644
@@ -8,6 +8,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_P1010RDB_PA=y
 CONFIG_PHYS_64BIT=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1010RDB-PA_NAND_defconfig +2 -0
index 2484bb03b03d..0b8b67a5a5e2 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_P1010RDB_PA=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1010RDB-PB_36BIT_NAND_defconfig +2 -0
index 1ee7fb3a76c7..a6ff61648f59 100644
@@ -8,6 +8,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_P1010RDB_PB=y
 CONFIG_PHYS_64BIT=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1010RDB-PB_NAND_defconfig +2 -0
index e90656a4a9f6..bc8dce25d677 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_P1010RDB_PB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1020RDB-PC_36BIT_NAND_defconfig +2 -0
index b30d26a59fd2..e4c565e2447a 100644
@@ -8,6 +8,8 @@ CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P1020RDB_PC=y
 CONFIG_PHYS_64BIT=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1020RDB-PC_NAND_defconfig +2 -0
index 2df2c04eb640..2ea2f00e934a 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P1020RDB_PC=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1020RDB-PD_NAND_defconfig +2 -0
index f4bc8ee943e4..0327e5adc8c1 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P1020RDB_PD=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1021RDB-PC_36BIT_NAND_defconfig +2 -0
index 6a1da36f7fcb..cd73bdd2fb79 100644
@@ -8,6 +8,8 @@ CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P1021RDB=y
 CONFIG_PHYS_64BIT=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1021RDB-PC_NAND_defconfig +2 -0
index 22fc7f115bf4..ada720a75f50 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P1021RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1022DS_36BIT_NAND_defconfig +2 -0
index f919274e2399..62072dc7b95c 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_P1022DS=y
 CONFIG_PHYS_64BIT=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1022DS_NAND_defconfig +2 -0
index 74a68496607e..8089012708b2 100644
@@ -6,6 +6,8 @@ CONFIG_TPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_P1022DS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1024RDB_NAND_defconfig +2 -0
index b0bfb3d64273..a08f5d9667f8 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P1024RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P1025RDB_NAND_defconfig +2 -0
index 8313433a8141..5259a2ff4341 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P1025RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P2020RDB-PC_36BIT_NAND_defconfig +2 -0
index 12e398346e6f..10c27e95ead8 100644
@@ -8,6 +8,8 @@ CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P2020RDB=y
 CONFIG_PHYS_64BIT=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/P2020RDB-PC_NAND_defconfig +2 -0
index 5cfd8e2a7952..89385036461f 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 # CONFIG_CMD_ERRATA is not set
 CONFIG_TARGET_P2020RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1023RDB_NAND_defconfig +2 -0
index a77700b3a389..858d998d1893 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1023RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1024QDS_NAND_defconfig +2 -0
index 79a9210cdd33..5dccb0f550fa 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1024QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1024RDB_NAND_defconfig +2 -0
index 6b3509b17da1..dec004462ba1 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1024RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1040D4RDB_NAND_defconfig +2 -0
index f6c652091906..3087cf62d221 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1040D4RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1040RDB_NAND_defconfig +2 -0
index cebc178f8958..82cec34336c4 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1040RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1042D4RDB_NAND_defconfig +2 -0
index ed90250ae7e6..fefa5ca1d047 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1042D4RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig +2 -0
index e0a4d150ec42..ae81f93d10c7 100644
@@ -8,6 +8,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1042RDB_PI=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T1042RDB_PI_NAND_defconfig +2 -0
index 20b3922ad495..f3ec5e624f81 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T1042RDB_PI=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T2080QDS_NAND_defconfig +2 -0
index eade1096c79b..f7dfb947689c 100644
@@ -8,6 +8,8 @@ CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2080QDS=y
 CONFIG_AHCI=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T2080RDB_NAND_defconfig +2 -0
index 1e12e94ac1ee..3a34df3588f8 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2080RDB=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T2081QDS_NAND_defconfig +2 -0
index cfddbc0a7fdd..da722a86d9a0 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T2081QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T4160QDS_NAND_defconfig +2 -0
index 7af671ca60af..f880a46aae5a 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T4160QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/T4240QDS_NAND_defconfig +2 -0
index 6cc371ad611c..2a98f960ca70 100644
@@ -7,6 +7,8 @@ CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_MPC85xx=y
 CONFIG_TARGET_T4240QDS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
configs/bitmain_antminer_s9_defconfig +2 -0
index 25ea77ef2478..7f432e5720df 100644
@@ -12,6 +12,8 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xEFFFFF0
 CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/syzygy_hub_defconfig +2 -0
index f5c3fe188a99..075045bdc73a 100644
@@ -10,6 +10,8 @@ CONFIG_DEBUG_UART_BASE=0xe0000000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/topic_miami_defconfig +2 -0
index 188c791f3a88..6b126c52c074 100644
@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_CLOCK=100000000
 CONFIG_BOOT_INIT_FILE="board/topic/zynq/zynq-topic-miami/ps7_regs.txt"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_BOOTDELAY=0
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SPI_LOAD=y
configs/topic_miamilite_defconfig +2 -0
index ae65f9c3953b..a0b016c00476 100644
@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_CLOCK=100000000
 CONFIG_BOOT_INIT_FILE="board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_BOOTDELAY=0
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SPI_LOAD=y
configs/topic_miamiplus_defconfig +2 -0
index a5cee6774097..c34b0340720c 100644
@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_CLOCK=100000000
 CONFIG_BOOT_INIT_FILE="board/topic/zynq/zynq-topic-miamiplus/ps7_regs.txt"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_BOOTDELAY=0
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SPI_LOAD=y
configs/zynq_cc108_defconfig +2 -0
index 966bb150d16f..35ebd1448501 100644
@@ -8,6 +8,8 @@ CONFIG_DEBUG_UART_BASE=0xe0000000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_cse_nand_defconfig +2 -0
index 62ed8f73e1ee..fca0382a9017 100644
@@ -8,6 +8,8 @@ CONFIG_ENV_SIZE=0x190
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
 CONFIG_SYS_MALLOC_LEN=0x1000
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 # CONFIG_BOARD_LATE_INIT is not set
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_STACK_R=y
configs/zynq_cse_nor_defconfig +2 -0
index 2e9a54e50ac8..21d7dd556e4f 100644
@@ -8,6 +8,8 @@ CONFIG_ENV_SIZE=0x190
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
 CONFIG_SYS_MALLOC_LEN=0x1000
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 # CONFIG_BOARD_LATE_INIT is not set
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_STACK_R=y
configs/zynq_cse_qspi_defconfig +2 -0
index 2aaa8140cf34..8f9ba072ba7b 100644
@@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_CLOCK=0
 # CONFIG_ZYNQ_DDRC_INIT is not set
 # CONFIG_CMD_ZYNQ is not set
 CONFIG_DEBUG_UART=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
 # CONFIG_BOARD_LATE_INIT is not set
 # CONFIG_DISPLAY_CPUINFO is not set
configs/zynq_dlc20_rev1_0_defconfig +2 -0
index f9d2b31aacfa..944c11381b32 100644
@@ -9,6 +9,8 @@ CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_IDENT_STRING=" Xilinx Zynq DLC20 Rev1.0"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_microzed_defconfig +2 -0
index 5e7ff1666e23..a48f203c1670 100644
@@ -5,6 +5,8 @@ CONFIG_SYS_TEXT_BASE=0x4000000
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_minized_defconfig +2 -0
index f253483b4888..60fe72f04e74 100644
@@ -8,6 +8,8 @@ CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_picozed_defconfig +2 -0
index 0650ce2624af..453cd549c10b 100644
@@ -5,6 +5,8 @@ CONFIG_SYS_TEXT_BASE=0x4000000
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SYS_PROMPT="Zynq> "
configs/zynq_z_turn_defconfig +2 -0
index 4839ee238fc1..d105b71c280c 100644
@@ -8,6 +8,8 @@ CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc702_defconfig +2 -0
index 71559b09b075..3c4103f1f8af 100644
@@ -9,6 +9,8 @@ CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_IDENT_STRING=" Xilinx Zynq ZC702"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc706_defconfig +2 -0
index 132ef6c0d75b..3124de9795f5 100644
@@ -9,6 +9,8 @@ CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_IDENT_STRING=" Xilinx Zynq ZC706"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm010_defconfig +2 -0
index 8ba35cb98309..3b59cf2473cb 100644
@@ -9,6 +9,8 @@ CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_IDENT_STRING=" Xilinx Zynq ZC770 XM010"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm011_defconfig +2 -0
index 84f46a79244c..6d377e94fbe2 100644
@@ -10,6 +10,8 @@ CONFIG_IDENT_STRING=" Xilinx Zynq ZC770 XM011"
 # CONFIG_SPL_FS_FAT is not set
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm011_x16_defconfig +2 -0
index 43ff1f4d16c1..fc2d3f362ca4 100644
@@ -10,6 +10,8 @@ CONFIG_IDENT_STRING=" Xilinx Zynq ZC770 XM011 x16"
 # CONFIG_SPL_FS_FAT is not set
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm012_defconfig +2 -0
index 2adf6868814c..0767e91b07b9 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_IDENT_STRING=" Xilinx Zynq ZC770 XM012"
 # CONFIG_SPL_FS_FAT is not set
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm013_defconfig +2 -0
index ed6506d1ca5e..9eb67cf4ec8d 100644
@@ -7,6 +7,8 @@ CONFIG_SPL=y
 CONFIG_IDENT_STRING=" Xilinx Zynq ZC770 XM013"
 # CONFIG_SPL_FS_FAT is not set
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zed_defconfig +2 -0
index 2da6d40b49fc..b5dbe405e055 100644
@@ -8,6 +8,8 @@ CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zybo_defconfig +2 -0
index b51272b354b1..0ad92849ddef 100644
@@ -8,6 +8,8 @@ CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zybo_z7_defconfig +2 -0
index 4deb14eefa27..d434982df3d8 100644
@@ -8,6 +8,8 @@ CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_CUSTOM_LDSCRIPT=y
+CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
include/configs/B4860QDS.h +0 -1
index 24cd6a426cdc..3ccd0925e2a5 100644
@@ -25,7 +25,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_SKIP_RELOCATE
 #define CONFIG_SPL_COMMON_INIT_DDR
include/configs/BSC9131RDB.h +0 -1
index ee90a840bc94..b5d759ce025d 100644
@@ -30,7 +30,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	(0x00200000 - CONFIG_SPL_MAX_SIZE)
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #endif
 
 #ifdef CONFIG_SPL_BUILD
include/configs/BSC9132QDS.h +0 -1
index 7f04184bd787..1537b45cc1b4 100644
@@ -38,7 +38,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	(0x00200000 - CONFIG_SPL_MAX_SIZE)
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #endif
 
 #ifndef CONFIG_RESET_VECTOR_ADDRESS
include/configs/C29XPCIE.h +0 -1
index 9a484d3e3e41..e9371a025bcd 100644
@@ -41,7 +41,6 @@
 #define CONFIG_SPL_PAD_TO		0x20000
 #define CONFIG_TPL_PAD_TO		0x20000
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #endif
 
 #ifndef CONFIG_RESET_VECTOR_ADDRESS
include/configs/P1010RDB.h +0 -2
index 964d3db3d75c..025aa330835f 100644
@@ -62,7 +62,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	(0x00200000 - CONFIG_SPL_MAX_SIZE)
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #else
 #ifdef CONFIG_TPL_BUILD
 #define CONFIG_SPL_FLUSH_IMAGE
@@ -88,7 +87,6 @@
 #define CONFIG_SPL_PAD_TO	0x20000
 #define CONFIG_TPL_PAD_TO	0x20000
 #define CONFIG_SPL_TARGET	"u-boot-with-spl.bin"
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #endif
 #endif
 
include/configs/P1022DS.h +0 -1
index ac5eee45210d..62943a3b0c58 100644
@@ -69,7 +69,6 @@
 #define CONFIG_SPL_PAD_TO		0x20000
 #define CONFIG_TPL_PAD_TO		0x20000
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #endif
 
 /* High Level Configuration Options */
include/configs/T102xQDS.h +0 -1
index 7c7ffb602537..fe9a9097ce9a 100644
@@ -44,7 +44,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t102xqds/t1024_nand_rcw.cfg
 #endif
 
include/configs/T102xRDB.h +0 -1
index adb440b25a92..5ab51e32338e 100644
@@ -47,7 +47,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	0x30000000
 #define CONFIG_SYS_NAND_U_BOOT_START	0x30000000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #if defined(CONFIG_TARGET_T1024RDB)
 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t102xrdb/t1024_nand_rcw.cfg
 #elif defined(CONFIG_TARGET_T1023RDB)
include/configs/T104xRDB.h +0 -1
index de42d53ef9cc..56ddef07f5ea 100644
@@ -46,7 +46,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	0x30000000
 #define CONFIG_SYS_NAND_U_BOOT_START	0x30000000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #ifdef CONFIG_TARGET_T1040RDB
 #define CONFIG_SYS_FSL_PBL_RCW \
 $(SRCTREE)/board/freescale/t104xrdb/t1040_nand_rcw.cfg
include/configs/T208xQDS.h +0 -1
index 8cdc622ccd53..98bb3342b9db 100644
@@ -51,7 +51,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #if defined(CONFIG_ARCH_T2080)
 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xqds/t2080_nand_rcw.cfg
 #elif defined(CONFIG_ARCH_T2081)
include/configs/T208xRDB.h +0 -1
index 95672d6cfa65..4b53e19fd454 100644
@@ -45,7 +45,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT  "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t208xrdb/t2080_nand_rcw.cfg
 #endif
 
include/configs/T4240QDS.h +0 -1
index 1431d0d2d257..f17625365e14 100644
@@ -31,7 +31,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_DST	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_START	0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	(256 << 10)
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #define CONFIG_SYS_FSL_PBL_RCW board/freescale/t4qds/t4_nand_rcw.cfg
 #endif
 
include/configs/p1_p2_rdb_pc.h +0 -1
index 8fccd6b77933..d9312bd14912 100644
@@ -189,7 +189,6 @@
 #define CONFIG_SPL_PAD_TO		0x20000
 #define CONFIG_TPL_PAD_TO		0x20000
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
-#define CONFIG_SYS_LDSCRIPT	"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
 #endif
 
 #ifndef CONFIG_RESET_VECTOR_ADDRESS
include/configs/zynq-common.h +0 -2
index 143dc7bb2247..b51914d1e02d 100644
@@ -276,8 +276,6 @@
 /* Boot FreeBSD/vxWorks from an ELF image */
 #define CONFIG_SYS_MMC_MAX_DEVICE	1
 
-#define CONFIG_SYS_LDSCRIPT  "arch/arm/mach-zynq/u-boot.lds"
-
 /* MMC support */
 #ifdef CONFIG_MMC_SDHCI_ZYNQ
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
scripts/config_whitelist.txt +0 -1
index 16cbfd98e1b1..22743b6ea105 100644
@@ -3145,7 +3145,6 @@ CONFIG_SYS_LBC_SDRAM_SIZE
 CONFIG_SYS_LB_SDRAM
 CONFIG_SYS_LCD_BASE
 CONFIG_SYS_LDB_CLOCK
-CONFIG_SYS_LDSCRIPT
 CONFIG_SYS_LED_BASE
 CONFIG_SYS_LED_DISP_BASE
 CONFIG_SYS_LIME_BASE
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH 2/2 configs: Migrate CONFIG_SYS_LDSCRIPT to Kconfig

Quoted 5 lines · Tom Rini

In order to migrate this symbol to Kconfig introduce a new symbol to guard it, CONFIG_SYS_CUSTOM_LDSCRIPT. When that is set we can then provide the exact final location o the script.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190615/f53e826d/attachment.sig>