Skip to content
README.md 902 B
Newer Older
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
# NixOS on RISC-V
This repository contains NixOS configurations for different RISC-V machines.

Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
## Lagarto Ox on FPGA Alveo U55C
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
To build the system and boot it on an FPGA of the MEEP cluster, you can run the
following:
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
```
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
$ nix develop -L '.#lagarto-ox' --command fpga/run-remotely.sh fpgalogin1:ci
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
```
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
To do it manually, you can first enter the development shell:
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed

```
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
$ nix develop -L '.#lagarto-ox'
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
```
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
Then upload the files to the target machine (fpgalogin1 by default):
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
$ fpga/upload.sh
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
Then connect to the fpgalogin1 machine, allocate a FPGA node and load the
environment there:
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
$ cd nixos
$ . env.sh
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
Flash the images to the FPGA:
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
$ ./fpgactl -w bitstream.bit -b opensbi.bin -k kernel.bin -i initrd.bin -r rootfs.img
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
And monitor the serial line:
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
$ picocom -q -b 115200 $FPGACTL_UART
Rodrigo Arias Mallo's avatar
Rodrigo Arias Mallo committed
It should boot without any user interaction.

## Lagarto Hun

WIP