This update is the thirteenth in a series of regular updates on the state of the project.
Only changes that have been accepted and merged in Mobile NixOS are chronicled here. There’s always more work currently in-progress.
During the month 12 pull requests were merged.
Some interesting improvements landed, let’s dive in.
stage-0: boot in generation kernel+initrd
One of the biggest flaw with the approach Mobile NixOS takes with the boot flow is that it completely ignores the system generation’s kernel and stage-1 image. In turn, this reduces some of the benefits from NixOS, by reducing the coherency of the running system; the kernel and stage-1 are managed out of band.
With the changes from #262,
devices can opt-in to a stage-0 scheme. A stage-0 image is the same as a
stage-1 image, except that it will use
kexec to boot into the generation’s
kernel and stage-1 image.
Devices, and their kernels, need to support
kexec. This is not a given for
vendor kernels. At the time being, none of the Android-based devices (all using
the vendor kernels) can use this feature. On the bright side, the Pinephone has
been verified to work well. Additionally, UEFI x86_64 based devices, too, can
use the stage-0 scheme.
pine64-pinephone: Crust firmware support
With the addition of the or1k toolchain to Nixpkgs, @noneucat was able to finish the pull request adding Crust support to the Pinephone. Details about Crust can be found on their project page.
To use U-Boot with Crust, you will need to build it, then install it manually on your boot media. (A helper to upgrade the firmware is planned for the future.)
Not related to Crust, the usual kernel upgrade for the Pinephone has been made.
Introduction of uefi-x86_64
The introduction of the Generic UEFI build (x86_64) "device" may seem odd. It is meant to be used on a standard computer. But a standard computer is not a mobile device.
Really, this is a dogfooding measure. With this change, it is now possible for me to replace the usual NixOS stage-1 from my personal machines, ensuring I take the stability of Mobile NixOS seriously!
Additionally, this should allow supporting some x86_64 Windows-based tablets with the Mobile NixOS toolchain. While not required, the touchscreen-first boot flow will be helpful for those without a keyboard.
These changes also help exercising the foundations, by creating a new system type.
Removal of qemu-x86_64
As part of the changes for
qemu-x86_64 device has been removed. Instead, a more generic
device has been added, which by default builds images that can boot on standard
UEFI, and which in turn provide the
build.vm output to boot that generic
UEFI image with QEMU, using Tianocore.