Commit Graph

328 Commits

Author SHA1 Message Date
eac68c64ec Disable nsncd daemon in no-compressed.nix 2024-03-01 18:31:57 +01:00
5bb469d1a4 Add FPGA OpenSBI and U-Boot 2024-03-01 18:19:59 +01:00
0c2cfbe38d Add comment to make GC root 2024-01-25 15:50:33 +01:00
31ec3245e9 Ignore qcow2 image from git 2024-01-25 15:39:15 +01:00
0d9e494ba6 Include vim in the guest to edit files 2024-01-25 15:38:22 +01:00
960badad9b Enable recommended options in the kernel 2024-01-25 15:37:50 +01:00
9db6d05222 Remove old stdenv hack for the kernel 2024-01-25 15:37:18 +01:00
b7251e7a84 Build OpenSBI and u-boot without vector extension 2024-01-25 15:36:39 +01:00
483ad2944b Format the qcow2 image with ext4
The image needs to be available to the guest with a partition table and
a partition with a label named "nixos" so the stage1 can mount it. By
enabling the virtualisation.diskImage option we now have a persistent
root filesystem, including /home.
2024-01-25 15:34:59 +01:00
6a8eadb037 Add gcc and objdump developer tools 2024-01-24 13:10:09 +01:00
d52db1d97c Correct style type in flake.nix 2024-01-24 13:09:49 +01:00
630b8ac90f Remove old files 2024-01-24 13:09:30 +01:00
9653377ba5 Remove unneeded flake dependencies 2024-01-24 12:53:30 +01:00
5b8a51fb19 Add qemu and qemu-nc NixOS configurations 2024-01-24 12:50:41 +01:00
d3f97dac58 Remove visionfive references 2024-01-24 12:41:57 +01:00
358184f869 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370' (2024-01-15)
  → 'github:rodarima/nixpkgs/57e7c8fa4fdc414a936ce83afd0c70fb0a3a31d5' (2024-01-24)
2024-01-24 12:21:48 +01:00
8df89867f3 Switch nixpkgs to a custom repository
There is a problem in the way pkgsStatic is constructed, causing our
-march argument to be missed, leading to binaries that fail to run. This
affects only security wrappers so far (mount, sudo, ...) but it will
likely affect any pkgsStatic binary.
2024-01-24 12:20:27 +01:00
c0ecd32173 Remove unneeded override of stdenv
The march and mtune flags are passed by the crossSystem gcc attributes,
which are placed *before* the flags to gcc. This may end up causing some
packages to break, but it is working fine so far.
2024-01-24 10:00:19 +01:00
eff49c6ee3 Disable vector extensions in march and mtune 2024-01-24 09:59:44 +01:00
8ce6523c07 Install neofetch too 2024-01-24 09:58:57 +01:00
befd6e9e17 Enable autologin 2024-01-24 09:58:41 +01:00
4c413864b3 Add gdb and comment about nscd daemon 2024-01-22 16:05:38 +01:00
85eb9c63e3 Move notes out of readme 2024-01-22 13:42:49 +01:00
6de338a178 Remove old u-boot instructions 2024-01-22 13:42:00 +01:00
f8472b79e6 Disable compressed instructions in QEMU 2024-01-22 13:40:51 +01:00
f63408f361 Disable nsncd daemon for now as it fails to load
It is currently causing a trap, but the reason is not clear:

