public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Coldfire: MCF5270: Compiling u-boot 2009.03-rc2 with gcc 4.3.3 and binutils 2.19.1 results in a u-boot that fails relocation to RAM.
Date: Thu, 19 Mar 2009 10:54:42 -0400	[thread overview]
Message-ID: <49C25CB2.4090000@RuggedCom.com> (raw)

Greetings,

I am trying to x86 cross-compile u-boot 2009.03-rc2 for the MCF5270 with gcc 4.3.3 and binutils 2.19.1 results in a u-boot that
fails its relocation to RAM. My boot sequence is this

U-Boot 2009.03-rc2dvl-00030-g28b1dbe (Mar 19 2009 - 10:21:06)

CPU:   Freescale ColdFire MCF5270 rev. 1, at 150 MHz
Board: Ruggedcom MCF5270
I2C:   ready
DRAM:   8 MB

 >> This is what usually follows after, but fails <<
FLASH:  4 MB
In:    serial
Out:   serial
Err:   serial
MAC:   ethaddr  00:00:00:00:0F:00
Net:   FEC0 [PRIME]
Hit any key to stop autoboot:  0

My gcc-4.3.3 compile flags are:
===============================
make -C drivers/serial/
make[1]: Entering directory `/home/richardretanubun/workspace/u-boot/drivers/serial'
make[1]: Leaving directory `/home/richardretanubun/workspace/u-boot/drivers/serial'
make[1]: Entering directory `/home/richardretanubun/workspace/u-boot/drivers/serial'
m68k-uclinux-gcc -g  -Os   -ffixed-d7 -msep-data -D__KERNEL__
-DTEXT_BASE=0xFFC00000 -I/home/richardretanubun/workspace/u-boot/include
-fno-builtin -ffreestanding -nostdinc -isystem /usr/local/m68k-uclinux-tools/lib/gcc/m68k-uclinux/4.3.3/include -pipe
-DCONFIG_M68K -D__M68K__ -mcpu=5271 -Wall -Wstrict-prototypes -fno-stack-protector -c -o mcfuart.o mcfuart.c
m68k-uclinux-ar crv libserial.a mcfuart.o a - mcfuart.o
make[1]: Leaving directory `/home/richardretanubun/workspace/u-boot/drivers/serial'

My gcc-4.1.1 compile flags are:
===============================
make -C drivers/serial/
make[1]: Entering directory `/home/richardretanubun/workspace/u-boot/drivers/serial'
make[1]: Leaving directory `/home/richardretanubun/workspace/u-boot/drivers/serial'
make[1]: Entering directory `/home/richardretanubun/workspace/u-boot/drivers/serial'
m68k-elf-gcc -g  -Os   -ffixed-d7 -msep-data -D__KERNEL__
-DTEXT_BASE=0xFFC00000 -I/home/richardretanubun/workspace/u-boot/include
-fno-builtin -ffreestanding -nostdinc -isystem /opt/m68knommu/usr/local/m68k-uclinux-tools/bin/../lib/gcc/m68k-uclinux/4.1.1/include -pipe
-DCONFIG_M68K -D__M68K__ -m5307 -Wall -Wstrict-prototypes -fno-stack-protector -c -o mcfuart.o mcfuart.c
m68k-elf-ar crv libserial.a mcfuart.o a - mcfuart.o
make[1]: Leaving directory `/home/richardretanubun/workspace/u-boot/drivers/serial'


Things of note
1. /cpu/mcf52x2/config.mk: the pre gcc-4.2.x, the cpu type is -m5307 and now it is -mcpu=5271
2. If I do objdump -d on the ELF, the newer toolchain seems to align code on 16-bit boundary, while the old one align code on 32-bit boundary.
3. With gcc-4.3.3. if I enforce -m5307, I got an error:
    start.S:144: Error: operands mismatch -- statement `movec %d0,%RAMBAR1' ignored
    Faking RAMBAR1 to RAMBAR bypasses this error, but the resulting binary won't boot (e.g. no single printf is printed after a reset).

Questions:
1. What am I missing?
2. What are the recommended tool-chain for building M5270 coldfire for u-boot?

Thanks very much for your time,

- Richard

                 reply	other threads:[~2009-03-19 14:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49C25CB2.4090000@RuggedCom.com \
    --to=richardretanubun@ruggedcom.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox