NixOS on ARM/PINE64 ROCKPro64: Difference between revisions

imported>Cyber-murmel
add nix-build for uboot
imported>Tom
Remove superfluous info about downstream kernels. Mainline works fine, as of many versions ago.
Line 101: Line 101:


See https://wiki.pine64.org/wiki/ROCKPro64#Setup_a_Serial_Console_.28UART.29 for more information on setting up the serial console
See https://wiki.pine64.org/wiki/ROCKPro64#Setup_a_Serial_Console_.28UART.29 for more information on setting up the serial 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|The old vendor U-Boot 2017.09 did not leave enough room between the kernel and initrd, causing recent kernels to overwrite the beginning of the initrd. This can be fixed by increasing <code>ramdisk_addr_r</code> in the U-Boot console, or using upstream U-Boot. }}
== Custom NixOS Installer ==
It is possible to build a custom nixos installer image with a downstream kernel that will boot as-is on the rockpro64.
For a working example see this repo: [https://github.com/AshyIsMe/nixos-installer-rockpro64 nixos-installer-rockpro64]
== Panfrost GPU Driver ==
The ROCKPro64's GPU is supported by the open source Panfrost driver. The downstream ayufan-rock64/linux-mainline-kernel is known to work. The mainline kernel may also work, but has not been tested. At the time of writing, support has been added to the required userspace libraries, but the changes have not yet been released. It is therefore necessary to build libdrm, mesa, mesa-glu and kmscube from their respective git sources.


== Resources ==
== Resources ==


* [https://www.pine64.org/rockpro64/ Official product page]
* [https://www.pine64.org/rockpro64/ Official product page]