2023-11-27 11:41:05 +01:00
|
|
|
# NixOS on RISC-V
|
2023-02-16 13:23:11 +01:00
|
|
|
|
2024-03-01 18:43:24 +01:00
|
|
|
This repository contains NixOS configurations for different RISC-V machines.
|
|
|
|
|
|
|
|
## QEMU
|
|
|
|
|
2024-01-17 18:24:36 +01:00
|
|
|
To boot the system in QEMU, first enter the development shell:
|
2023-02-16 13:23:11 +01:00
|
|
|
|
2024-01-17 18:24:36 +01:00
|
|
|
```
|
|
|
|
$ nix develop
|
|
|
|
```
|
2023-02-16 13:23:11 +01:00
|
|
|
|
2024-01-17 18:24:36 +01:00
|
|
|
Then run the boot script:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ ./boot.sh
|
|
|
|
```
|
2024-01-25 15:50:33 +01:00
|
|
|
|
|
|
|
To prevent the GC from erasing the system:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ nix build .#devShells.x86_64-linux.default --out-link result-env
|
|
|
|
```
|
2024-03-01 18:43:24 +01:00
|
|
|
|
2024-03-04 18:32:25 +01:00
|
|
|
## Lagarto Hun on FPGA Alveo U55C
|
|
|
|
|
|
|
|
First build required dependencies:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ nix develop '.#lagarto-hun'
|
|
|
|
```
|
|
|
|
|
|
|
|
Then upload to destination:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ fpga/upload.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
And then boot the system there:
|
2024-03-01 18:43:24 +01:00
|
|
|
|
|
|
|
```
|
2024-03-04 18:32:25 +01:00
|
|
|
cucu$ ./boot.sh
|
|
|
|
...
|
2024-03-01 18:43:24 +01:00
|
|
|
```
|
2024-03-07 16:52:28 +01:00
|
|
|
|
|
|
|
In the U-Boot prompt, paste the commands of the `uboot.env` file.
|