0

I'm starting to work with Embedded Linux and I've got a LPC313x based board (Embedded Artists). I've built apex and kernel with ELDK (as suggested here: http://www.lpclinux.com/LPC313x/LPC313xGettingstartedELDK). The kernel is built correctly (apparently no error occurs) with the default settings, and I am using a pre-made ramdisk, provided at the same link.

Now I want to use QEMU to emulate my system prior to load all the stuff in the physical board. To do that, I'm using the command:

qemu-system-arm -kernel kernel/work_2.6.28.2/arch/arm/boot/zImage -initrd ../eldk42/arm/images/ramdisk_image.gz

I cannot get it work! QEMU starts but the emulator screen remains black, nothing happens. What am I missing here?

stef
  • 737
  • 4
  • 13
  • 31
  • You probably want to enable some sort of lower level interface - virtual serial port or whatever, so that you can get kernel messages during startup and a shell so that you can go in and check things, without depending on all of the more complicated drivers you would need to get a splashscreen or gui. – Chris Stratton May 21 '11 at 17:48
  • At least some messages should be displayed. I think I'm kissing something in the loading (so, it just doesn't boot). I specified kernel and ramdisk, what about the bootloader? I built APEX but I dunno how to use it with QEMU. How can I load it in such a way it boots both kernel and ramdisk? (as it does on the real board) – stef May 22 '11 at 10:16
  • Unless you have specifically enabled some form of output, I would not be at all confident that any message will be displayed - displaying things takes working software. See if QEMU itself has a console you can enable with a command line option; I'm most familiar with a customized version that does rather that the capabilities of the standard. – Chris Stratton May 22 '11 at 15:39
  • I checked it out! The Linux system is supposed to communicate via serial, and I figured out how to display it in QEMU. Still, black screen.. What version are you using? – stef Jun 02 '11 at 08:19

3 Answers3

2

You board is not supported by Qemu. You have to write your own Board Support Package, if you can't find one on the Internet. Try checking the kernel source tree, you might find one there. Plus you have to know the exact internal details of your SoC and board.

0

Try this:

qemu-system-arm -kernel kernel/work_2.6.28.2/arch/arm/boot/zImage -initrd ../eldk42/arm/images/ramdisk_image.gz -append "root=/dev/ram"

Try with -m:

qemu-system-arm -m 128 -kernel kernel/work_2.6.28.2/arch/arm/boot/zImage -initrd ../eldk42/arm/images/ramdisk_image.gz -append "root=/dev/ram"

Try with -M:

qemu-system-arm -M versatilepb -m 128 -kernel kernel/work_2.6.28.2/arch/arm/boot/zImage -initrd ../eldk42/arm/images/ramdisk_image.gz -append "root=/dev/ram"

You are basically making /dev/ram (which you provide with -initrd argument) as your system's root directory. You can find more information here.

db42
  • 4,474
  • 4
  • 32
  • 36
0

You're probably interested in the linux option console=ttyS0 which you can add to -append of qemu.

Boeckm
  • 3,264
  • 4
  • 36
  • 41
vlad
  • 1