From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GdTfn-0000Wp-M3 for qemu-devel@nongnu.org; Fri, 27 Oct 2006 11:31:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GdTfj-0000WQ-A3 for qemu-devel@nongnu.org; Fri, 27 Oct 2006 11:31:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GdTfj-0000WK-0w for qemu-devel@nongnu.org; Fri, 27 Oct 2006 11:31:03 -0400 Received: from [66.249.82.236] (helo=wx-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GdTfj-0008R5-19 for qemu-devel@nongnu.org; Fri, 27 Oct 2006 11:31:03 -0400 Received: by wx-out-0506.google.com with SMTP id r21so1062235wxc for ; Fri, 27 Oct 2006 08:31:02 -0700 (PDT) Message-ID: Date: Fri, 27 Oct 2006 15:30:58 +0000 From: "andrzej zaborowski" Sender: balrogg@gmail.com Subject: Re: [Qemu-devel] Running u-boot on qemu's emulation of arm integratorcp926? In-Reply-To: <45421FDA.4070003@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45421FDA.4070003@free-electrons.com> Reply-To: balrogg@gmail.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, On 27/10/06, Michael Opdenacker wrote: > * In my embeded Linux training sessions, to practice with U-boot > without having to carry real boards, with their cables and power > supplies (which would definitely make customs officers frown and > think I'm importing commercial or even sensitive devices). I've travelled with a full backpack of rare PC intestines and the customs didn't mind but I guess it depends. > * For students and community members, to get familiar with U-boot > without having to get real hardware. > * To create qemu/U-boot demos, showing the capabilities of both tools. > > Has anyone already experimented with this? I haven't found any useful > detail on the net yet. Well, I've been running U-boot in qemu-system-arm but it was on the old OMAP 310 board emulator, which is currently stalled. Never tried the integrator version. All I can say is it worked like on the real board. > > As I have no U-boot development knowledge yet, I started in a naive, > optimistic way: > > * Got U-boot 1.1.5 sources > * Configured U-boot for the arm integratorcp926 board: > make make cp926ejs_config > * Compiled U-boot with a gcc 3.4.x cross compiling toolchain for arm: > export PATH=/usr/local/uclibc-0.9.28-3/arm/bin:$PATH > make > * Ran qemu: > qemu-system-arm -kernel ~/tmp/tmp/u-boot-1.1.5/u-boot.bin -nographic > > (qemu) qemu: fatal: Board reset > R00=10000000 R01=00000008 R02=00000013 R03=00000000 > R04=00000000 R05=00000000 R06=00000000 R07=00000000 > R08=00000000 R09=00000000 R10=00000000 R11=00000000 > R12=00010064 R13=00000000 R14=000100f4 R15=000103a0 Executing "info symbol 0x000103a0" or even "edit *0x000103a0" should tell you where in the source u-boot tried to reboot, and maybe why. You would run gdb this way: cd ~/tmp/tmp/u-boot-1.1.5/ arm-yourtoolchain-gnu-linux-gdb u-boot.elf # or similar You could even do this and connect to qemu over the socket and then do: (gdb) break *0x000103a0 (gdb) c and you would maybe get a backtrace. > PSR=800001d3 N--- A svc32 bff14784 > s00=00000000(0.000000) s01=00000000(0.000000) d00=0000000000000000(0.000000) > s02=00000000(0.000000) s03=00000000(0.000000) d01=0000000000000000(0.000000) > s04=00000000(0.000000) s05=00000000(0.000000) d02=0000000000000000(0.000000) > s06=00000000(0.000000) s07=00000000(0.000000) d03=0000000000000000(0.000000) > s08=00000000(0.000000) s09=00000000(0.000000) d04=0000000000000000(0.000000) > s10=00000000(0.000000) s11=00000000(0.000000) d05=0000000000000000(0.000000) > s12=00000000(0.000000) s13=00000000(0.000000) d06=0000000000000000(0.000000) > s14=00000000(0.000000) s15=00000000(0.000000) d07=0000000000000000(0.000000) > s16=00000000(0.000000) s17=00000000(0.000000) d08=0000000000000000(0.000000) > s18=00000000(0.000000) s19=00000000(0.000000) d09=0000000000000000(0.000000) > s20=00000000(0.000000) s21=00000000(0.000000) d10=0000000000000000(0.000000) > s22=00000000(0.000000) s23=00000000(0.000000) d11=0000000000000000(0.000000) > s24=00000000(0.000000) s25=00000000(0.000000) d12=0000000000000000(0.000000) > s26=00000000(0.000000) s27=00000000(0.000000) d13=0000000000000000(0.000000) > s28=00000000(0.000000) s29=00000000(0.000000) d14=0000000000000000(0.000000) > s30=00000000(0.000000) s31=00000000(0.000000) d15=0000000000000000(0.000000) > FPSCR: 00000000 > Aborted > > Now, I know that as usual, I need time and patience to get more > familiar with the emulated board and with U-boot requirements. > > However, if any of you has suggestions for doing that or experience to > share, your are most welcome! > > I will keep you posted in the next days and weeks. > > Cheers, > > Michael. > > -- > Michael Opdenacker, Free Electrons > Free Embedded Linux Training Materials > on http://free-electrons.com/training > (More than 1000 pages!) > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel > Hope this helps, Andrew