emulationramqemuarmv7cortex-a8

Run MLO Files in QEMU


I have an ARMv7 Cortex-A8 chip, with a TI AM335x embedded chip (my chip very close to Beaglebone Black controller). I compiled the whole system stack, starting from the MLO files, to u-boot, to the Linux kernel zImage, and to the Linux user space as well as the programs that should be running on my controller. However, for specific analysis cases, I might need to emulate the architecture and the system stack of my controller in, say, QEMU. As I was researching about the boot sequence of most embedded devices, the sequence goes as the following: MLO -> u-boot -> kernel -> user space -> etc.

As I began to emulate the system, I started with qemu-system-arm (since I am using an ARM 32-bit device, hence ARMv7), and passed the following machine type (since this is the only Cortex-A8 device available in QEMU): realview-pb-a8, and the following CPU: cortex-a8. I also loaded my compiled u-boot.bin using the -bios argument. However, nothing shows up on the VGA display other than Guest has not initialized the display (yet), and nothing shows up on the serial IO. My guts tells me I have to load the MLO before the u-boot file, but how would I do that, if it is possible?


Solution

  • You cannot run a low-level program (like u-boot, or the kernel) that is built for one kind of Arm embedded board on another. realview-pb-a8 is completely different hardware to the AM335x SoC, and the guest code will simply crash as soon as it tries to do anything with the hardware.

    You would need to have a model of the right hardware in QEMU to run this software, but QEMU doesn't have a model of that SoC, so you can't, I'm afraid.