Make STANDALONE_LOAD_ADDR configurable per board
Subsystems (8)
PATCH 1/1 Make STANDALONE_LOAD_ADDR configurable per board
Rename STANDALONE_LOAD_ADDR into CONFIG_STANDALONE_LOAD_ADDR and allow that the architecture-specific default value gets overwritten by defining the value in the board header file.
---
Note that some architectures (blackfin, coldfire, mips, sh, sparc) misuse the CONFIG_STANDALONE_LOAD_ADDR variable to not only specify the load address (as the name suggests), but also to supply additional linker options:
arch/blackfin/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?= 0x1000 -m elf32bfin arch/m68k/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?= 0x20000 -L $(clibdir) arch/mips/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds arch/sh/config.mk:CONFIG_STANDALONE_LOAD_ADDR += -EB arch/sparc/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) -T sparc.lds
Please clean this up! Thanks -- wd
README | 8 ++++++++ arch/arm/config.mk | 8 +++----- arch/avr32/config.mk | 2 +- arch/blackfin/config.mk | 2 +- arch/i386/config.mk | 2 +- arch/m68k/config.mk | 2 +- arch/microblaze/config.mk | 2 +- arch/mips/config.mk | 2 +- arch/powerpc/config.mk | 2 +- arch/sh/config.mk | 4 ++-- arch/sparc/config.mk | 2 +- examples/standalone/Makefile | 2 +- include/configs/omap2420h4.h | 2 ++ 13 files changed, 24 insertions(+), 16 deletions(-)
README +8 -0
@@ -1952,6 +1952,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
arch/arm/config.mk +3 -5
@@ -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
arch/avr32/config.mk +1 -1
@@ -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
arch/blackfin/config.mk +1 -1
@@ -23,7 +23,7 @@ CROSS_COMPILE ?= bfin-uclinux- -STANDALONE_LOAD_ADDR = 0x1000 -m elf32bfin +CONFIG_STANDALONE_LOAD_ADDR ?= 0x1000 -m elf32bfin CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
arch/i386/config.mk +1 -1
@@ -23,7 +23,7 @@ CROSS_COMPILE ?= i386-linux- -STANDALONE_LOAD_ADDR = 0x40000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 PLATFORM_CPPFLAGS += -fno-strict-aliasing PLATFORM_CPPFLAGS += -Wstrict-prototypes
arch/m68k/config.mk +1 -1
@@ -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
arch/microblaze/config.mk +1 -1
@@ -26,6 +26,6 @@ CROSS_COMPILE ?= mb- -STANDALONE_LOAD_ADDR = 0x80F00000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
arch/mips/config.mk +1 -1
@@ -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__
arch/powerpc/config.mk +1 -1
@@ -23,7 +23,7 @@ CROSS_COMPILE ?= ppc_8xx- -STANDALONE_LOAD_ADDR = 0x40000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 LDFLAGS_u-boot = --gc-sections PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
arch/sh/config.mk +2 -2
@@ -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__
arch/sparc/config.mk +1 -1
@@ -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__
examples/standalone/Makefile +1 -1
@@ -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
include/configs/omap2420h4.h +2 -0
@@ -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 */
Signature · 1 line
1.7.3.4
Wolfgang Denk
AppliedPATCH 1/1 Make STANDALONE_LOAD_ADDR configurable per board
Dear Wolfgang Denk,
Quoted 16 lines · In message <[email protected]> you wrote:
Rename
STANDALONE_LOAD_ADDRintoCONFIG_STANDALONE_LOAD_ADDRand allow that the architecture-specific default value gets overwritten by defining the value in the board header file.Signed-off-by Wolfgang Denk <[email protected]>Cc Mike Frysinger <[email protected]>Cc Shinya Kuribayashi <[email protected]>Cc Daniel Hellstrom <[email protected]>Cc Tsi Chung Liew <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>---
Note that some architectures (blackfin, coldfire, mips, sh, sparc) misuse theCONFIG_STANDALONE_LOAD_ADDRvariable to not only specify the load address (as the name suggests), but also to supply additional linker options:
Quoted 7 lines
arch/blackfin/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?=
0x1000-m elf32bfin arch/m68k/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?=0x20000-L $(clibdir) arch/mips/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?=0x80200000-Tmips.ldsarch/sh/config.mk:CONFIG_STANDALONE_LOAD_ADDR += -EB arch/sparc/config.mk:CONFIG_STANDALONE_LOAD_ADDR ?=0x00000000-L $(gcclibdir) -Tsparc.ldsPlease clean this up! Thanks -- wd
Applied.
[Custodians: please re-read the note!]
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Operating-system software is the program that orchestrates all the basic functions of a computer. - The Wall Street Journal, Tuesday, September 15, 1987, page 40
PATCH 1/1 nios2: Make STANDALONE_LOAD_ADDR configurable per board
In reply to Wolfgang DenkFollow commit 8ae86b76c648d8bef97241c78e2fddb1c4f164d3 which changed the variable name.
Fix this error,
nios2-elf-ld: invalid hex number `-o'
---
for u-boot
arch/nios2/config.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/nios2/config.mk +1 -1
@@ -24,7 +24,7 @@ CROSS_COMPILE ?= nios2-elf- -STANDALONE_LOAD_ADDR ?= 0x02000000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x02000000 PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__ PLATFORM_CPPFLAGS += -G0
Signature · 1 line
1.7.1.86.g0e460
PATCH 1/1 nios2: Make STANDALONE_LOAD_ADDR configurable per board
Thomas,
Applied to git://git.denx.de/u-boot-nios.git next
Thanks,
--Scott
Quoted 26 lines · Thomas Chou
Follow commit
8ae86b76c648d8bef97241c78e2fddb1c4f164d3which changed the variable name.Fix this error,
nios2-elf-ld: invalid hex number `-o'Signed-off-by Thomas Chou <[email protected]>---
for u-bootarch/nios2/config.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/nios2/config.mk +1
-1@@ -24,7 +24,7 @@ CROSS_COMPILE ?= nios2-elf- -STANDALONE_LOAD_ADDR ?= 0x02000000 +CONFIG_STANDALONE_LOAD_ADDR ?= 0x02000000 PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__ PLATFORM_CPPFLAGS += -G0