NixOS on RISCV/VisionFive 2: Difference between revisions
imported>Onny Add guide on how to flash image |
Add note on how to update firmware |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RISC-V/breadcrumb}} | ||
<div class="infobox"> | <div class="infobox"> | ||
{|class="table" | {|class="table" | ||
Line 92: | Line 92: | ||
</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/ | 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. | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
dd if=result/sd-image/nixos-sd-image-23.11pre-git-riscv64-linux-starfive-visionfive2.img of=/dev/mmcblk0 status=progress | dd if=result/sd-image/nixos-sd-image-23.11pre-git-riscv64-linux-starfive-visionfive2.img of=/dev/mmcblk0 status=progress | ||
</syntaxhighlight> | |||
= Usage = | |||
First enable booting from SD-card by enabling jumper 1 and 2 | |||
[[File:Visionfive 2 jumper config sdcard boot.jpg|thumb|Move jumpers to the right away from the numbers to enable SD-card booting|none]]For UART access, wire GND (black), RX (blue) and TX (purple) to your adapter | |||
[[File:Visionfive2 uart wiring.jpg|none|thumb]]Update board firmware<syntaxhighlight lang="bash"> | |||
sudo visionfive2-firmware-update-flash | |||
</syntaxhighlight>Bootstrap NixOS system configuration at <code>/etc/nixos/configuration.nix</code><syntaxhighlight lang="bash"> | |||
nixos-generate-config | |||
</syntaxhighlight> | </syntaxhighlight> |