All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitriy Kiselev <kiselevd2002@yahoo.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] QEMU for VersatilePB and U-BOOT-2010.12
Date: Thu, 27 Jan 2011 05:39:38 -0800 (PST)	[thread overview]
Message-ID: <456940.83571.qm@web38506.mail.mud.yahoo.com> (raw)

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

                 reply	other threads:[~2011-01-27 13:39 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=456940.83571.qm@web38506.mail.mud.yahoo.com \
    --to=kiselevd2002@yahoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.