Difference between revisions of "NixOS on ARM/PINE64 ROCKPro64"

From NixOS Wiki
Jump to: navigation, search
m (rollback unauthorized mass edits)
Tag: Rollback
 
(19 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{ARM/breadcrumb}}
+
This page has been moved to the official NixOS Wiki:
<div class="infobox">
 
{|class="table"
 
!colspan="2" class="title"|PINE64 ROCKPro64
 
|-
 
|colspan="2"|[[File:ROCKPro64.jpg|frameless|256px|A PINE A64-LTS with eMMC.]]
 
|-
 
!Manufacturer
 
|PINE64 (Pine Microsystems Inc.)
 
|-
 
!Architecture
 
|AArch64
 
|-
 
!Bootloader
 
|Downstream (ayufan) U-Boot<ref>https://github.com/ayufan-rock64/linux-u-boot</ref>
 
|-
 
!Boot options
 
|SD, eMMC, SPI NOR Flash
 
|}
 
</div>
 
  
The ROCKPro64 is a powerful single board computer built around the Rockchip RK3399 SoC.
+
    ⇒ '''[https://wiki.nixos.org/wiki/NixOS_on_ARM/PINE64_ROCKPro64 NixOS on ARM/PINE64 ROCKPro64]'''
  
There are two models of the board, with 2 or 4 GB of RAM. It can boot from an microSD card or an eMMC. It also has a 128 Mbit SPI flash that can be used to store the bootloader.
+
''— samueldr, Lead of NixOS on ARM.''
 
 
== Status ==
 
 
 
It is possible to run NixOS on this board using a downstream U-Boot and kernel. This can be done with manual partitioning  and <code>nixos-install</code> or possibly by building an SD image with the correct kernel and bootloader, but the latter has not been tested.
 
 
 
U-Boot for this board is packaged in nixpkgs, and Hydra builds can be found here: https://hydra.nixos.org/job/nixpkgs/trunk/ubootRockPro64.aarch64-linux
 
This bootloader is not entirely open, incorporating blobs for the tertiary program loader (TPL) and ARM trusted firmware (ATF).
 
 
 
== Board-specific installation notes ==
 
 
 
U-Boot needs to be copied to sector 64 on the microSD card or eMMC with <code>dd</code>. Download/build U-Boot for the board, and copy <code>idbloader.img</code> to the correct location with (replace <code>/dev/mmcblkX</code> with the correct path to the SD card device):
 
 
 
<syntaxhighlight lang="bash">sudo dd if=idbloader.img of=/dev/mmcblkX bs=512 seek=64</syntaxhighlight>
 
 
 
On many kernels, the ethernet driver cannot handle hardware check-summing of large packets, therefore this feature must be disabled for the ethernet to be stable. This can be done with the following NixOS configuration:
 
<syntaxhighlight lang="nix">
 
networking.localCommands = ''
 
  ${pkgs.ethtool}/bin/ethtool -K eth0 rx off tx off
 
'';
 
</syntaxhighlight>
 
 
 
== Serial console==
 
 
 
The ROCKPro64 uses a GPIO pinout compatible with the Raspberry Pi 2 and newer. This means that the following pins can be used to connect a serial adapter:
 
 
 
{| class="table"
 
|-
 
!colspan="2" style="background: #fafafa"| Pi-2 Bus
 
|-
 
! Pin
 
! Function
 
|-
 
| 6
 
| GND
 
|-
 
| 8
 
| UART0_TX
 
|-
 
| 10
 
| UART0_RX
 
|}
 
 
 
The serial console runs at 1500000 baud in the bootloader.
 
 
 
{{note| It is not recommended to connect the serial adapter to pin 10 (RX) while booting, as this often causes the board to hang early in the bootloader. Disconnecting pin 10 still allows the serial console to be viewed, and it can be reconnected after the board boots, allowing interaction with the console.}}
 
 
 
== Downstream kernel ==
 
 
 
Although the mainline kernel contains a device tree for the ROCKPro64, it does not seem to boot correctly as of 4.20. Therefore it is necessary to use a downstream kernel:
 
 
 
* [https://github.com/ayufan-rock64/linux-kernel ayufan-rock64/linux-kernel] 4.4 based on Rockchip BSP
 
* [https://github.com/ayufan-rock64/linux-mainline-kernel ayufan-rock64/linux-mainline-kernel] mainline based, with potentially fewer hardware features supported. This kernel is not based on a kernel stable branch, so it may have more bugs (unrelated to the hardware).
 
 
 
{{note|Keep in mind that using non-upstream forks of the kernel always incurs some security risk.}}
 
 
 
== Resources ==
 
 
 
* [https://www.pine64.org/?page_id=61454 Official product page]
 

Latest revision as of 10:58, 6 April 2024

This page has been moved to the official NixOS Wiki:

    ⇒ NixOS on ARM/PINE64 ROCKPro64

— samueldr, Lead of NixOS on ARM.