Week 1: Building and getting to run
During the first week, I planned to build and run both AGL and Jailhouse in QEMU and on the Raspberry Pi. I started with building the AGL master on my laptop, but I’ve run into some problems with the libxmlsec1 package trying to use my system headers instead of the ones from the AGL tree. I was recommended to use some supported distribution (e.g. Debian stable), as I’m using Arch Linux on my laptop and it’s not supported by Yocto Project. After running the build on a Debian machine, I was able to build it for qemu-x86_64 target. Then I wanted to build it for the Raspberry, so I followed the documentation and ran into problems with the libomxil package, so I haven’t included it and it worked well.
But I’ve got another problem when running the qemu-x86_64 image with QEMU. Using the QEMU command from the documentation, the system was not able to boot. It failed to mount the /boot partition and gave a rescue shell on the console. While I was investigating the problem, I noticed that someone just asked about the same problem on the mailing list. So, later I proposed my workarounds. But even after that, I was still not able to boot into the graphical interface. So I tried it on the Raspberry and it worked well. After playing with the QEMU command-line arguments, I tried to run the image using the runqemu script and the graphical interface was finally working. Despite this, I was still not able to boot into the graphical interface using the vmdk image. After using QEMU command-line arguments from the runqemu script, now it changes the resolution when it boots, but the screen remains black.
Then I moved onto Jailhouse. I have built Jailhouse images from the jailhouse-images GitHub repository for both QEMU-x86_64 and Raspberry Pi 4. They both worked well, so I’ve got some hands-on experience with Jailhouse and the example inmates provided. The Raspberry Pi 4 image is made for the 1 GiB RAM variant of the Raspberry, but it works on the 4 GiB variant as well. It just shrinks the memory visible to the system to 1 GiB after enabling Jailhouse.
Now, the plan is to make a Yocto recipe for building Jailhouse into AGL. I’m also trying to include my findings into the AGL documentation as I go.