diff --git a/README b/README index c128a6c5b56f01fcc897b82060a5f536a2ed2d4a..c9fedd8011e227562b1dad777c139aa9a0c33dca 100644 --- a/README +++ b/README @@ -1997,6 +1997,14 @@ The following options need to be configured: example, some LED's) on your board. At the moment, the following checkpoints are implemented: +- Standalone program support: + CONFIG_STANDALONE_LOAD_ADDR + + This option allows to define board specific values + for the address where standalone program gets loaded, + thus overwriting the architecutre dependent default + settings. + Legacy uImage format: Arg Where When diff --git a/arch/arm/config.mk b/arch/arm/config.mk index a6a47424518d1a2c5169377a6c8b714eef268a81..fcc26a2f3006023ad74ce77c51614b9f076c00e6 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -23,13 +23,11 @@ CROSS_COMPILE ?= arm-linux- -ifeq ($(BOARD),omap2420h4) -STANDALONE_LOAD_ADDR = 0x80300000 -else +ifndef CONFIG_STANDALONE_LOAD_ADDR ifeq ($(SOC),omap3) -STANDALONE_LOAD_ADDR = 0x80300000 +CONFIG_STANDALONE_LOAD_ADDR = 0x80300000 else -STANDALONE_LOAD_ADDR = 0xc100000 +CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif endif diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk index 1121ca1cc253f0d05eeacab26a7a54a663db072c..9488c49132832e02a6d9d80f539012be5755193b 100644 --- a/arch/avr32/config.mk +++ b/arch/avr32/config.mk @@ -23,7 +23,7 @@ CROSS_COMPILE ?= avr32-linux- -STANDALONE_LOAD_ADDR = 0x00000000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got -mrelax PLATFORM_LDFLAGS += --relax diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk index 95cf7db2b400174a96b1e3a065a6aeb067e0b964..f0909e95d2e1e7230d24a18e739dfda0339f1e27 100644 --- a/arch/blackfin/config.mk +++ b/arch/blackfin/config.mk @@ -23,7 +23,7 @@ CROSS_COMPILE ?= bfin-uclinux- -STANDALONE_LOAD_ADDR = 0x1000 -m elf32bfin +CONFIG_STANDALONE_LOAD_ADDR ?= 0x1000 -m elf32bfin ifeq ($(CONFIG_BFIN_CPU),) CONFIG_BFIN_CPU := \ diff --git a/arch/i386/config.mk b/arch/i386/config.mk index 47e0fb4c789bfdeacf9dedb2375328866979d53d..e9452012a66aa8bb246939202a43c7b7b848e0ed 100644 --- a/arch/i386/config.mk +++ b/arch/i386/config.mk @@ -21,7 +21,7 @@ # MA 02111-1307 USA # -STANDALONE_LOAD_ADDR = 0x40000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 PLATFORM_CPPFLAGS += -fno-strict-aliasing PLATFORM_CPPFLAGS += -Wstrict-prototypes diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk index 749c38968ab1823cb403d2a063e7c73fad0a77a0..863f3ddbc6a641566632706e367b223c6a1ab606 100644 --- a/arch/m68k/config.mk +++ b/arch/m68k/config.mk @@ -24,7 +24,7 @@ CROSS_COMPILE ?= m68k-elf- clibdir = $(shell dirname `$(CC) $(CFLAGS) -print-file-name=libc.a`) -STANDALONE_LOAD_ADDR = 0x20000 -L $(clibdir) +CONFIG_STANDALONE_LOAD_ADDR ?= 0x20000 -L $(clibdir) PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__ PLATFORM_LDFLAGS += -n diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk index c3c9f958c0b1dac5b6d9170bb09507870d8e491c..abea70bb0d79ebf455d803aa407c10b212217a7b 100644 --- a/arch/microblaze/config.mk +++ b/arch/microblaze/config.mk @@ -26,6 +26,6 @@ CROSS_COMPILE ?= mb- -STANDALONE_LOAD_ADDR = 0x80F00000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__ diff --git a/arch/mips/config.mk b/arch/mips/config.mk index aa06761ae35f9ac994487265e9cc13271cd7b77b..318d34b1e6887198bea8d15ff9df09b28a2ded8a 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -23,7 +23,7 @@ CROSS_COMPILE ?= mips_4KC- -STANDALONE_LOAD_ADDR = 0x80200000 -T mips.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk index 8d72fbd7ecdcbdad4f9fd7faed510887a270b479..3afc439e58c575d1d92da994badcbbd1da8dbbc2 100644 --- a/arch/powerpc/config.mk +++ b/arch/powerpc/config.mk @@ -23,7 +23,7 @@ CROSS_COMPILE ?= ppc_8xx- -STANDALONE_LOAD_ADDR = 0x40000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 LDFLAGS_FINAL += --gc-sections PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections PLATFORM_RELFLAGS += $(call cc-option,-msingle-pic-base,) diff --git a/arch/sh/config.mk b/arch/sh/config.mk index cd851f59c49eaaa06e349c0970b33cb4e360f549..af57307574f3c260612a62fda351d21f7e037748 100644 --- a/arch/sh/config.mk +++ b/arch/sh/config.mk @@ -23,9 +23,9 @@ CROSS_COMPILE ?= sh4-linux- -STANDALONE_LOAD_ADDR = 0x8C000000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x8C000000 ifeq ($(CPU),sh2) -STANDALONE_LOAD_ADDR += -EB +CONFIG_STANDALONE_LOAD_ADDR += -EB endif PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ diff --git a/arch/sparc/config.mk b/arch/sparc/config.mk index 4de6515ef49d187038188573cc152eddabd40a69..cae7478e28055eaab7a76b428a683e281d8028be 100644 --- a/arch/sparc/config.mk +++ b/arch/sparc/config.mk @@ -23,6 +23,6 @@ CROSS_COMPILE ?= sparc-elf- -STANDALONE_LOAD_ADDR = 0x00000000 -L $(gcclibdir) -T sparc.lds +CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) -T sparc.lds PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__ diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index c1dfdce581d8f1823754ab8089ac1b304c52eb58..66b5d24f032b812fac4ac65a080277ab47cd385b 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -95,7 +95,7 @@ $(LIB): $(obj).depend $(LIBOBJS) $(ELF): $(obj)%: $(obj)%.o $(LIB) - $(LD) -g -Ttext $(STANDALONE_LOAD_ADDR) \ + $(LD) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ -L$(gcclibdir) -lgcc diff --git a/include/configs/omap2420h4.h b/include/configs/omap2420h4.h index 7161ab18ca38167794172040799f7afbc9ef7893..2888c7bfbc6f6143467db80aae11f5fe901d95c4 100644 --- a/include/configs/omap2420h4.h +++ b/include/configs/omap2420h4.h @@ -38,6 +38,8 @@ /*#define CONFIG_APTIX 1 #* define if on APTIX test chip */ /*#define CONFIG_VIRTIO 1 #* Using Virtio simulator */ +#define CONFIG_STANDALONE_LOAD_ADDR 0x80300000 + /* Clock config to target*/ #define PRCM_CONFIG_II 1 /* #define PRCM_CONFIG_III 1 */