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
|
|
|
|
|
|
|
## FPGA
|
|
|
|
|
|
|
|
```
|
|
|
|
. fpga/env.sh
|
|
|
|
fpga/fpgactl -w /path/to/bitstream -b openpiton2.bin -k kernel-nixos -r initrd-nixos
|
|
|
|
```
|