Does anyone have experience about linux kernel dev and test in QEMU?

Stephen Brennan stephen at brennan.io
Fri May 26 14:05:23 EDT 2017


Hi Douglas,

I'm not terribly experienced, but here are my two cents.

On Tue, May 23, 2017 at 12:29:09AM +0000, Douglas Su wrote:
> After some searching works, however, I barely find any
> reading material or tutorial about the details of using QEMU in kernel
> development,

I might suggest two tools I've found useful for this purpose. First,
eudyptula-boot [1], a shell script that helps you run QEMU using the same
file system as your host (thanks to 9P). Second, vido [2], a similar tool
implemented in Python. I prefer vido because it's easier for me to extend
in Python.

In both cases, you don't have to mess around with building a VM image, and
for the most part filesystem access is seamless. These solutions don't
bother with a dedicated init process, so some things are odd (for instance,
orphaned processes that die remain zombies forever). Their minimum
configuration is pretty small so rebuilding is quick and your development
cycle is pretty great.

> especially the driver development.

You'll probably need to get into some low-level specifics for getting your
devices passed through to QEMU. I have no experience here. I've not really
thought of QEMU as being an excellent solution for driver development.

Best,
Stephen

[1]: https://github.com/vincentbernat/eudyptula-boot
[2]: https://github.com/g2p/vido




More information about the Kernelnewbies mailing list