NixOS on ARM/Radxa ROCK5 Model B: Difference between revisions

imported>Samueldr
mNo edit summary
imported>Samueldr
m Finish rewording not-Tow-Boot section
Line 33: Line 33:
If using the vendor-provided platform firmware is desired, [https://gitlab.com/K900/nix/-/blob/1ae5db476aee96fab9c445d7b690a8f5cf7fbe75/hacks/orangepi5/kernel/default.nix#L20 renaming the kernel derivation to a shorter name] should allow boot to succeed.
If using the vendor-provided platform firmware is desired, [https://gitlab.com/K900/nix/-/blob/1ae5db476aee96fab9c445d7b690a8f5cf7fbe75/hacks/orangepi5/kernel/default.nix#L20 renaming the kernel derivation to a shorter name] should allow boot to succeed.


=== Community Repo ===
=== Community Platform Firmware ===


A WIP tree to build U-Boot using the infrastructure for Tow-Boot is available.
A WIP tree to build U-Boot using the infrastructure for Tow-Boot is available. (The end-result is <em>not</em> a proper Tow-Boot build.)


* https://github.com/samueldr/Tow-Boot/tree/wip/rock5-vendor
* https://github.com/samueldr/Tow-Boot/tree/wip/rock5-vendor


This uses [https://github.com/u-boot/u-boot/compare/d892cca08d5da230a6690f504ba7a06044b840c8...samueldr:u-boot:wip/rock5/not-tb-2023-03-29 a fork with some fixes], so that an installation on the SPI Flash will work, and allow booting from eMMC or SD. NVMe was not successfully validated yet (issues likely hardware-specific).
This uses [https://github.com/u-boot/u-boot/compare/d892cca08d5da230a6690f504ba7a06044b840c8...samueldr:u-boot:wip/rock5/not-tb-2023-03-29 a fork with some fixes], so that an installation on the SPI Flash will work, and allow booting from eMMC or SD. NVMe was not successfully validated yet (issues likely hardware-specific).
The [https://github.com/samueldr/Tow-Boot/blob/wip/rock5-vendor/boards/radxa-rock5b/README.md board-specific README] has further notes.
Using from shared storage (SD, eMMC) or from SPI should work, and both are as supported.


To build:  
To build:  


<code>nix-build -A radxa-rock5b</code>
<pre>
$ nix-build -A radxa-rock5b
</pre>
 
The SD or eMMC shared storage image can be flashed as usual:
 
<pre>
# dd if=shared.disk-image.img of=/dev/XXX bs=1M oflag=direct,sync status=progress
</pre>


Flash result to installation media (sd or mmc)
The SPI image <strong>cannot</strong> be installed using the usual installer. For now you should [https://wiki.radxa.com/Rock5/install/spi follow the vendor instructions], in other words using <code>rkdeveloptool</code> for the installation, or any other way to write to SPI flash.


== System configuration ==
== System configuration ==