NixOS on ARM: Difference between revisions

imported>PsychoLlama
m Remove Pi 3 kernel workaround; It was fixed upstream (https://github.com/NixOS/nixpkgs/issues/97064).
imported>Samueldr
m Review some wording
Line 1: Line 1:
ARM support for NixOS is a work-in-progress, but is progressing quickly.
ARM support for NixOS is a work-in-progress, but is progressing quickly.


The support varies depending on the architecture and the specific boards. The way the ARM integration is built into NixOS is by making generic builds the first-class citizens; as soon as there is upstream support for the board in the kernel and the bootloader, NixOS should work once updated to these versions. It is still possible, when needed, to build and use a customised bootloader and kernel for specific boards<sup>[[Talk:NixOS_on_ARM#NixOS_.22support.22_for_board-specific_kernels_or_bootloaders|[reference needed]]]</sup>. At this moment in time (early 2018) only AArch64 is planned for full support upstream. Though, neither armv6l or armv7l are being ignored, fixes are worked on and approved as needed; what's missing is support and upstream builds being maintained in binary form. Additional resources (and some sd card images) can be found courtesy of [https://github.com/illegalprime/nixos-on-arm illegalprime].
The support varies depending on the architecture and the specific boards. The way the ARM integration is built into NixOS is by making generic builds the first-class citizens; as soon as there is upstream support for the board in the kernel and the bootloader, NixOS should work once updated to these versions. It is still possible, when needed, to build and use a customised bootloader and kernel for specific boards<sup>[[Talk:NixOS_on_ARM#NixOS_.22support.22_for_board-specific_kernels_or_bootloaders|[reference needed]]]</sup>. At this moment in time (late 2021) only AArch64 has full support upstream. Though, neither armv6l or armv7l are being ignored, fixes are worked on and approved as needed; what's missing is support and upstream builds being maintained in binary form. At the time of writing, no publicly available caches for armv6l or armv7l are available.<!-- please get in touch with samueldr on the NixOS on ARM channel if you want to share your own cache, before editing. We need to review the wording to make it crystal clear it's a user-provided cache. -->


== Supported devices ==
== Supported devices ==
Line 41: Line 41:
|}
|}
=== Community supported devices ===
=== Community supported devices ===
The installation images by '''@dezgeg''' should work on the following devices; follow the links for more details, like installation instructions and device-specific notes.


<!--
<!--
Line 310: Line 308:
=== Installation steps ===
=== Installation steps ===


The installation images come in two flavors: <code>sd-image-armv6l-linux.img</code> is built for the ARMv6 architecture and it comes with the Raspberry Pi kernel. sd-image-armv7l-linux.img is built for the ARMv7 architecture and comes with the mainline multiplatform ARMv7 kernel (multi_v7_defconfig). Make sure you download the correct image for your board!
The .img files can be directly written to a microSD/SD card (minimal recommended size: 4 GB) using dd, once uncompressed from the ZSTD container. The SD card needs to be unmounted first.
 
The .img files can be directly written to a microSD/SD card (minimal recommended size: 4 GB) using dd. The SD card needs to be unmounted first. For more information, check [https://www.raspberrypi.org/documentation/installation/installing-images/linux.md Linux]  and for [https://www.raspberrypi.org/documentation/installation/installing-images/mac.md macOS]


The base images are configured to boot up with a serial TTY ( RX/TX UART ) @ 115200 Baud. That way you not necessarily have to have a HDMI Display and keyboard.
The base images are configured to boot up with a serial TTY ( RX/TX UART ) @ 115200 Baud. That way you not necessarily have to have a HDMI Display and keyboard.


Note: I (kalbasit) had to replace <code>console=ttyS0,115200n8 console=ttyAMA0,115200n8 console=tty0</code> with <code>console=ttyS1,115200n8</code> in <code>/boot/extlinux/extlinux.conf</code> to make the serial console work on my Rasberry-Pi 3.
{{note| For some platforms, manually editing and adding kernel command-line arguments to <code>/boot/extlinux/extlinux.conf</code> may be needed for serial to work, and is "as" supported as would be editing the command-line manually during boot.}}


Continue with [[#NixOS installation & configuration]].
Continue with [[#NixOS installation & configuration]].