summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-09-03 23:12:47 -0400
committerTom Rix <Tom.Rix@windriver.com>2009-10-03 09:04:14 -0500
commit8eb7e2801431910b56302c58da815e55cfa8c041 (patch)
tree4def2a35ff0e17cc2531f384ee927ad37b575b1d /examples
parentaa0c9e34d5ab869b3e1ca1fea56b79d458f1a22f (diff)
downloadu-boot-imx-8eb7e2801431910b56302c58da815e55cfa8c041.zip
u-boot-imx-8eb7e2801431910b56302c58da815e55cfa8c041.tar.gz
u-boot-imx-8eb7e2801431910b56302c58da815e55cfa8c041.tar.bz2
push LOAD_ADDR out to arch mk files
Rather than maintain/extend the current ifeq($(ARCH)) mess that exists in the standalone Makefile, push the setting up of LOAD_ADDR out to the arch config.mk (and rename to STANDALONE_LOAD_ADDR in the process). This keeps the common code clean and lets the arch do whatever crazy crap it wants in its own area. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/standalone/Makefile65
1 files changed, 1 insertions, 64 deletions
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index 9a9b6c3..bc98120 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -21,65 +21,6 @@
# MA 02111-1307 USA
#
-ifeq ($(ARCH),ppc)
-LOAD_ADDR = 0x40000
-endif
-
-ifeq ($(ARCH),i386)
-LOAD_ADDR = 0x40000
-endif
-
-ifeq ($(ARCH),arm)
-ifeq ($(BOARD),omap2420h4)
-LOAD_ADDR = 0x80300000
-else
-ifeq ($(SOC),omap3)
-LOAD_ADDR = 0x80300000
-else
-LOAD_ADDR = 0xc100000
-endif
-endif
-endif
-
-ifeq ($(ARCH),mips)
-LOAD_ADDR = 0x80200000 -T mips.lds
-endif
-
-ifeq ($(ARCH),nios)
-LOAD_ADDR = 0x00800000 -L $(gcclibdir)/m32 -T nios.lds
-endif
-
-ifeq ($(ARCH),nios2)
-LOAD_ADDR = 0x02000000 -L $(gcclibdir) -T nios2.lds
-endif
-
-ifeq ($(ARCH),m68k)
-LOAD_ADDR = 0x20000 -L $(clibdir)
-endif
-
-ifeq ($(ARCH),microblaze)
-LOAD_ADDR = 0x80F00000
-endif
-
-ifeq ($(ARCH),blackfin)
-LOAD_ADDR = 0x1000
-endif
-
-ifeq ($(ARCH),avr32)
-LOAD_ADDR = 0x00000000
-endif
-
-ifeq ($(ARCH),sh)
-LOAD_ADDR = 0x8C000000
-ifeq ($(CPU),sh2)
-BIG_ENDIAN=y
-endif
-endif
-
-ifeq ($(ARCH),sparc)
-LOAD_ADDR = 0x00000000 -L $(gcclibdir) -T sparc.lds
-endif
-
include $(TOPDIR)/config.mk
ELF = hello_world
@@ -143,9 +84,6 @@ SREC += eepro100_eeprom.srec
BIN += eepro100_eeprom.bin
endif
-ifeq ($(BIG_ENDIAN),y)
-EX_LDFLAGS += -EB
-endif
COBJS := $(SREC:.srec=.o)
@@ -168,7 +106,6 @@ BIN := $(addprefix $(obj),$(BIN))
SREC := $(addprefix $(obj),$(SREC))
gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
-clibdir := $(shell dirname `$(CC) $(CFLAGS) -print-file-name=libc.a`)
CPPFLAGS += -I..
@@ -180,7 +117,7 @@ $(LIB): $(obj).depend $(LIBOBJS)
$(ELF):
$(obj)%: $(obj)%.o $(LIB)
- $(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
+ $(LD) -g -Ttext $(STANDALONE_LOAD_ADDR) \
-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
-L$(gcclibdir) -lgcc