
Hi Rodolfo,
Hello,
I have a mips based board and during u-boot support developing I notice that in file «cpu/mips/config.mk»:
should be replaced this line
-mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') +$(AS) --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
to avoid errors for user not having «mips-linux-as» (I have mipsel-linux-as).
OK
...
In the end I suggest the following patch for file cpu/mips/config.mk:
Index: cpu/mips/config.mk
RCS file: /home/develop/cvs_private/uboot-mips-exadron/cpu/mips/config.mk,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 config.mk --- a/cpu/mips/config.mk 16 Sep 2005 12:14:19 -0000 1.1.1.1 +++ b/cpu/mips/config.mk 16 Sep 2005 14:19:29 -0000 @@ -21,20 +21,22 @@ # MA 02111-1307 USA # v=$(shell \ -mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') -MIPSFLAGS=$(shell \ +$(AS) --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') +MIPSCFLAGS=$(shell \ if [ "$v" -lt "14" ]; then \ echo "-mcpu=4kc"; \ else \
echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined"; \
echo "-march=4kc -mtune=4kc -Wa,-allow_branch_to_undefined"; \
fi)
ifneq (,$(findstring 4KCle,$(CROSS_COMPILE))) -ENDIANNESS = -EL -else -ENDIANNESS = -EB +MIPSCFLAGS += -EL +endif +ifneq (,$(findstring mipsel,$(CROSS_COMPILE))) +MIPSLDFLAGS += -EL endif
-MIPSFLAGS += $(ENDIANNESS) -mabicalls +MIPSCFLAGS += -mabicalls
-PLATFORM_CPPFLAGS += $(MIPSFLAGS) +PLATFORM_CPPFLAGS += $(MIPSCFLAGS) +PLATFORM_LDFLAGS += $(MIPSLDFLAGS)
You removed any logical path by which "-EB" would be added to the flags. Your addition of the new flag variables is fine if it works, but it should not break the big endian code. Why don't you rework your patch to not break big endian support?
Chuck Meade The PTR Group