NixOS on ARM/Libre Computer ROC-RK3328-CC: Difference between revisions
imported>Cyber-murmel m explain postBuildCommands |
m Add category |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 98: | Line 98: | ||
$ nix-build '<nixpkgs/nixos>' \ | $ nix-build '<nixpkgs/nixos>' \ | ||
-A config.system.build.sdImage \ | -A config.system.build.sdImage \ | ||
-I nixpkgs=https://github.com/NixOS/nixpkgs/archive/ | -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.tar.gz \ # pinned to nixos-unstable on 2022-03-23 | ||
-I nixos-config=./sd-image.nix</syntaxHighlight> | -I nixos-config=./sd-image.nix</syntaxHighlight> | ||
== USB == | == USB == | ||
To enable USB power ''GPIO1_D2'' must be pulled high. D2 translates to 26 (D=4, 4*8+2=26). | To enable USB power ''GPIO1_D2'' must be pulled high. D2 translates to 26 (D=4, 4*8+2=26). Normally this is configured in the device tree, which gets loaded at boot time. At the time of writing, the ROC-RK3328-CC version of u-boot hasn't been ported to nixpkgs yet, so this is most easily done with the following systemd service. | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
| Line 118: | Line 118: | ||
{| class="table" | {| class="table" | ||
|- | |- | ||
!colspan="2" style="background: | !colspan="2" style="background: var(--color-inverted)"| Pi-2 Bus | ||
|- | |- | ||
! Pin | ! Pin | ||
| Line 145: | Line 145: | ||
{| class="table arm-compatibility" | {| class="table arm-compatibility" | ||
| | | | ||
! style="background: | ! style="background: var(--color-inverted)" | Mainline kernel | ||
|- | |- | ||
! Ethernet | ! Ethernet | ||
| Line 162: | Line 162: | ||
* [https://www.libre.computer/products/rk3328/ Official product page] | * [https://www.libre.computer/products/rk3328/ Official product page] | ||
* [https://roc-rk3328-cc.readthedocs.io/en/latest/intro.html Official Getting Started Guide] | * [https://roc-rk3328-cc.readthedocs.io/en/latest/intro.html Official Getting Started Guide] | ||
[[Category:NixOS on ARM]] | |||