[U-Boot] [PATCH] [mips] add $(ENDIANNESS) option when link hello_world example

Xiangfu Liu xiangfu at openmobilefree.net
Wed Jul 21 12:27:25 CEST 2010


Hi

form the document about OUTPUT_FORMAT(default, big, little)
If neither -EB nor -EL are used, output format will be the first argument. 
If -EB is used, the output format will be the second argument. 
If -EL is used, the output format will be the third argument. 

so change the mips.lds third argument to little and add
$(ENDIANNESS) to linker args.

this patch have tested with "./MAKEALL mips mips_el"


Signed-off-by: Xiangfu Liu <xiangfu at openmobilefree.net>
---
 arch/mips/config.mk          |    2 +-
 examples/standalone/mips.lds |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index aa06761..cc3719f 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
+STANDALONE_LOAD_ADDR = 0x80200000 -T mips.lds $(ENDIANNESS)
 
 PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
 
diff --git a/examples/standalone/mips.lds b/examples/standalone/mips.lds
index 717b201..63a1c92 100644
--- a/examples/standalone/mips.lds
+++ b/examples/standalone/mips.lds
@@ -24,7 +24,7 @@
 /*
 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
 */
-OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
+OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
 OUTPUT_ARCH(mips)
 SECTIONS
 {
-- 
1.7.0.4



More information about the U-Boot mailing list