880 B
880 B
Building the images
This process needs to be done on a machine already running NixOS, as it heavily leverages Nix, the package manager.
Host setup
Ensure you have the following options enabled in your host:
boot.binfmt = {
registrations.aarch64-linux = {
interpreter = "${pkgs.pkgsStatic.qemu-user}/bin/qemu-aarch64";
fixBinary = true;
matchCredentials = true;
wrapInterpreterInShell = false;
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00'';
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff'';
};
};
nix.settings.extra-platforms = ["aarch64-linux"];
A build of the images can then be triggered by just build-images or nix run, which will produce build artefacts under ./images. boot.img and rootfs.sparse.img are ready for flashing!