summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorsascha <sascha@nomad.localdomain>2007-10-17 12:21:53 +0200
committersascha <sascha@nomad.localdomain>2007-10-17 12:21:53 +0200
commitd59ca7feb3220ae846a10b6f7da0712e2c1feae3 (patch)
tree5be088d4b9a0b5c8a2101faffc1ca17a668c63e5 /arch/arm
parentb36fca0cb81493c26825d4f1df1c61bebd5df942 (diff)
downloadbarebox-d59ca7feb3220ae846a10b6f7da0712e2c1feae3.tar.gz
barebox-d59ca7feb3220ae846a10b6f7da0712e2c1feae3.tar.xz
Linking: Remove linker scripts from (arm based-) boards and add
a generic linker script to arch/arm/lib/u-boot.lds.S. If a board wants to overwrite a linker script it can do so using CONFIG_BOARD_LINKER_SCRIPT. There is no generic linker script for ppc and blackfin yet, so still use the board specific one.
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig9
-rw-r--r--arch/arm/Makefile4
-rw-r--r--arch/arm/lib/Makefile2
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5392322691..41f9fc81da 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -16,6 +16,15 @@ config BOARDINFO
config BOARDINFO
default "Phytec Phycore MX27" if MACH_PCM038
+config BOARD_LINKER_SCRIPT
+ bool
+ default n
+
+config GENERIC_LINKER_SCRIPT
+ bool
+ default y
+ depends on !BOARD_LINKER_SCRIPT
+
config ARM
bool
select HAS_KALLSYMS
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index f838d3743d..fb81d237e5 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -77,4 +77,8 @@ endif
common-y += $(BOARD) $(MACH)
common-y += arch/arm/lib/ arch/arm/cpu/
+lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/arm/lib/u-boot.lds
+lds-$(CONFIG_BOARD_LINKER_SCRIPT) := $(BOARD)/u-boot.lds
+
+CLEAN_FILES += arch/arm/lib/u-boot.lds
MRPROPER_FILES += include/asm-arm/arch include/asm-arm/proc
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 5c207457e4..9656ca81d9 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -10,3 +10,5 @@ obj-y += _umodsi3.o
obj-y += _lshrdi3.o
obj-y += arm.o
obj-$(CONFIG_MODULES) += module.o
+extra-$(CONFIG_GENERIC_LINKER_SCRIPT) += u-boot.lds
+