nsncd[1179]: unhandled signal 7 code 0x1 at 0x00ffffff8184e920 in libc.so.6[ffffff81824000+1aa000]
CPU: 3 PID: 1179 Comm: nsncd Not tainted 6.1.72 #1-NixOS
Hardware name: riscv-virtio,qemu (DT)
epc : 00ffffff8184e920 ra : 00ffffff8184e868 sp : 00ffffffef6ab610
 gp : 00aaaaaac0f07db8 tp : 00ffffff81822780 t0 : 00ffffffef6ab1f0
 t1 : 00aaaaaac0e5283c t2 : 0000000000000b56 s0 : 00ffffffef6ab668
 s1 : 0000000000000001 a0 : 0000000000000001 a1 : 00ffffffef6ab668
 a2 : 00ffffffef6ab678 a3 : 00aaaaaac0f06e40 a4 : 0000000100000000
 a5 : 00aaaaaac0eac296 a6 : 00ffffff819d3048 a7 : 00ffffffef6ab8c0
 s2 : 0000000000000000 s3 : 00aaaaaac0efac40 s4 : 00aaaaaac0e6755a
 s5 : 00ffffffef6ab678 s6 : 00aaaaaac0efac48 s7 : 00ffffff81a2fd58
 s8 : 00ffffff81a30030 s9 : 00ffffffd7386ef0 s10: 0000000000000000
 s11: 0000000000000000 t3 : 00ffffff8184e818 t4 : 0000000000000028
 t5 : 00ffffff81a24380 t6 : 00ffffff81a074c8
status: 0000000200004020 badaddr: 00aaaaaac0eac296 cause: 0000000000000000
2024-01-22 13:37:26 +01:00
3707e5708e Disable EFI in the kernel and use normal stdenv
In order to build the kernel without compressed instructions we need to
disable EFI support. We also need to leave the kernel to figure the
proper -march and -mabi flags, as otherwise it fails to build. Using the
option "CONFIG_RISCV_ISA_C n" disables the use of compressed
instructions.
2024-01-22 13:37:00 +01:00
a333210fdc Only change cross stdenv
Prevents mass rebuilds in x86, where the envvar doesn't have any effect.
2024-01-19 17:10:22 +01:00
635935cd09 Build packages without compressed instructions 2024-01-19 16:35:45 +01:00
98d04ee398 Also build u-boot ELF file for debugging 2024-01-19 16:32:40 +01:00
819c7e6e93 Build u-boot and the kernel without compressed 2024-01-19 16:31:53 +01:00
1acf425974 Add notes about compressed instructions 2024-01-19 16:27:58 +01:00
1fda5d7710 Set the bootcmd in u-boot
In QEMU the kernel is loaded at the ${kernel_addr_r} address and we need
to use booti instead of bootm.
2024-01-19 14:29:23 +01:00
bd80b0fefb Add default user and serial boot parameters 2024-01-19 13:43:32 +01:00
1e054892fc Increase SMP CPUs to 32 2024-01-19 13:43:14 +01:00
9a475bc1e3 Booting Linux and userspace OK 2024-01-19 12:35:05 +01:00
c6a304ca7d Load kernel in 0x84000000 address
Booting the kernel works, but by manually specifying the address.
2024-01-18 18:19:29 +01:00
5e2f6fcd0e Try to load the kernel from u-boot 2024-01-18 17:58:55 +01:00
af26facae4 Use the toplevel from the vm output 2024-01-18 17:58:26 +01:00
2f387d3362 Use custom u-boot build 2024-01-18 17:58:00 +01:00
5dbb297adf Fix qemu without rutabagaSupport 2024-01-18 15:59:51 +01:00
0b512ba9d1 Boot linux instead 2024-01-18 14:14:11 +01:00
6f6e735ba7 Fix cross build of systemd 254.6 2024-01-18 14:13:42 +01:00
Rodrigo Arias Mallo
7ad1b54572 Try building the system 2024-01-17 18:33:58 +01:00
Rodrigo Arias Mallo
8cd537665b Update README 2024-01-17 18:24:36 +01:00
Rodrigo Arias Mallo
81fd7f44fd Move script to boot.sh 2024-01-17 18:24:10 +01:00
Rodrigo Arias Mallo
f8b624af67 Boot opensbi without compressed 2024-01-17 18:22:30 +01:00
Rodrigo Arias Mallo
22de6d8297 Remove commented config 2024-01-17 15:18:27 +01:00
82b8c03966 Build system without compressed instructions 2024-01-17 15:01:11 +01:00
a99b3f4189 Disable kernel oprtions 2024-01-17 15:00:51 +01:00