spl: add hierarchical defaults for SPL_LDSCRIPT
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Thu, 3 Aug 2017 21:23:55 +0000 (23:23 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 13 Aug 2017 15:12:37 +0000 (17:12 +0200)
With SPL_LDSCRIPT moved to Kconfig (and this being a 'string' config
node), all the lingering definitions in header files will cause
warnings/errors due to the redefinition of the configuration item.

As we don't want to pollute the defconfig files (and values should
usually be identical for entire architectures), the defaults are moved
into Kconfig.  Kconfig will always pick the first default that
matches, so please keep these values at the end of each file (to allow
any board-specific Kconfig, which will be included earlier) to
override with an unconditional default setting.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 files changed:
arch/arm/Kconfig
arch/arm/cpu/armv8/fsl-layerscape/Kconfig
arch/arm/mach-at91/Kconfig
arch/arm/mach-davinci/Kconfig
arch/arm/mach-exynos/Kconfig
arch/arm/mach-omap2/Kconfig
arch/arm/mach-orion5x/Kconfig
arch/arm/mach-sunxi/Kconfig
arch/arm/mach-zynq/Kconfig
arch/microblaze/Kconfig
board/armadeus/apf27/Kconfig
board/freescale/mx31pdk/Kconfig
board/spear/x600/Kconfig

index 61d8d31ee2e3e7c4002b8b2f1e029a6f15766827..39b001fd531fb21f9cdbdce838fdb6ec13ac5bfc 100644 (file)
@@ -618,6 +618,11 @@ config ARCH_MX6
        select SYS_FSL_SEC_LE
        select SYS_THUMB_BUILD if SPL
 
+if ARCH_MX6
+config SPL_LDSCRIPT
+        default "arch/arm/mach-omap2/u-boot-spl.lds"
+endif
+
 config ARCH_MX5
        bool "Freescale MX5"
        select CPU_V7
@@ -1233,3 +1238,10 @@ source "board/zipitz2/Kconfig"
 source "arch/arm/Kconfig.debug"
 
 endmenu
+
+config SPL_LDSCRIPT
+        default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if TARGET_APX4DEVKIT || TARGET_BG0900 || TARGET_M28EVK || TARGET_MX23_OLINUXINO || TARGET_MX23EVK || TARGET_MX28EVK || TARGET_SANSA_FUZE_PLUS || TARGET_SC_SPS_1 || TARGET_TS4600 || TARGET_XFI3
+        default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
+       default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
+
+
index 1b98f5a95513a860c2d6d654934a69df0522e79a..cdeef26fe5d4fd27f4ab55bd81070f1ea96232ae 100644 (file)
@@ -393,3 +393,6 @@ config SYS_MC_RSV_MEM_ALIGN
        help
          Reserved memory needs to be aligned for MC to use. Default value
          is 512MB.
+
+config SPL_LDSCRIPT
+       default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A
index 23ddc6296d896ab4cd827f23ff923ad8ccf24a33..20f7eeaf0913285c8a5d44a03631d20996f5a727 100644 (file)
@@ -199,4 +199,8 @@ source "board/siemens/corvus/Kconfig"
 source "board/siemens/taurus/Kconfig"
 source "board/siemens/smartweb/Kconfig"
 
+config SPL_LDSCRIPT
+       default "arch/arm/mach-at91/arm926ejs/u-boot-spl.lds" if CPU_ARM926EJS
+       default "arch/arm/mach-at91/armv7/u-boot-spl.lds" if CPU_V7
+
 endif
index 4757f2496dfc836c65c5c7283bc796e21f20e9cb..35e4e9bcea927319e9ef9502f4a6e3a6d854ae55 100644 (file)
@@ -53,4 +53,8 @@ source "board/davinci/ea20/Kconfig"
 source "board/omicron/calimain/Kconfig"
 source "board/lego/ev3/Kconfig"
 
