NixOS on RISCV/VisionFive 2: Difference between revisions
Restructure page |
Malteneuss (talk | contribs) m Update to 24.05 |
||
(One intermediate revision by one other user not shown) | |||
Line 37: | Line 37: | ||
There's also a port of the UEFI reference implementation EDK2 available at https://github.com/starfive-tech/edk2 to support a future generic RISCV Linux image that can be booted from any RISCV device. | There's also a port of the UEFI reference implementation EDK2 available at https://github.com/starfive-tech/edk2 to support a future generic RISCV Linux image that can be booted from any RISCV device. | ||
= | = Setup = | ||
Precompiled SD-card images can be found [https://hydra.nichi.co/job/nixos/riscv/visionfive2 on the Hydra instance] my NickCao. Before flashing the image, use <code>unzstd</code> to unpack the downloaded archive. | |||
=== Manually build a SD-card image === | |||
This example assumes you have the latest revision of the board (v1.3) with 8GB memory. For other configurations please consult the [https://github.com/NixOS/nixos-hardware/blob/master/starfive/visionfive/v2/README.md nixos-hardware documentation on this board]. First create this [[Flake]] file | This example assumes you have the latest revision of the board (v1.3) with 8GB memory. For other configurations please consult the [https://github.com/NixOS/nixos-hardware/blob/master/starfive/visionfive/v2/README.md nixos-hardware documentation on this board]. First create this [[Flake]] file | ||
{{file|flake.nix|nix|<nowiki> | {{file|flake.nix|nix|<nowiki> | ||
{ | { | ||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos- | inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; | ||
inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; | inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; | ||
Line 85: | Line 87: | ||
}; | }; | ||
system.stateVersion = " | system.stateVersion = "24.05"; | ||
}; | }; | ||
inherit system; | inherit system; | ||
Line 99: | Line 101: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
After successfull build, flash the resulting file in the directory <code>results/sd-image</code> to the target device, in this example the SD-card (<code>/dev/mmcblk*</code>). Note that everything on the target device gets erased. | === Flashing the SD-card image === | ||
After successfull build or unpack, flash the resulting file (build file is in the directory <code>results/sd-image</code>) to the target device, in this example the SD-card (<code>/dev/mmcblk*</code>). Note that everything on the target device gets erased. | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> |