qemu-system-arm does nothing but spin wheels

Bug #1231093 reported by M Eriksen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

This was using 1.0.1 on fedora 17 then using 1.6.0 built from source with default configuration. The host machine is x86_64 (intel i5) with a custom 3.11 kernel.

'qemu-system-x86_64 -kernel [hostkernel]'

Opens a window and shows the kernel booting.

'qemu-system-x86_64 -kernel [arm11v6 kernel]'

Opens a window with garbage in it.

'qemu-system-arm -cpu arm1176 -M versatilepb -kernel [arm11v6 kernel]'

Opens a window where nothing ever appears. This kernel runs on a raspberry pi, so arm1176 should be appropriate; the '-M' option I noticed online.

Revision history for this message
Peter Maydell (pmaydell) wrote :

You're trying to run a Raspberry Pi kernel on a model of a Versatile PB board. These two bits of ARM hardware are totally different and a kernel for one won't work on the other. QEMU is correctly emulating a kernel which has crashed or simply failed to output anything because it isn't sending serial port or video output to the right place.

There's no QEMU model of the Raspberry Pi. If you want to run a kernel on our Versatile PB board, build a kernel for VersatilePB.

Running an ARM kernel on an x86 model is obviously not going to work either so I have no idea why you did that.

Changed in qemu:
status: New → Invalid
Revision history for this message
M Eriksen (mk-z) wrote :

> Running an ARM kernel on an x86 model is obviously not going to work either so I have no idea why you did that.

This was simply to demonstrate that qemu-system-x86_64 seemed to be doing something even when fed an inappropriate kernel, whereas the qemu-system-arm did not.

> You're trying to run a Raspberry Pi kernel on a model of a Versatile PB board. These two bits of ARM hardware are totally different and a kernel for one won't work on the other.

I was inspired, cargo-cult wise, by a long list of people online who've apparently had success; if you google "raspberry pi qemu" you'll find at least half a dozen blog posts and a five page forum thread discussing this. They all used '-cpu arm1176 -M versatilepb' except for a few '-cpu arm11mpcore'. Generally demonstrations of this used the publically available stock raspbian image and kernel, so it was easy for me to replicate that -- but it did not work. There was no way for me to know why something that works for someone else would not work for me, since qemu did not report anything and there is no "troubleshooting" or other discussion of problems of this sort I could find in the docs.

Anyway, if it is something you don't support, then it's something you don't support, my mistake. Out of curiousity, do you have "reference kernels" available that could be used to test the installation for various architechures?

Revision history for this message
Peter Maydell (pmaydell) wrote :

No, none of those people are using a kernel built for the rpi, because that simply won't work. They will be using a kernel for versatilepb (or some random hacked variant on it) plus the rpi filesystem image. This is all a bit less than fully supported because the versatilepb board doesn't actually have an 1176 CPU so when you say '-cpu arm1176' you're making qemu emulate something that never existed, and whether Linux works on that or not is a bit up to luck.

In general for troubleshooting you need to follow the same process you would do for bringing up a kernel on real hardware devboards. This typically involves using a debugger, looking at where the kernel has fallen over and making some educated guesswork about what kernel config options might need tweaking.

For this particular case you'll probably be better off asking in raspberry pi forums or other places where the people who've already done what you're trying to do hang out.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.