Go to file
Rodrigo Arias Mallo 2cefcef63d Make busybox static
Now the problem is inside the busybox binary:

[   43.028000] Run /init as init process
[   43.033300]   with arguments:
[   43.037260]     /init
[   43.040000]   with environment:
[   43.044180]     HOME=/
[   43.047600]     TERM=linux
[   43.078020] init[1]: unhandled signal 4 code 0x1 at 0x0000000000010660 in busybox[10000+22d000]
[   43.090080] CPU: 0 PID: 1 Comm: init Not tainted 6.1.62 #1-NixOS
[   43.097580] Hardware name: Barcelona Supercomputing Center - Lagarto Ox (NixOS) (DT)
[   43.106480] epc : 0000000000010660 ra : 0000000000000000 sp : 0000003fd5489db0
[   43.114780]  gp : ffffffff8197ea48 tp : 0000000000000000 t0 : 0000000000000000
[   43.123080]  t1 : 0000000000000000 t2 : 0000000000000000 s0 : 0000000000000000
[   43.131340]  s1 : 0000000000000000 a0 : 0000000000000000 a1 : 0000000000000000
[   43.139620]  a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000
[   43.147900]  a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000
[   43.156180]  s2 : 0000000000000000 s3 : 0000000000000000 s4 : 0000000000000000
[   43.164860]  s5 : 0000000000000000 s6 : 0000000000000000 s7 : 0000000000000000
[   43.173140]  s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000
[   43.181420]  s11: 0000000000000000 t3 : 0000000000000000 t4 : 0000000000000000
[   43.189680]  t5 : 0000000000000000 t6 : 0000000000000000
[   43.196040] status: 0000000200004020 badaddr: 00000000034000ef cause: 0000000000000002
[   43.208240] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[   43.216340] CPU: 0 PID: 1 Comm: init Not tainted 6.1.62 #1-NixOS
[   43.222940] Hardware name: Barcelona Supercomputing Center - Lagarto Ox (NixOS) (DT)
[   43.231100] Call Trace:
[   43.234000] [<ffffffff800070c4>] dump_backtrace+0x38/0x48
[   43.240140] [<ffffffff809f063c>] show_stack+0x50/0x68
[   43.245900] [<ffffffff809fd1f8>] dump_stack_lvl+0x60/0x84
[   43.252000] [<ffffffff809fd23c>] dump_stack+0x20/0x30
[   43.257740] [<ffffffff809f0918>] panic+0x160/0x390
[   43.263200] [<ffffffff80020184>] do_exit+0xa70/0xa78
[   43.268820] [<ffffffff800203a4>] do_group_exit+0x44/0xb0
[   43.274780] [<ffffffff80031eec>] get_signal+0x9b4/0xa00
[   43.280700] [<ffffffff80005ca0>] do_work_pending+0x18c/0x610
[   43.287020] [<ffffffff80003880>] resume_userspace_slow+0x10/0x14
[   43.293960] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 ]---
2024-06-28 15:08:53 +02:00
fpga Remove unused PMEM regions 2024-06-28 15:08:24 +02:00
.gitignore Ignore qcow2 image from git 2024-01-25 15:39:15 +01:00
alveo-uart-sbi-hack.patch Working OpenSBI 1.2 2024-06-27 11:29:15 +02:00
boot.sh Format the qcow2 image with ext4 2024-01-25 15:34:59 +01:00
configuration.nix WIP 2024-05-28 18:12:14 +02:00
flake.lock Use remote bscpkgs input for riscv benchmarks 2024-06-05 14:26:12 +02:00
flake.nix Remove unused PMEM regions 2024-06-28 15:08:24 +02:00
lagarto-hun.nix WIP 2024-05-28 18:12:14 +02:00
lagarto-ox.nix Make busybox static 2024-06-28 15:08:53 +02:00
no-compressed.nix Add no compressed specific overlay 2024-03-07 12:04:05 +01:00
NOTES.md Add notes about kernel config file 2024-03-04 14:45:53 +01:00
opensbi-lagarto-hun.patch WIP 2024-05-28 18:12:14 +02:00
overlay.nix WIP 2024-05-28 18:12:14 +02:00
ox-alveo-platform-plic.patch Working OpenSBI 1.2 2024-06-27 11:29:15 +02:00
ox-alveo-platform.patch Working OpenSBI 1.2 2024-06-27 11:29:15 +02:00
ox-plic.dts Remove unused PMEM regions 2024-06-28 15:08:24 +02:00
ox.dts Reached U-Boot console with FDT parsing error 2024-06-27 16:08:30 +02:00
README.md Update readme with uboot instructions 2024-03-07 16:52:28 +01:00
u-boot-debug.patch Reached U-Boot console with FDT parsing error 2024-06-27 16:08:30 +02:00
unalign.c WIP 2024-05-28 18:12:14 +02:00
vm.nix WIP 2024-05-28 18:12:14 +02:00
xavi.dts Reached working U-Boot prompt 2024-06-27 17:58:21 +02:00

NixOS on RISC-V

This repository contains NixOS configurations for different RISC-V machines.

QEMU

To boot the system in QEMU, first enter the development shell:

$ nix develop

Then run the boot script:

$ ./boot.sh

To prevent the GC from erasing the system:

$ nix build .#devShells.x86_64-linux.default --out-link result-env

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:

cucu$ ./boot.sh
...

In the U-Boot prompt, paste the commands of the uboot.env file.