NixOS on ARM: Difference between revisions

From NixOS Wiki
Add Radxa ROCK 4 to table (will add linked page next)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<!--T:1-->
<div style="font-size: 1.5rem; text-align: center;padding-bottom: 0.5rem;"><strong>NixOS supports 64-bit ARM.</strong></div>
<div style="font-size: 1.5rem; text-align: center;padding-bottom: 0.5rem;"><strong>NixOS supports 64-bit ARM.</strong></div>


<!--T:2-->
The support level for ARM overall varies depending on the architecture and the specific ecosystems and boards.
The support level for ARM overall varies depending on the architecture and the specific ecosystems and boards.


<!--T:3-->
The way the ARM integration is built into NixOS is by making '''generic builds the first-class citizens'''. This means that as soon as there is upstream support for the board in the kernel and platform firmware, NixOS should work once those are updated.
The way the ARM integration is built into NixOS is by making '''generic builds the first-class citizens'''. This means that as soon as there is upstream support for the board in the kernel and platform firmware, NixOS should work once those are updated.


<!--T:4-->
It is still possible, when needed, to build and use a customized platform firmware and kernel for specific boards<sup>[[Talk:NixOS_on_ARM#NixOS_.22support.22_for_board-specific_kernels_or_bootloaders|[reference needed]]]</sup>.
It is still possible, when needed, to build and use a customized platform firmware and kernel for specific boards<sup>[[Talk:NixOS_on_ARM#NixOS_.22support.22_for_board-specific_kernels_or_bootloaders|[reference needed]]]</sup>.


<!--T:5-->
At this moment in time (early 2024) '''only AArch64''' has full support upstream. With that said, neither armv6l or armv7l are being ignored, fixes are worked on and approved as needed. What's missing is support and 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. -->
At this moment in time (early 2024) '''only AArch64''' has full support upstream. With that said, neither armv6l or armv7l are being ignored, fixes are worked on and approved as needed. What's missing is support and 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. -->


<!--T:6-->
'''For images links, including UEFI install''', skip to the [[NixOS_on_ARM/Installation|Installation page]].
'''For images links, including UEFI install''', skip to the [[NixOS_on_ARM/Installation|Installation page]].


== Supported devices ==
== Supported devices == <!--T:7-->


<!--T:8-->
Table legend:
Table legend:
* SoC - https://en.wikipedia.org/wiki/System_on_a_chip
* SoC - https://en.wikipedia.org/wiki/System_on_a_chip
* ISA - https://en.wikipedia.org/wiki/Instruction_set_architecture
* ISA - https://en.wikipedia.org/wiki/Instruction_set_architecture


=== Upstream (NixOS) supported devices ===
=== Upstream (NixOS) supported devices === <!--T:9-->


<!--T:10-->
NixOS has support for these boards using AArch64 architecture on the nixpkgs-unstable and stable channel.
NixOS has support for these boards using AArch64 architecture on the nixpkgs-unstable and stable channel.


<!--T:11-->
Support for those board assumes as much is supported as Mainline Linux supports.
Support for those board assumes as much is supported as Mainline Linux supports.
<!--
<!--
Line 56: Line 67:
=== Community supported devices ===
=== Community supported devices ===


<!--T:12-->
These boards are not routinely verified as working.
These boards are not routinely verified as working.


<!--T:13-->
The baseline support level expected is “Just as much as mainline Linux and U-Boot supports them”, except if specified otherwise.
The baseline support level expected is “Just as much as mainline Linux and U-Boot supports them”, except if specified otherwise.
<!--
<!--
Line 65: Line 78:
-->
-->
<div class="table">
<div class="table">
{|class="table"
{| class="sortable table"
!width="2%"| Manufacturer
!width="2%"| Manufacturer
!width="2%"| Board
!width="2%"| Board
Line 83: Line 96:
|-
|-
| ASUS
| ASUS
| [[NixOS_on_ARM/Tinker Board|Tinker Board]]
| [[NixOS_on_ARM/ASUS Tinker Board|Tinker Board]]
| Rockchip RK3288
| Rockchip RK3288
| ARMv7
| ARMv7
Line 101: Line 114:
| [[NixOS_on_ARM/Banana Pi M64|Banana Pi M64]]
| [[NixOS_on_ARM/Banana Pi M64|Banana Pi M64]]
| Allwinner A64
| Allwinner A64
| ARMv8
| AArch64
| 4× Cortex-A53
| 4× Cortex-A53
| 2 GB
| 2 GB
Line 109: Line 122:
| [[NixOS_on_ARM/Banana Pi BPI-M5|Banana Pi BPI-M5]]
| [[NixOS_on_ARM/Banana Pi BPI-M5|Banana Pi BPI-M5]]
| Amlogic S905X3
| Amlogic S905X3
| ARMv8.2
| AArch64
| 4× Cortex-A55
| 4× Cortex-A55
| 4 GB LPDDR4
| 4 GB LPDDR4
Line 353: Line 366:
| 4 GB
| 4 GB
| microSD
| microSD
|-
| Radxa
| [[NixOS on ARM/Radxa ROCK 4|ROCK 4]]
| Rockchip RK3399
| AArch64
| 2× Cortex-A72, 4×Cortex-A53
| 2/4 GB
| eMMC, microSD, NVMe via expansion board
|-
|-
| Radxa
| Radxa
Line 428: Line 449:
</div>
</div>


==== Special Devices ====
==== Special Devices ==== <!--T:14-->


<!--T:15-->
It is possible to emulate an ARM platform with QEMU.
It is possible to emulate an ARM platform with QEMU.


<!--T:16-->
<div class="table">
<div class="table">
{|class="table"
{|class="table"
Line 452: Line 475:
</div>
</div>


== Installation ==
== Installation == <!--T:17-->


<!--T:18-->
{{main|NixOS_on_ARM/Installation}}
{{main|NixOS_on_ARM/Installation}}


== NixOS installation & configuration ==
== Initial configuration == <!--T:19-->


<!--T:20-->
{{main|NixOS_on_ARM/Initial_Configuration}}
{{main|NixOS_on_ARM/Initial_Configuration}}


== Troubleshooting ==
== Troubleshooting == <!--T:21-->


<!--T:22-->
=== Hanging at <code>Starting kernel ...</code> ===
=== Hanging at <code>Starting kernel ...</code> ===
When booting a NixOS system, it may look like it is hung at <code>Starting kernel ...</code>.
When booting a NixOS system, it may look like it is hung at <code>Starting kernel ...</code>.


<!--T:23-->
It is unlikely to be hung at this part. This is the last message printed by U-Boot. U-Boot prints to both the display and the console at once.
It is unlikely to be hung at this part. This is the last message printed by U-Boot. U-Boot prints to both the display and the console at once.


<!--T:24-->
To view the kernel messages and boot output, the “<code>stdout</code>” of the kernel needs to be configured appropriately.
To view the kernel messages and boot output, the “<code>stdout</code>” of the kernel needs to be configured appropriately.


<!--T:25-->
The kernel's <code>stdout</code> will differ depending on semantics.
The kernel's <code>stdout</code> will differ depending on semantics.


<!--T:26-->
* When there are no valid <code>console=</code> kernel command-line arguments, it will default to the <code>/chosen/stdout-path</code> device tree property. (Generally a serial console.)
* When there are no valid <code>console=</code> kernel command-line arguments, it will default to the <code>/chosen/stdout-path</code> device tree property. (Generally a serial console.)
* When valid <code>console=</code> parameters are present, the kernel picks the leftmost valid one as <code>stdout</code>.
* When valid <code>console=</code> parameters are present, the kernel picks the leftmost valid one as <code>stdout</code>.


<!--T:27-->
In other words, the solution may be to enable the appropriate <code>console=</code> parameters according to your hardware configuration and system.
In other words, the solution may be to enable the appropriate <code>console=</code> parameters according to your hardware configuration and system.


<!--T:28-->
* For the display, add <code>console=tty0</code>.
* For the display, add <code>console=tty0</code>.
* For a serial console, refer to the target device configuration.
* For a serial console, refer to the target device configuration.


=== Details about the boot process ===
=== Details about the boot process === <!--T:29-->


NixOS can also be booted through [[NixOS on ARM/UEFI|UEFI]] on ARM. 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.
<!--T:30-->
NixOS can also be booted through [[NixOS on ARM/UEFI|UEFI]] on ARM. 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 [[NixOS_on_ARM/UEFI#Device_Trees|''may'' make this a bit more awkward]].


<!--T:31-->
Otherwise, in SBC-class hardware, it is common that boards are generally expected to use U-Boot as the platform firmware and bootloader. See the section about [[U-Boot#Using NixOS with U-Boot|using NixOS with U-Boot]].
Otherwise, in SBC-class hardware, it is common that boards are generally expected to use U-Boot as the platform firmware and bootloader. See the section about [[U-Boot#Using NixOS with U-Boot|using NixOS with U-Boot]].


== Binary caches ==
== Binary caches == <!--T:32-->


=== AArch64 ===
=== AArch64 === <!--T:33-->


<!--T:34-->
The [https://hydra.nixos.org/ official NixOS Hydra] instance builds a full set of binaries (available on https://cache.nixos.org) for the AArch64 architecture on the nixpkgs-unstable and stable channels.
The [https://hydra.nixos.org/ official NixOS Hydra] instance builds a full set of binaries (available on https://cache.nixos.org) for the AArch64 architecture on the nixpkgs-unstable and stable channels.


=== armv6l and armv7l ===
=== armv6l and armv7l === <!--T:35-->


<!--T:36-->
Some '''''users''''' have provided best effort caches in the past for 32 bit ARM, but none are currently available.
Some '''''users''''' have provided best effort caches in the past for 32 bit ARM, but none are currently available.


== Getting Support ==
== Getting Support == <!--T:37-->


<!--T:38-->
There is a dedicated room for the upstream NixOS effort on Matrix,  
There is a dedicated room for the upstream NixOS effort on Matrix,  
[https://matrix.to/#/#nixos-on-arm:nixos.org #nixos-on-arm:nixos.org].
[https://matrix.to/#/#nixos-on-arm:nixos.org #nixos-on-arm:nixos.org].


<!--T:39-->
Don't hesitate to ask questions. Note that reply times may vary greatly, depending on the provided information.
Don't hesitate to ask questions. Note that reply times may vary greatly, depending on the provided information.


== Resources ==
== Resources == <!--T:40-->


=== See also ===
=== See also === <!--T:41-->


<!--T:42-->
* [[U-Boot]], as it is often paired with SBC-class hardware.
* [[U-Boot]], as it is often paired with SBC-class hardware.
* [https://mobile.nixos.org/ Mobile NixOS], which provides enhanced semantic around some non-standard boot semantics.
* [https://mobile.nixos.org/ Mobile NixOS], which provides enhanced semantic around some non-standard boot semantics.


=== Subpages ===
=== Subpages === <!--T:43-->


<!--T:44-->
The following is a list of all sub-pages of the ''NixOS on ARM'' topic.
The following is a list of all sub-pages of the ''NixOS on ARM'' topic.


<!--T:45-->
{{Special:PrefixIndex/{{FULLPAGENAME}}/ |hideredirects=1 |stripprefix=1}}
{{Special:PrefixIndex/{{FULLPAGENAME}}/ |hideredirects=1 |stripprefix=1}}
</translate>

Latest revision as of 03:15, 10 October 2024

NixOS supports 64-bit ARM.

The support level for ARM overall varies depending on the architecture and the specific ecosystems and boards.

The way the ARM integration is built into NixOS is by making generic builds the first-class citizens. This means that as soon as there is upstream support for the board in the kernel and platform firmware, NixOS should work once those are updated.

It is still possible, when needed, to build and use a customized platform firmware and kernel for specific boards[reference needed].

At this moment in time (early 2024) only AArch64 has full support upstream. With that said, neither armv6l or armv7l are being ignored, fixes are worked on and approved as needed. What's missing is support and builds being maintained in binary form. At the time of writing, no publicly available caches for armv6l or armv7l are available.

For images links, including UEFI install, skip to the Installation page.

Supported devices

Table legend:

Upstream (NixOS) supported devices

NixOS has support for these boards using AArch64 architecture on the nixpkgs-unstable and stable channel.

Support for those board assumes as much is supported as Mainline Linux supports.

Manufacturer Board SoC ISA CPU RAM Storage
Raspberry Pi Foundation Raspberry Pi 3 Broadcom BCM2837 AArch64 / ARMv7 4× Cortex-A53 @ 1.2 - 1.4 GHz 1 GB SD/microSD
Raspberry Pi Foundation Raspberry Pi 4 Broadcom BCM2711 AArch64 / ARMv7 4× Cortex-A72 @ 1.5 - 1.8 GHz 1-8 GB microSD, eMMC

Community supported devices

These boards are not routinely verified as working.

The baseline support level expected is “Just as much as mainline Linux and U-Boot supports them”, except if specified otherwise.

Manufacturer Board SoC ISA CPU RAM Storage
Apple Apple Silicon Macs M1/M1 Pro/M1 Max AArch64 NVMe
ASUS Tinker Board Rockchip RK3288 ARMv7 4× Cortex-A17 2 GB microSD
Banana Pi Banana Pi Allwinner A20 ARMv7 2× Cortex-A7 1 GB SD, SATA
Banana Pi M64 Banana Pi M64 Allwinner A64 AArch64 4× Cortex-A53 2 GB microSD, 8GB eMMc
Banana Pi BPI-M5 Banana Pi BPI-M5 Amlogic S905X3 AArch64 4× Cortex-A55 4 GB LPDDR4 microSD, 16G eMMC
BeagleBoard.org BeagleBone Black TI AM335x (src) ARMv7 1× Cortex-A8 @ 1 GHz 512 MB 4 GB eMMC, microSD
Firefly AIO-3399C Rockchip RK3399 AArch64 2× Cortex-A72 @ 2.0 GHz, 4× Cortex-A53 @ 1.5 Ghz 2/4 GB 8/16 GB eMMC, microSD
FriendlyElec NanoPC-T4 Rockchip RK3399 AArch64 2× Cortex-A72 @ 2.0 GHz, 4× Cortex-A53 @ 1.5 Ghz 4 GB 16 GB eMMC, microSD, NVMe
FriendlyElec NanoPi-M4 Rockchip RK3399 AArch64 2× Cortex-A72 @ 2.0 GHz, 4× Cortex-A53 @ 1.5 Ghz 4 GB optional eMMC, microSD
FriendlyElec NanoPi-R6C Rockchip RK3588S AArch64 4× ARM Cortex-A76 @ 2.4 GHz, 4× Cortex-A55 @ 1.8 Ghz 4 GB / 8 GB optional eMMC, microSD, NVMe
Hardkernel ODROID-HC1 & ODROID-HC2 Samsung Exynos 5422 ARMv7 4× Cortex-A15 @ 2GHz, 4× Cortex-A7 @ 1.4GHz 2 GB microSD
Hardkernel ODROID-C2 Amlogic S905 AArch64 4× Cortex-A53 @ 1.5GHz 2 GB eMMC, microSD
Hardkernel ODROID-HC4 Amlogic S905X3 AArch64 4× Cortex-A55 @ 1.8GHz 4 GB microSD, SATA
Kosagi Kosagi Novena i.MX6 ARMv7 4× Cortex-A9 @ 1.2 GHz 4 GB microSD, SATA
Libre Computer ROC-RK3399-PC Rockchip RK3399 AArch64 2× Cortex-A72 @ 2.0 GHz, 4× Cortex-A53 @ 1.5 Ghz 4 GB eMMC, microSD, NVMe
Libre Computer ROC-RK3328-CC Rockchip RK3328 AArch64 4× Cortex-A53 @ 1.4GHz 4 GB eMMC, microSD
Libre Computer AML-S905X-CC-V2 Amlogic S905X AArch64 4× Cortex-A53 @ 1.512 GHz 1/2GB eMMC, microSD
Linksprite pcDuino3 Nano Allwinner A20 ARMv7 2× Cortex-A7 @ 1 GHz 1 GB 4 GB NAND, microSD, SATA
NVIDIA Jetson TK1 Tegra K1/T124 ARMv7 4× Cortex-A15 @ 2.3 GHz 2 GB 16 GB eMMC, SD, SATA
NXP i.MX 8M Plus EVK i.MX 8M Plus AArch64 4× Cortex-A53 @ 1.8 Ghz 6 GB 32 GB eMMC, microSD
NXP i.MX 8M Quad EVK i.MX 8M Quad AArch64 4× Cortex-A53 @ 1.5 Ghz + 1× Cortex-M4 3 GB 16 GB eMMC, microSD
OLIMEX Teres-A64 AllWinner A64 AArch64 4× Cortex-A53 @ 1.1 GHz 2GB 16 GB eMMC, microSD
Orange Pi Orange Pi One Allwinner H3 ARMv7 4× Cortex-A7 @ 1.2 GHz 512 MB microSD
Orange Pi Orange Pi PC Allwinner H3 ARMv7 4× Cortex-A7 @ 1.6 GHz 1 GB SD/microSD
Orange Pi Orange Pi Zero Plus2 (H5) Allwinner H5 AArch64 4× Cortex-A53 @ 1.2 GHz 1 GB SD/microSD + 8GB eMMC
Orange Pi Orange Pi Zero2 (H616) Allwinner H616 AArch64 4× Cortex-A53 @ 1.2 GHz 1 GB SD/microSD + 2MB SPI Flash
Orange Pi Orange Pi R1 Plus LTS Rockchip RK3328 AArch64 4× Cortex-A53 @ 1.5 GHz 1 GB microSD
Orange Pi Orange Pi 5 Rockchip RK3588s AArch64 4× Cortex-A76 @ 2.4GHz, 4×Cortex-A55 @ 1.8 GHz 4/8/16 GB microSD, NVMe
Orange Pi Orange Pi 5 Plus Rockchip RK3588 AArch64 4× Cortex-A76 @ 2.4GHz, 4×Cortex-A55 @ 1.8 GHz 4/8/16 GB eMMC, microSD, NVMe
PINE64 PINE A64-LTS Allwinner R18 AArch64 4× Cortex-A53 @ ? GHz 2 GB microSD & eMMC
PINE64 Pinebook Allwinner A64 AArch64 4× Cortex-A53 @ ? Ghz 2 GB microSD & eMMC
PINE64 Pinebook Pro Rockchip RK3399 AArch64 2× Cortex-A72 @ 2.0 GHz, 4× Cortex-A53 @ 1.5 Ghz 4 GB microSD & eMMC
PINE64 ROCK64 Rockchip RK3328 AArch64 4× Cortex-A53 @ 1.5 GHz 1/2/4 GB microSD/eMMC
PINE64 ROCKPro64 Rockchip RK3399 AArch64 2× Cortex-A72 @ 2.0 GHz, 4× Cortex-A53 @ 1.5 Ghz 2/4 GB microSD/eMMC
Clockworkpi uConsole A06 Rockchip RK3399 AArch64 2× Cortex-A72 @ 2.0 GHz, 4× Cortex-A53 @ 1.5 Ghz 4 GB microSD
Radxa ROCK 4 Rockchip RK3399 AArch64 2× Cortex-A72, 4×Cortex-A53 2/4 GB eMMC, microSD, NVMe via expansion board
Radxa ROCK5 Model B Rockchip RK3588 AArch64 4× Cortex-A76 @ 2.4GHz, 4×Cortex-A55 @ 1.8 GHz 4/8/16 GB eMMC, microSD, NVMe
Radxa ROCK5 Model A Rockchip RK3588s AArch64 4× Cortex-A76 @ 2.4GHz, 4×Cortex-A55 @ 1.8 GHz 4/8/16 GB eMMC, microSD, NVMe
Raspberry Pi Foundation Raspberry Pi Broadcom BCM2835 ARMv6 1 × ARM1176 @ 700 MHz 256 MB / 512 MB SD/microSD
Raspberry Pi Foundation Raspberry Pi 2 Broadcom BCM2836 ARMv7 4× Cortex-A7 @ 900 MHz 1 GB SD/microSD
Raspberry Pi Foundation Raspberry Pi 3 Broadcom BCM2837 AArch64 / ARMv7 4× Cortex-A53 @ 1.2 GHz 1 GB SD/microSD
Raspberry Pi Foundation Raspberry Pi 4 Broadcom BCM2711 AArch64 / ARMv7 4× Cortex-A53 @ 1.5 GHz 1-8 GB microSD
Raspberry Pi Foundation Raspberry Pi 5 Broadcom BCM2712 AArch64 4× Cortex-A76 @ 2.4 GHz 4-8 GB microSD
Toshiba AC100 (mini laptop) Tegra 2 250 (T20) ARMv7 2× Cortex-A9 @ 1 GHz 512 MB 8­­–32 GB eMMC, SD
Wandboard Wandboard Solo/Dual/Quad Freescale i.MX6 ARMv7 1×/2×/4× Cortex-A9 @ 1000 MHz 512 MB / 1 GB / 2 GB microSD, SATA

Special Devices

It is possible to emulate an ARM platform with QEMU.

Manufacturer Board SoC ISA CPU RAM Storage
QEMU QEMU ARMv7 up to 8 up to 2 GB Anything QEMU supports

Installation

Initial configuration

Troubleshooting

Hanging at Starting kernel ...

When booting a NixOS system, it may look like it is hung at Starting kernel ....

It is unlikely to be hung at this part. This is the last message printed by U-Boot. U-Boot prints to both the display and the console at once.

To view the kernel messages and boot output, the “stdout” of the kernel needs to be configured appropriately.

The kernel's stdout will differ depending on semantics.

  • When there are no valid console= kernel command-line arguments, it will default to the /chosen/stdout-path device tree property. (Generally a serial console.)
  • When valid console= parameters are present, the kernel picks the leftmost valid one as stdout.

In other words, the solution may be to enable the appropriate console= parameters according to your hardware configuration and system.

  • For the display, add console=tty0.
  • For a serial console, refer to the target device configuration.

Details about the boot process

NixOS can also be booted through UEFI on ARM. 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.

Otherwise, in SBC-class hardware, it is common that boards are generally expected to use U-Boot as the platform firmware and bootloader. See the section about using NixOS with U-Boot.

Binary caches

AArch64

The official NixOS Hydra instance builds a full set of binaries (available on https://cache.nixos.org) for the AArch64 architecture on the nixpkgs-unstable and stable channels.

armv6l and armv7l

Some users have provided best effort caches in the past for 32 bit ARM, but none are currently available.

Getting Support

There is a dedicated room for the upstream NixOS effort on Matrix, #nixos-on-arm:nixos.org.

Don't hesitate to ask questions. Note that reply times may vary greatly, depending on the provided information.

Resources

See also

  • U-Boot, as it is often paired with SBC-class hardware.
  • Mobile NixOS, which provides enhanced semantic around some non-standard boot semantics.

Subpages

The following is a list of all sub-pages of the NixOS on ARM topic.