NixOS on ARM: Difference between revisions

m Reword first sentence accordingly
Line 682: Line 682:
== Details about the boot process ==
== Details about the boot process ==


On NixOS, all ARM boards are expected to use U-Boot as the firmware and bootloader. NixOS uses [https://github.com/u-boot/u-boot/blob/master/doc/develop/distro.rst U-Boot's Generic Distro Configuration Concept] as the mechanism to communicate boot information (such as path to kernel zImage, initrd, DTB, command line arguments). For a quick TL;DR about the generic distro configuration support: U-Boot is scripted to scan all attached storage devices & partitions and look for a file named <code>/extlinux/extlinux.conf</code> or <code>/boot/extlinux/extlinux.conf</code> (which will be generated by NixOS, just like <code>/boot/grub/grub.cfg</code> is generated on PCs). The partition needs to have its "bootable" flag set.
NixOS can be booted through [[NixOS on ARM/UEFI|UEFI]] on ARM too. The semantics are generally the same as on other architectures. Do note that the common use of Device Tree instead of ACPI in consumer-class hardware ''may'' make this a bit more awkward.


U-Boot also provides an interactive shell and the generation selection menu (just like GRUB). However, support for input or display devices varies greatly, depending on the board. Details for what the boards support in relationship to the boot process are detailed in their respective pages.
Otherwise, in SBC-class hardware, it is common that boards are generally expected to use U-Boot as the platform firmware and bootloader.
 
With U-Boot, NixOS currently still assumes use of [https://docs.u-boot.org/en/v2024.04/develop/distro.html U-Boot's Generic Distro Configuration Concept] as the mechanism to communicate boot information (such as path to kernel zImage, initrd, DTB, command line arguments).
 
For a quick TL;DR about the generic distro configuration support: U-Boot is scripted to scan all attached storage devices & partitions and look for a file named <code>/extlinux/extlinux.conf</code> or <code>/boot/extlinux/extlinux.conf</code> (which will be generated by NixOS, just like <code>/boot/grub/grub.cfg</code> is generated on PCs). The partition needs to have its "bootable" flag set.


== Porting NixOS to new boards ==
== Porting NixOS to new boards ==