3 ms·
The problem the author hit with the Raspberry Pi is that the ARM image is meant for a standard environment (e.g UEFI ), like VMs. e.g it'll boot on Fusion or k
by lloeki 3y ago
The problem the author hit with the Raspberry Pi is that the ARM image is meant for a standard environment (e.g UEFI ), like VMs.
e.g it'll boot on Fusion or kvm because they provide UEFI, a well known device tree, and don't require any firmware at that stage.
Pis (and many such ARM boards) don't have that so they won't be bootable. But there are Pi images built on Hydra. If one uses that then it boots right away.
It's all documented in the Nix wiki.
https://nixos.wiki/wiki/NixOS_on_ARM#Installation https://nixos.wiki/wiki/NixOS_on_ARM#Installation
- mtlynch 3y agoAuthor here. I'm working on a follow-up post specifically about NixOS on the Pi 4, but there are several gotchas to the process. The biggest issue I've run into is that the latest versions of the NixOS SD card images don't work on the Pi 4. You can boot to them, but when you run nixos-install, they fail with a message about hardware.raspberry-pi."4".fkms-3d.enable. The link you shared declares itself to be out of date in several places, so it's not super helpful as a resource for newcomers.
- lloeki 3y ago> You can boot to them, That is the only part I wanted to draw attention to: ARM boot is a peculiar beast and very surprising when you don't know about it, especially when you're used to PC (BIOS or UEFI) booting. > but when you run nixos-install, If one intents to run from the SD card that was just booted then the process should be changing configuration.nix to one's liking and nixos-rebuild switch to that (which is a testament to the power of nix: one can pivot to an entirely new "install" on the spot). Or maybe you attempted to do an install on another block device, e.g to boot straight from USB? > they fail with a message about hardware.raspberry-pi."4".fkms-3d.enable. Does that error also appear with nixos-rebuild switch? If so, then pi4 support is borked in nixos. Otherwise, assuming the install to USB process, maybe nixos-generate-config was run and produced a non-functional hardware-configuration.nix? (which would be a bug too) (it's been a while since I tried nixos on Pis, last time it did work OOTB for me on 3 and 4, save for a kernel / device tree bug for 3 that kills the virtual console) > outdated I agree, all the spread out bits are confusing. The ARM boot situation is common an issue enough that I would expect that to be part of the manual. > Author here. Thanks for the article, I enjoyed it!
- nurple 3y agoThis comes down to ideological reasons. The engineer that is/was leading the embedded integration subproject feels like the platform support components (filesystem partitioning, bootloader, devicetree config, etc.) of installing a distribution on the hardware should not be a concern of the distribution itself[1]. I don't necessarily agree on all points as most distributions approach this quite differently, but it's an interesting premise. There are other projects that attempt to attack this problem but I'm unsure if any have gained a critical mass. [1] https://discourse.nixos.org/t/planning-for-a-better-nixos-on-arm-and-other-non-x86-64-systems/15346 https://discourse.nixos.org/t/planning-for-a-better-nixos-on...
- lloeki 3y agoThanks for that link, very interesting to have first party insights! I seemed to have gathered as much from what has been happening at the code level but it's nice to get the insider version instead of whatever I think I have vaguely understood. You can see similar things happening with Asahi Linux, pushing stuff to m1n1+uboot to have a uniform boot interface when reaching the kernel, plus (ultimately) using a mainline kernel.