Skip to contentSkip to conversation

MIPS LE build problems

U-Boot-Users Wolfgang Denk 4 participants 7 messages Aug 18, 2005 – Aug 24, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · In message <[email protected]> you wrote:

As noted in other email in this thread, executing the above code won't work. What about simply compiling a file containing:

constant int data = 0x01234567;

objdumping the data section, and looking (grepping) to see if the data section has 0x12345678 or 0x78563412?

Doesn't work as objdump will be user friendly and always print the "correct" value, i. e. 0x01234567.

But the idea is good.

The attached test script works with the tool chains available to me. Can others please test this, too?

Best regards,

Wolfgang Denk

Signature · 16 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Many aligators will be slain, but the swamp will remain.

-------------- next part --------------
#!/bin/sh

set -e
# make sure CROSS_COMPILE is defined
[ "${CROSS_COMPILE}" ]

# create temp directory
TMPDIR=`mktemp -d`

# and make sure it gets removed automagically
trap 'rm -fr ${TMPDIR}' 0 1 2 3 15
Quoted 1 line

${TMPDIR}/foo.c

${CROSS_COMPILE}gcc -c ${TMPDIR}/foo.c -o ${TMPDIR}/foo.o readelf -h ${TMPDIR}/foo.o | \
sed -n 's/.*Data:.* \([^ ][^ ]*\) endian/\1/p'

exit 0

#1 lore raw
Quoted 2 lines

The attached test script works with the tool chains available to me. Can others please test this, too?

You may have already test this one, but it reports "big" with m68k-elf version 2.95.3, as it should.

Signature · 1 line
Zachary P. Landau <[email protected]>
#2 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

You may have already test this one, but it reports "big" with m68k-elf version 2.95.3, as it should.

Thanks a lot for the feedback, and no, I don't have a m68k toolchain here.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We don't care.  We don't have to.  We're the Phone Company."
#3 lore raw
In reply to Wolfgang Denk

Hi

Quoted 2 lines

The attached test script works with the tool chains available to me. Can others please test this, too?

It WORKS wit my toolchain, built with crosstool.
It reports "little" which is correct.
Excellent job!

gcc 3.3.5
binutils 2.15
glibc 2.3.5

BR,
Matej

#4 lore raw
In reply to Wolfgang Denk
Quoted 7 lines · Wolfgang Denk

Doesn't work as objdump will be user friendly and always print the "correct" value, i. e. 0x01234567.

But the idea is good.

The attached test script works with the tool chains available to me. Can others please test this, too?

This works for our (home grown) toolchain.

gcc 3.2.3, binutils 2.13, mipsel-linux

regards

	/
		Leif
#5 lore raw
Quoted 5 lines · In message <1124700839.6493.4.camel@localhost> you wrote:
Quoted 3 lines

The attached test script works with the tool chains available to me. Can others please test this, too?

This works for our (home grown) toolchain.

Thanks for the feedback.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise."
                - Larry Wall in  <[email protected]>
#6 lore raw
In reply to Wolfgang Denk

Hi

Quoted 2 lines

The attached test script works with the tool chains available to me. Can others please test this, too?

As I said it works for me.

Please see attached cpu/mips/config.mk if it is O.K. to include it in the official U-Boot.
It works for me, maybe others can test it to.

BR,
Matej
-------------- next part --------------
#
# (C) Copyright 2003
# Wolfgang Denk, DENX Software Engineering, <[email protected]> #
# See file CREDITS for list of people who contributed to this

# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#

v=$(shell \
$(CROSS_COMPILE)as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') MIPSFLAGS=$(shell \

if [ "$v" -lt "14" ]; then \
	echo "-mcpu=4kc -mabicalls"; \
else \
	echo "-march=4kc -mtune=4kc -Wa,-allow_branch_to_undefined -mabicalls"; \

fi)

# Check the default ENDIANNESS of the cross compiler e=$(shell \
TMPDIR=mktemp -d; \
trap 'rm -fr ${TMPDIR}' 0 1 2 3 15; \

Quoted 1 line

$${TMPDIR}/foo.c; \

${CROSS_COMPILE}gcc -c $${TMPDIR}/foo.c -o $${TMPDIR}/foo.o; \
readelf -h $${TMPDIR}/foo.o | \
sed -n 's/.*Data:.* \([^ ][^ ]*\) endian/\1/p'; \
)

PLATFORM_LDFLAGS += $(shell \

if [ "$e" = "little" ]; then \
	echo "-EL";\
else \
	echo "-EB";\

fi)

PLATFORM_CPPFLAGS += $(MIPSFLAGS)