[U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support

Loïc Minier
2010-11-15T14:06:47Z

On Mon, Nov 15, 2010, Wolfgang Denk wrote:
> Do you have a working qemu setup and/or documentation how to run
> U-Boot on such an ARM config?

Sometimes I do ;-)

I use either:
* Ubuntu QEMU packages - qemu-kvm-extras package has qemu-system-arm;
it's usually fairly old because it's built from the qemu-kvm
trees/releases
* Linaro QEMU packages - currently the "qemu-maemo" package in this PPA
https://launchpad.net/~linaro-maintainers/+archive/tools/+packages
provides the qemu-maemo-system-arm command; can be installed along
qemu-kvm-extras; this has patches to support OMAP machines from the
qemu-maemo/-meego projects, hence the name; in the future, this might
be a qemu-linaro instead
* upstream QEMU built from git

While U-Boot supports integrator, versatile and vexpress, QEMU only
supports the first two.

I get varying success depending on the exact combination of emulated
machine and version of QEMU. Today, I tried the binary u-boot
downloads from http://arm.com/community/software-enablement/linux.php
(Linux OS Downloads tab) with with qemu-maemo
0.0~20100921+871d996-0ubuntu1~linaro1 and qemu-kvm-extras
0.13.0+noroms-0ubuntu3:

machine: | realview-eb realview-pbx-a9 versatilepb
QEMU: |
----------------+----------------------------------------
qemu-maemo | partial[1] works works
qemu-kvm-extras | partial[1] works crash[2]

Unfortunately, these are not built from upstream u-boot sources; I
tried building some ARM boards from upstream u-boot with v2010.09 and
got these results:

machine: | integratorcp versatilepb
QEMU: |
----------------+-------------------------
qemu-maemo | crash[3] partial[4]
qemu-kvm-extras | crash[3] partial[4]

So I'm afraid I couldn't find a fully working combination of U-Boot
supported board + QEMU, but I didn't try QEMU tip; I'm Cc:ing Peter who
cares for QEMU in Linaro, maybe he has more idea or is tempted to try a
tip QEMU :-)

If you want to reproduce, run something like:
qemu-system-arm -M versatilepb -serial stdio \
-kernel u-boot_bin_u-boot_versatilepb.axf
or:
qemu-system-arm -nographic -M versatilepb \
-kernel u-boot_bin_u-boot_versatilepb.axf
replace qemu-system-arm with qemu-maemo-system-arm if you use
qemu-maemo

[1] crashes while initializing the NIC; qemu: hardware error:
smc91c111_write: Bad reg 0:6
[2] qemu: hardware error: arm_timer_write: Bad offset 101e1fe0
[3] qemu: hardware error: pl011_write: Bad offset 14
[4] crashes after detecting 0 Bytes of DRAM:
DRAM: 0 Bytes
qemu: fatal: Trying to execute code outside RAM or ROM at 0x34000000
--
Lo?c Minier