Ben has a qemu tree up with some work-in-progress patches to qemu to support the PowerNV platform. This is the “bare metal” platform like you’d get on real POWER8 hardware running OPAL, and it allows us to use qemu like my previous post used the POWER8 Functional Simulator – to boot OpenPower firmware.
To build qemu for this, follow these steps:
apt-get -y install gcc python g++ pkg-config libz-dev libglib2.0-dev \ libpixman-1-dev libfdt-dev git git clone https://github.com/ozbenh/qemu.git cd qemu ./configure --target-list=ppc64-softmmu make -j `grep -c processor /proc/cpuinfo`
This will leave you with a ppc64-softmmu/qemu-system-ppc64 binary. Once you’ve built your OpenPower firmware to run in a simulator, you can boot it!
Note that this qemu branch is under development, and is likely to move/change or even break.
I do it like this:
cd ~/op-build/output/images; # so skiboot.lid is in pwd ~/qemu/ppc64-softmmu/qemu-system-ppc64 -m 1G -M powernv \ -kernel zImage.epapr -nographic \ -cdrom ~/ubuntu-vivid-ppc64el-mini.iso
and this lets me test that we launch the Ubunut vivid installer correctly.
You can easily add other qemu options such as additional disks or networking and verify that it works correctly. This way, you can do development on some skiboot functionality or a variety of kernel and op-build userspace (such as the petitboot bootloader) without needing either real hardware or using the simulator.
This is useful if, say, you’re running on ppc64el, for which the POWER8 functional simulator is currently not available on.