NewBie: Using qemu-omap3 from maemo

Hello.

I want to build a microkernel+app on the beagleboard and on an emulator.

So far I tried creating a .bin which I can:
- upload and test on my real beagleboard (and it works)
- load it into the qemu-system-arm -M beagle -mtdblock <my.bin> that is generated based on the http://code.google.com/p/qemu-omap3 emulator

I use the steps from http://code.google.com/p/qemu-omap3/wiki/UserManual, with the difference that I do not need to load Linux + RootFS, just kernel: so I use

./qemu-system-arm -M beagle -mtdblock beagle-nand.bin


and once in the emulated Uboot console type:




<br>nand read 0x80000000 0x280000 0x400000<br>go 0x80000000<br><br>

I use something similar on the real hardware (mmcinit,fatload, go) and it works.

But is crashing the original qemu -omap3 emulator.

I thought on using the emulator from maemo: garage: Exiting with error and see if the emulation crashes in the same way.






So I built the qemu emulator from maemo (succesfully in ubuntu 9.04 desktop) and am attempting to to the same steps:
- load my bin into the maemo qemu-system-arm via:

qemu-system-arm -M beagle -mtdblock<my.bin>







I try to connect Using Remote Desktop viewer in ubuntu 9.04 desktop edition to 127.0.0.1:5900.
I see nothing in the VNC viewer.
Ctrl-Alt-1, Ctrl-Alt-2, Ctrl-Alt-3 do nothing.
I see nothin (no Xloader/UBoot output) in the terminal:

gabi@gabi-linux:/proj/git/vmxdroid/okl4$ qemu-system-arm-beagle-maemo -M beagle -mtdblock build_bgktest/images/beagle-nand.bin
VNC server running on `127.0.0.1:5900’
omap_venc_write: Bad register 0x0000000c (value 0x00000000)
omap_venc_write: Bad register 0x00000018 (value 0x00000000)
omap_venc_write: Bad register 0x0000008c (value 0x00000000)
omap_venc_write: Bad register 0x00000098 (value 0x00000000)
omap_venc_write: Bad register 0x0000009c (value 0x00000000)
omap_venc_write: Bad register 0x000000ac (value 0x00000000)
omap_venc_write: Bad register 0x000000bc (value 0x00000000)
omap_venc_write: Bad register 0x000000c0 (value 0x00000000)







So I try the following: nographic mode in qemu.
I see output but I can’t write into the terminal window any more (I can’t close the simulation via Ctrl-C, or interact with the emulated Uboot console):

qemu-system-arm-beagle-maemo -M beagle -mtdblock build_bgktest/images/beagle-nand.bin -nographic


Texas Instruments X-Loader 1.41
Starting OS Bootloader…


U-Boot 1.3.3 (Nov 23 2008 - 18:48:04)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle Board + LPDDR/NAND
DRAM: 128 MB
NAND: 256 MiB
*** Warning - bad CRC or NAND, using default environment

In: serial
Out: serial
Err: serial
omap_venc_write: Bad register 0x0000000c (value 0x00000000)
omap_venc_write: Bad register 0x00000018 (value 0x00000000)
omap_venc_write: Bad register 0x0000008c (value 0x00000000)
omap_venc_write: Bad register 0x00000098 (value 0x00000000)
omap_venc_write: Bad register 0x0000009c (value 0x00000000)
omap_venc_write: Bad register 0x000000ac (value 0x00000000)
omap_venc_write: Bad register 0x000000bc (value 0x00000000)
omap_venc_write: Bad register 0x000000c0 (value 0x00000000)

Hit any key to stop autoboot: 0







I also tried the -serial stdio option for qemu-system-arm to force the implicit serial console on my virtual beagleboard into gnome terminal. No luck.

I need some help in identifying the correct command to give to be able to interact with my qemu-system-arm emulation, in order to check microkernel simulation behavior.

I hope somebody can help me.


Thank you for your help,
Gabi Voiculescu


|

So nobody uses the maemo beagleboard port of qemu?

Thanks,
Gabi Voiculescu

New problem.

I began making my microkernel code compatible with the original qemu-omap3: http://code.google.com/p/qemu-omap3.

Code still works fine on the real hardware.

I had issues due to unknown or bandwidth restricted accesses in INTC, MPU_INTCPS, PRCM_WKUP_CM, PRCM_PER_CM.

Now I crash qemu in the init stage of the microkernel with the mesage:

qemu: fatal: bad error 0

I got a hit on google, and the answer was related to qemu-'s restrictions imposed on memory. I currently assume (did not have enough time to test this) that I crash in the init stage when I allocate the physical ram to the kernel and I crash beacause I do not respect the qemu memory model …

Can anybody tell me the qemu-omap3 restrictions for:

  • dram size
  • nand size

Or where I should look for them in the qemu-omap3 sources.

I currently have my build system setup for 256MB DRAM (like I saw in the Beagleboard Rev C3 spec).

Thanks,
Gabi Voiculescu

So nobody uses emulators to debug beagleboard code?
Hmmm.

Gabi Voiculescu

Sorry, printf’s and now (just recently) openocd…

Regards,

You clearly demonstrated how working with simulators can
be useless if the simulators can't be trusted, which is the
case here :slight_smile:

Laurent