Hello,

As part of my GSoC project, I’m working on a coreboot payload that contains a Linux kernel with KVM enabled, and a small userland that will contain KVM-qemu.

Currently I only have the kernel and the userland without KVM-qemu, but I’m working on porting it to uClibc, which seems to lack some things present in glibc that KVM-qemu needs in order to compile and run.

Here you can find what I have by now. To run it, extract both of the .bin files to your home directory and run

qemu -L ~ -hda /dev/null

The code can be seen at http://repo.or.cz/w/kvm-coreboot.git, but it’s work in progress
More to follow on this topic…

Cristi

8 thoughts on “

    • Hi Thomas,

      This post was made in the first attempt to implement AVATT, when I tried to use the buildrom tool, maintained by the coreboot team. It was nicely integrated with coreboot, but suffered from a lot of problems when building more complex(and then with broken buildsystems) software. Now this tool was mostly replaced by coreboot itself, which lately switched to Kconfig too.

      In the second year I switched to buildroot, which actually is very much like OpenWRT just that its build system is a bit more generic and arguably more flexibile.

      Then I didn’t choose OpenWRT because its focus is mostly on wireless networking devices with older kernels and running on non-x86 architectures.

  1. Hi Christi,

    OpenWRT is in my opinion just a name. We recently added support for running OpenWRT as Xen-DomU. There we dont have any wireless cards. And this is only suitable for x86. Could help me with some hints to make a test for OpenWRT? I would like to have OpenWRT to become the Open-Hyperwisor with Wireless Freedom based on KVM. Dont you think this sounds like much fun?

    • Hi Thomas,

      I’m sure the OpenWRT build system can be used to build pretty much everything you may imagine. So is buildroot, OpenEmbedded and even Portage 🙂

      As for startup hints, you basically need to get the KVM/Qemu software built using the OpenWRT build system.

      Can you explain a bit on this OpenWRT with KVM idea?

  2. Hi Cristi,

    The idea is to create a new sub x86_target for OpenWRT, that boots on powerful x86 machines and allows to launch a lot of virtual machines. by keeping the hypervisor overhead as slim as possible. The next steps would be creating a web-gui that allows start and stopping virtual machines.

    Is that clear enough?

    • This and shouldn’t be so hard to do, if it ends up on the hard-disk. There are a plenty of virtualization appliances already on the market: VMware ESX and ESXi, ProxmoxVE, only to name a few. You can easily get OpenWRT to build something like this if you want.

      The difference is that my task was to put all this inside the BIOS flash, instead of the disk, and this changed the rules of the game quite a bit, since it’s not that trivial to alter this and it can easily get your machine bricked if not done properly.

  3. Indeed at all points you mentioned. I was looking for some help to do that. Really thanks for your coments. Thomas

    • So are you interested about the approach which involves the disk, or the one with the BIOS flash?

      For the disk approach, you can also take the latest code I developed. It uses buildroot to create a rootfs image embedded in the kernel’s initramfs, which is also embedded in the kernel vmlinuz image. It is trivial to change the buildroot configuration to output the rootfs in another format, like a tarball. Then you can deploy it to a (bootable) disk, and there you go, the base for your disk KVM appliance is finished.

      If you take the BIOS approach, the resulted vmlinuz only needs to be LZMA’d and added to the CBFS ROM image, ready to be flashed instead of your proprietary BIOS.

Leave a reply to Cristi Măgherușan Cancel reply