+config SPL_LDSCRIPT
+       default "board/$(BOARDDIR)/u-boot-spl-ipam390.lds" if TARGET_IPAM390
+       default "board/$(BOARDDIR)/u-boot-spl-da850evm.lds"
+
 endif
index d1aa68db20def848a092d37c7ee779694867de84..8b1389f30f23a204b99e57cabdf94c847a67bbe9 100644 (file)
@@ -161,4 +161,7 @@ source "board/samsung/smdk5250/Kconfig"
 source "board/samsung/smdk5420/Kconfig"
 source "board/samsung/espresso7420/Kconfig"
 
+config SPL_LDSCRIPT
+       default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4
+
 endif
index 89c91d1b7782796d3cb221cc9dd06019acc20904..72832ad09944440c040d3d1649042b1ef5dac306 100644 (file)
@@ -170,4 +170,7 @@ source "board/ti/am335x/Kconfig"
 source "board/compulab/cm_t335/Kconfig"
 source "board/compulab/cm_t43/Kconfig"
 
+config SPL_LDSCRIPT
+        default "arch/arm/mach-omap2/u-boot-spl.lds"
+
 endif
index 7644b8dc854b3ac5086bfc7cce41c8f95b6528ca..2984a3edda21cea233362dc8b5b95aeb08dc4f6e 100644 (file)
@@ -15,4 +15,7 @@ config SYS_SOC
 
 source "board/LaCie/edminiv2/Kconfig"
 
+config SPL_LDSCRIPT
+       default "$(CPUDIR)/orion5x/u-boot-spl.lds" if ORION5X
+
 endif
index 94412bac0c1df717216e1412c1f286391257cd80..386befb4e7b893ee8920973f31395f853c24b55d 100644 (file)
@@ -1,5 +1,8 @@
 if ARCH_SUNXI
 
+config SPL_LDSCRIPT
+       default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if !ARM64
+
 config IDENT_STRING
        default " Allwinner Technology"
 
index c428ce5cc70b35d738060e14350ad63b7713c957..b9cd45ba095f311a73f1bbf329698bda9be92d9b 100644 (file)
@@ -1,5 +1,8 @@
 if ARCH_ZYNQ
 
+config SPL_LDSCRIPT
+       default "arch/arm/mach-zynq/u-boot-spl.lds"
+
 config SPL_FAT_SUPPORT
        default y
 
index 20fa25b5ccb2a3ccc07db03f5a1f0496d00aeab5..f791c0081eab3e12aba3d6b30b9fc6b23e1b9635 100644 (file)
@@ -21,4 +21,7 @@ endchoice
 
 source "board/xilinx/microblaze-generic/Kconfig"
 
+config SPL_LDSCRIPT
+       default "arch/microblaze/cpu/u-boot-spl.lds"
+
 endmenu
index 65544a844834eb7288213a5e3ee66aef4177e296..a342d2e05ec51fcf4772e84665d48080eca85f20 100644 (file)
@@ -1,5 +1,8 @@
 if TARGET_APF27
 
+config SPL_LDSCRIPT
+       default "arch/$(ARCH)/cpu/u-boot-spl.lds"
+
 config SYS_BOARD
        default "apf27"
 
index 055545c93063c5641ab7bd8fd283981b9bf808a3..b9fc2d51778628ef5de6996572a8a0086a8a9406 100644 (file)
@@ -1,5 +1,8 @@
 if TARGET_MX31PDK
 
+config SPL_LDSCRIPT
+       default "arch/$(ARCH)/cpu/u-boot-spl.lds"
+
 config SYS_BOARD
        default "mx31pdk"
 
index 6a1c5c7b40143f49d8191b046eda13364fd25ed9..59f2b1ef561578c888b5baab4e68e701ff56b978 100644 (file)
@@ -1,5 +1,8 @@
 if TARGET_X600
 
+config SPL_LDSCRIPT
+       default "arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds"
+
 config SYS_BOARD
        default "x600"