nixos-riscv/README.md

51 lines
902 B
Markdown
Raw Normal View History

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.
2024-10-11 09:34:18 +02:00
## Lagarto Ox on FPGA Alveo U55C
2024-03-01 18:43:24 +01:00
2024-10-11 09:34:18 +02:00
To build the system and boot it on an FPGA of the MEEP cluster, you can run the
following:
2023-02-16 13:23:11 +01:00
2024-01-17 18:24:36 +01:00
```
2024-10-11 09:34:18 +02:00
$ nix develop -L '.#lagarto-ox' --command fpga/run-remotely.sh fpgalogin1:ci
2024-01-17 18:24:36 +01:00
```
2023-02-16 13:23:11 +01:00
2024-10-11 09:34:18 +02:00
To do it manually, you can first enter the development shell:
2024-01-17 18:24:36 +01:00
```
2024-10-11 09:34:18 +02:00
$ nix develop -L '.#lagarto-ox'
2024-01-17 18:24:36 +01:00
```
2024-01-25 15:50:33 +01:00
2024-10-11 09:34:18 +02:00
Then upload the files to the target machine (fpgalogin1 by default):
2024-01-25 15:50:33 +01:00
```
2024-10-11 09:34:18 +02:00
$ fpga/upload.sh
2024-01-25 15:50:33 +01:00
```
2024-03-01 18:43:24 +01:00
2024-10-11 09:34:18 +02:00
Then connect to the fpgalogin1 machine, allocate a FPGA node and load the
environment there:
2024-03-04 18:32:25 +01:00
```
2024-10-11 09:34:18 +02:00
$ cd nixos
$ . env.sh
2024-03-04 18:32:25 +01:00
```
2024-10-11 09:34:18 +02:00
Flash the images to the FPGA:
2024-03-04 18:32:25 +01:00
```
2024-10-11 09:34:18 +02:00
$ ./fpgactl -w bitstream.bit -b opensbi.bin -k kernel.bin -i initrd.bin -r rootfs.img
2024-03-04 18:32:25 +01:00
```
2024-10-11 09:34:18 +02:00
And monitor the serial line:
2024-03-01 18:43:24 +01:00
```
2024-10-11 09:34:18 +02:00
$ picocom -q -b 115200 $FPGACTL_UART
2024-03-01 18:43:24 +01:00
```
2024-03-07 16:52:28 +01:00
2024-10-11 09:34:18 +02:00
It should boot without any user interaction.
## Lagarto Hun
WIP