[U-Boot] QEMU for VersatilePB and U-BOOT-2010.12

Dmitriy Kiselev kiselevd2002 at yahoo.com
Thu Jan 27 14:39:38 CET 2011


Hello List,

I am currently trying to build an emulated linux system for arm using all new U-BOOT, Kernel, rootfs stuff. And I was stucked with the problem that I cannot run u-boot-2010.12.tar.bz2 downloaded from ftp://ftp.denx.de/pub/u-boot/ under qemu. Meanwhile u-boot-2010.09.tar.bz2 runs perfectly. Here is what I have and what I did:

My platform:
Host PC: OpenSUSE 11.3 x86-64 with all latest patches (kernel 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64)
GNU arm cross compiler: arm-none-eabi-gcc (Sourcery G++ Lite 2010.09-51) 4.5.1
QEMU: QEMU PC emulator version 0.12.4

What i did after I unpacked the archive:

$ ~/ARM/U-boot/u-boot-2010.12> make versatilepb_config ARCH=arm CROSS_COMPILE=arm-none-eabi-

This worked fine

$~/ARM/U-boot/u-boot-2010.12> make all ARCH=arm CROSS_COMPILE=arm-none-eabi-

This resulted into error not finding CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_INIT_SP_ADDR definitions.

I edited the include/configs/versatile.h file adding there two definitions:
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE \
- GENERATED_GBL_DATA_SIZE)

And then re-launched u-boot compilation envoking:
$~/ARM/U-boot/u-boot-2010.12> make all ARCH=arm CROSS_COMPILE=arm-none-eabi-

This time everything went smoothly and I got compiled u-boot.bin.

But when I started it under QEMU:
~/ARM/U-boot/u-boot-2010.12> qemu-system-arm -M versatilepb -m 128M -nographic -kernel u-boot.bin

This resulted in:

qemu: fatal: Trying to execute code outside RAM or ROM at 0xff000738

R00=fffcbf70 R01=ffff0000 R02=00000000 R03=01000000
R04=ffff0000 R05=fffcbf70 R06=ffff0000 R07=00000000
R08=00ffff80 R09=feff0000 R10=0101dd58 R11=00000000
R12=fffcbfe8 R13=fffcbf68 R14=ff000738 R15=ff000738
PSR=600001d3 -ZC- A svc32

I also tried to debug this problem trying to launch it under QEMU with -s -S flags and envoking DBG.
But still got nothing as remote DBG showed pretty strange startup dump
which does not correlate with u-boot startup source code at all:

(gdb) target remote localhost:1234
gdbarch_find_by_info: info.bfd_arch_info arm
gdbarch_find_by_info: info.byte_order 1 (little)
gdbarch_find_by_info: info.osabi 0 (none)
gdbarch_find_by_info: info.abfd 0x0
gdbarch_find_by_info: info.tdep_info 0x0
gdbarch_find_by_info: Previous architecture 0x83da790 (arm) selected
gdbarch_update_p: New architecture 0x83da790 (arm) selected
gdbarch_find_by_info: info.bfd_arch_info arm
gdbarch_find_by_info: info.byte_order 1 (little)
gdbarch_find_by_info: info.osabi 0 (none)
gdbarch_find_by_info: info.abfd 0x0
gdbarch_find_by_info: info.tdep_info 0x0
gdbarch_find_by_info: Previous architecture 0x83f2910 (arm) selected
gdbarch_update_p: New architecture 0x83f2910 (arm) selected
0x00000000 in ?? ()
=> 0x00000000:	 00 00 a0 e3	mov	r0, #0
(gdb) nexti
Prologue scan stopped at 0xe39ffff8
Prologue scan stopped at 0xe39ffff8
0x00000004 in ?? ()
=> 0x00000004:	 83 10 a0 e3	mov	r1, #131	; 0x83
(gdb)

Please help,

Dmitriy






More information about the U-Boot mailing list