update the MIPS u-boot.lds
A message that is not in the archive (sent off-list or not yet received): 1281366824-18811-1-git-send-email-y
PATCH 1/2 update the MIPS u-boot.lds
A message that is not in the archive (sent off-list or not yet received): 1281366824-18811-2-git-send-email-y
PATCH 2/2 change the way of build little endian board
add CONFIG_CPU_LITTLE_ENDIAN to little endian board config. use -dumpmachine to check if the cross compile.
--- Makefile | 1 + arch/mips/config.mk | 27 +++++++++++++++++++++++++-- arch/mips/cpu/config.mk | 8 -------- include/configs/pb1x00.h | 2 ++ 4 files changed, 28 insertions(+), 10 deletions(-)
Makefile +1 -0
@@ -2306,6 +2306,7 @@ dbau1550_config : unconfig dbau1550_el_config : unconfig @mkdir -p $(obj)include @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h + @echo "#define CONFIG_CPU_LITTLE_ENDIAN" >>$(obj)include/config.h @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 gth2_config : unconfig
arch/mips/config.mk +25 -2
@@ -23,8 +23,6 @@ CROSS_COMPILE ?= mips_4KC- -STANDALONE_LOAD_ADDR = 0x80200000 -T mips.lds - PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ #
@@ -50,3 +48,28 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic PLATFORM_CPPFLAGS += -msoft-float PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib + +# +# We explicitly add the endianness specifier if needed, this allows +# to compile kernels with a toolchain for the other endianness. We +# carefully avoid to add it redundantly because gcc 3.3/3.4 complains +# when fed the toolchain default! +# +# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of +# 2006-10-10 don't properly change the predefined symbols if -EB / -EL +# are used, so we kludge that here. A bug has been filed at +# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413. +# +UNDEF_ALL += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ +UNDEF_ALL += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ +PREDEF_BE += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__ +PREDEF_LE += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__ +ifdef CONFIG_CPU_LITTLE_ENDIAN +PLATFORM_CPPFLAGS += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(UNDEF_ALL) $(PREDEF_LE)) +PLATFORM_LDFLAGS += -EL +else +PLATFORM_CPPFLAGS += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(UNDEF_ALL) $(PREDEF_BE)) +PLATFORM_LDFLAGS += -EB +endif + +STANDALONE_LOAD_ADDR = 0x80200000 -T mips.lds $(PLATFORM_LDFLAGS)
arch/mips/cpu/config.mk +0 -8
@@ -28,12 +28,4 @@ else \ echo "-march=4kc -mtune=4kc"; \ fi) -ifneq (,$(findstring 4KCle,$(CROSS_COMPILE))) -ENDIANNESS = -EL -else -ENDIANNESS = -EB -endif - -MIPSFLAGS += $(ENDIANNESS) - PLATFORM_CPPFLAGS += $(MIPSFLAGS)
include/configs/pb1x00.h +2 -0
@@ -28,6 +28,8 @@#ifndef __CONFIG_H#define __CONFIG_H +#define CONFIG_CPU_LITTLE_ENDIAN +#define CONFIG_MIPS32 1/* MIPS32 CPU core */ #define CONFIG_PB1X00 1#define CONFIG_SOC_AU1X00 1/* alchemy series cpu */
Signature · 1 line
1.7.0.4
PATCH 2/2 change the way of build little endian board
Quoted 8 lines · On Mon, Aug 9, 2010 at 11:13 AM, <[email protected]> wrote:
add
CONFIG_CPU_LITTLE_ENDIANto little endian board config. use -dumpmachine to check if the cross compile.---
?Makefile ? ? ? ? ? ? ? ? | ? ?1 + ?arch/mips/config.mk ? ? ?| ? 27 +++++++++++++++++++++++++-- ?arch/mips/cpu/config.mk ?| ? ?8 -------- ?include/configs/pb1x00.h | ? ?2 ++
since this is a mips-specific issue, please prefix your summaries accordingly. so the subject should be something like:
mips: change the way of build little endian board
that way non-mips people can easily ignore this e-mail -mike
PATCH 2/2 change the way of build little endian board
Quoted 10 lines · Mike Frysinger
Quoted 8 lines · On Mon, Aug 9, 2010 at 11:13 AM,<[email protected]> wrote:
add
CONFIG_CPU_LITTLE_ENDIANto little endian board config. use -dumpmachine to check if the cross compile.--- Makefile | 1 + arch/mips/config.mk | 27 +++++++++++++++++++++++++-- arch/mips/cpu/config.mk | 8 -------- include/configs/pb1x00.h | 2 ++
Quoted 6 lines
since this is a mips-specific issue, please prefix your summaries accordingly. so the subject should be something like:
mips: change the way of build little endian boardthat way non-mips people can easily ignore this e-mail -mike
Hi Mike
thanks for the advice. I will do that next time.
Signature · 3 lines
Best Regards Xiangfu Liu http://www.openmobilefree.net