[U-Boot] [Patch 1/17] add mips64 build configuration in mips/config.mk

Zhi-zhou Zhang etou.zh at gmail.com
Tue Aug 14 17:07:21 CEST 2012


diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index 6ab8acd..12df150 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -23,9 +23,13 @@

 CROSS_COMPILE ?= mips_4KC-

+ifeq "$(CPU)" "mips64"
+CONFIG_STANDALONE_LOAD_ADDR ?= 0xFfffFfff80200000 -T mips64.lds
+PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ -DCONFIG_64BIT
+else
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds
-
 PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
+endif

 #
 # From Linux arch/mips/Makefile
@@ -47,8 +51,16 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
 # On the other hand, we want PIC in the U-Boot code to relocate it from ROM
 # to RAM. $28 is always used as gp.
 #
+ifeq "$(CPU)" "mips64"
+PLATFORM_CPPFLAGS += -G 0 -mabicalls -mabi=64 -fpic
+PLATFORM_CPPFLAGS += -msoft-float
+PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib -m elf64ltsmip
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+LDFLAGS_FINAL += --gc-sections
+else
 PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic
 PLATFORM_CPPFLAGS += -msoft-float
 PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 LDFLAGS_FINAL += --gc-sections
+endif

-- 
Regards,
Zhizhou Zhang


More information about the U-Boot mailing list