From 83b7e2a7f2f9cf7651e623c75aa9a27ad6488fb3 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Wed, 6 Apr 2011 13:31:37 +0000 Subject: Handle most LDSCRIPT setting centrally Currently, some linker scripts are found by common code in config.mk. Some are found using CONFIG_SYS_LDSCRIPT, but the code for that is sometimes in arch config.mk and sometimes in board config.mk. Some are found using an arch-specific rule for looking in CPUDIR, etc. Further, the powerpc config.mk rule relied on CONFIG_NAND_SPL when it really wanted CONFIG_NAND_U_BOOT -- which covered up the fact that not all NAND_U_BOOT builds actually wanted CPUDIR/u-boot-nand.lds. Replace all of this -- except for a handful of boards that are actually selecting a linker script in a unique way -- with centralized ldscript finding. If board code specifies LDSCRIPT, that will be used. Otherwise, if CONFIG_SYS_LDSCRIPT is specified, that will be used. If neither of these are specified, then the central config.mk will check for the existence of the following, in order: $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT) $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT) $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds $(TOPDIR)/$(CPUDIR)/u-boot.lds Some boards (sc3, cm5200, munices) provided their own u-boot.lds that were dead code, because they were overridden by a CPUDIR u-boot.lds under the old powerpc rules. These boards' own u-boot.lds have bitrotted and no longer work -- these lds files have been removed. Signed-off-by: Scott Wood Tested-by: Graeme Russ --- board/amcc/acadia/config.mk | 7 ------- board/amcc/bamboo/config.mk | 7 ------- board/amcc/canyonlands/config.mk | 7 ------- board/amcc/kilauea/config.mk | 7 ------- board/amcc/sequoia/config.mk | 7 ------- 5 files changed, 35 deletions(-) (limited to 'board/amcc') diff --git a/board/amcc/acadia/config.mk b/board/amcc/acadia/config.mk index 2f2787f112..bfc0945704 100644 --- a/board/amcc/acadia/config.mk +++ b/board/amcc/acadia/config.mk @@ -28,10 +28,3 @@ ifeq ($(debug),1) PLATFORM_CPPFLAGS += -DDEBUG endif - -ifdef CONFIG_SYS_LDSCRIPT -# need to strip off double quotes -LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) -else ifdef CONFIG_NAND_U_BOOT -LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds -endif diff --git a/board/amcc/bamboo/config.mk b/board/amcc/bamboo/config.mk index 7ca16a0663..24f74e1213 100644 --- a/board/amcc/bamboo/config.mk +++ b/board/amcc/bamboo/config.mk @@ -30,10 +30,3 @@ endif ifeq ($(dbcr),1) PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000 endif - -ifdef CONFIG_SYS_LDSCRIPT -# need to strip off double quotes -LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) -else ifdef CONFIG_NAND_U_BOOT -LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds -endif diff --git a/board/amcc/canyonlands/config.mk b/board/amcc/canyonlands/config.mk index abf2a26808..d693a26b81 100644 --- a/board/amcc/canyonlands/config.mk +++ b/board/amcc/canyonlands/config.mk @@ -33,10 +33,3 @@ endif ifeq ($(dbcr),1) PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000 endif - -ifdef CONFIG_SYS_LDSCRIPT -# need to strip off double quotes -LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) -else ifdef CONFIG_NAND_U_BOOT -LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds -endif diff --git a/board/amcc/kilauea/config.mk b/board/amcc/kilauea/config.mk index 4ae3ea9265..003b8c3b81 100644 --- a/board/amcc/kilauea/config.mk +++ b/board/amcc/kilauea/config.mk @@ -24,10 +24,3 @@ ifeq ($(debug),1) PLATFORM_CPPFLAGS += -DDEBUG endif - -ifdef CONFIG_SYS_LDSCRIPT -# need to strip off double quotes -LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) -else ifdef CONFIG_NAND_U_BOOT -LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds -endif diff --git a/board/amcc/sequoia/config.mk b/board/amcc/sequoia/config.mk index 73efe727d2..e0bf07115f 100644 --- a/board/amcc/sequoia/config.mk +++ b/board/amcc/sequoia/config.mk @@ -33,10 +33,3 @@ endif ifeq ($(dbcr),1) PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000 endif - -ifdef CONFIG_SYS_LDSCRIPT -# need to strip off double quotes -LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) -else ifdef CONFIG_NAND_U_BOOT -LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds -endif -- cgit v1.2.1