!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

196 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux https://github.com/orgs/NixOS/teams/risc-v58 Servers

Load older messages


SenderMessageTime
14 Sep 2025
@emma:rory.gay@emma:rory.gay joined the room.08:40:01
@faukah:faukah.comfaukah joined the room.16:42:32
16 Sep 2025
@haras-unicorn:matrix.org@haras-unicorn:matrix.org left the room.16:16:19
21 Sep 2025
@abrasaxtes:matrix.orgMichael joined the room.17:20:55
22 Sep 2025
@dramforever:matrix.orgdramforeverhi, has anyone been using the visionfive 2 sd card image in sd boot mode? can you confirm that it works from a fresh dd? https://github.com/NixOS/nixos-hardware/tree/master/starfive/visionfive/v210:10:47
@dramforever:matrix.orgdramforeverso to check for sure, if you're in sd card mode and you remove the sd card it should immediately print an error like "boot fail" or something, no mention of u-boot spl10:11:27
@dramforever:matrix.orgdramforeverwell remove the sd card before booting10:11:40
@alex:tunstall.xyzAlex
In reply to @dramforever:matrix.org
hi, has anyone been using the visionfive 2 sd card image in sd boot mode? can you confirm that it works from a fresh dd? https://github.com/NixOS/nixos-hardware/tree/master/starfive/visionfive/v2
I have used it to boot custom M mode code instead of the SPL and it worked.
10:12:42
@dramforever:matrix.orgdramforeverthanks!10:13:19
@alex:tunstall.xyzAlexDo you need help debugging boot problems?10:13:39
@dramforever:matrix.orgdramforever i'm good, someone was asking in liberachat #riscv about the boot process, and was doubting if the gpt partition thing is real 10:14:32
@dramforever:matrix.orgdramforeveri don't have the hardware with me so i was just looking for a positive confirmation that it's a real thing10:15:00
@alex:tunstall.xyzAlexAh, because the vendor revised all their documentation to recommend against using it, in some cases even removing references to it.10:15:10
@alex:tunstall.xyzAlexI might still have copies of some older versions of the documentation if it's no longer well documented.10:15:40
23 Sep 2025
@outfoxxed:outfoxxed.meoutfoxxed Continuing from last night in the main room here https://matrix.to/#/#users:nixos.org/$9PGx1smm5r8lM79J9wKW3uiI3zyGLogHe7d0t9DOjn0,
I'm attempting to get a milkv jupiter booting. So far I've made it here with an sdcard image:
[    2.094640] Warning: unable to open an initial console.
[    2.108202] Freeing unused kernel image (initmem) memory: 11332K
[    2.118470] Checked W+X mappings: passed, no W+X pages found
[    2.121250] Run /init as init process
[    2.124855]   with arguments:
[    2.127799]     /init
[    2.130048]   with environment:
[    2.133182]     HOME=/
[    2.135523]     TERM=linux
[    2.252879] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    2.257607] CPU: 1 PID: 1 Comm: init Not tainted 6.6.63 #1-NixOS
[    2.263589] Hardware name: Milk-V(M1) Jupiter (DT)
[    2.268364] Call Trace:
[    2.270797] [<ffffffff800070f2>] dump_backtrace+0x28/0x30
[    2.276177] [<ffffffff811e6ac6>] show_stack+0x38/0x44
[    2.281211] [<ffffffff8120863e>] dump_stack_lvl+0x44/0x5c
[    2.286593] [<ffffffff8120866e>] dump_stack+0x18/0x20
[    2.291627] [<ffffffff811e6dbc>] panic+0x11a/0x302
[    2.296401] [<ffffffff80026b2e>] do_exit+0x930/0x936
[    2.301349] [<ffffffff80026cd6>] do_group_exit+0x30/0x80
[    2.306644] [<ffffffff80026d4a>] __wake_up_parent+0x0/0x2c
[    2.312114] [<ffffffff81209318>] do_trap_ecall_u+0x12a/0x13e
[    2.317756] [<ffffffff8121575c>] ret_from_exception+0x0/0x64
[    2.323404] SMP: stopping secondary CPUs
[    2.327332] Kernel Offset: 0x0 from 0xffffffff80000000
[    2.332431] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 ]---
with the commandline:
[    0.000000] Kernel command line: earlycon=sbi console=ttyS0,115200n8 loglevel=8 swiotlb=65536 init=/nix/store/yqr77mh0018a3ln6m57qks91vv0ms1dq-nixos-system-jupiter-sd-card-25.11pre-git/init debug lsm=landlock,yama,bpf boot.debugtrace

and I'm not sure where to go from here, because it doesn't seem to be starting init (or I'm just getting no logs, I see nothing about ttyS0 actually coming online)
04:47:44
@outfoxxed:outfoxxed.meoutfoxxedI've also copied the init binary in the nix store to /init in the rootfs, though I don't know if the kernel is trying to load from there or initrd04:48:24
@outfoxxed:outfoxxed.meoutfoxxedmade it to stage1 by manually loading everything, extlinux still won't09:17:41
@outfoxxed:outfoxxed.meoutfoxxedimage.png
Download image.png
09:17:42
@a-kenji:matrix.orgkenji changed their display name from a-kenji to kenji.10:37:26
@alex:tunstall.xyzAlex
In reply to @outfoxxed:outfoxxed.me
I've also copied the init binary in the nix store to /init in the rootfs, though I don't know if the kernel is trying to load from there or initrd

The kernel always tries to load binaries in the initramfs (or initrd). After that, userspace can do whatever it wants. Typically, that means mounting the rootfs and execing the rootfs' init program.

If you don't see NixOS' "Stage 1" prompt, then it's likely failing to load the initramfs' init program.

12:36:08
@alex:tunstall.xyzAlex
In reply to @outfoxxed:outfoxxed.me
Continuing from last night in the main room here https://matrix.to/#/#users:nixos.org/$9PGx1smm5r8lM79J9wKW3uiI3zyGLogHe7d0t9DOjn0,
I'm attempting to get a milkv jupiter booting. So far I've made it here with an sdcard image:
[    2.094640] Warning: unable to open an initial console.
[    2.108202] Freeing unused kernel image (initmem) memory: 11332K
[    2.118470] Checked W+X mappings: passed, no W+X pages found
[    2.121250] Run /init as init process
[    2.124855]   with arguments:
[    2.127799]     /init
[    2.130048]   with environment:
[    2.133182]     HOME=/
[    2.135523]     TERM=linux
[    2.252879] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    2.257607] CPU: 1 PID: 1 Comm: init Not tainted 6.6.63 #1-NixOS
[    2.263589] Hardware name: Milk-V(M1) Jupiter (DT)
[    2.268364] Call Trace:
[    2.270797] [<ffffffff800070f2>] dump_backtrace+0x28/0x30
[    2.276177] [<ffffffff811e6ac6>] show_stack+0x38/0x44
[    2.281211] [<ffffffff8120863e>] dump_stack_lvl+0x44/0x5c
[    2.286593] [<ffffffff8120866e>] dump_stack+0x18/0x20
[    2.291627] [<ffffffff811e6dbc>] panic+0x11a/0x302
[    2.296401] [<ffffffff80026b2e>] do_exit+0x930/0x936
[    2.301349] [<ffffffff80026cd6>] do_group_exit+0x30/0x80
[    2.306644] [<ffffffff80026d4a>] __wake_up_parent+0x0/0x2c
[    2.312114] [<ffffffff81209318>] do_trap_ecall_u+0x12a/0x13e
[    2.317756] [<ffffffff8121575c>] ret_from_exception+0x0/0x64
[    2.323404] SMP: stopping secondary CPUs
[    2.327332] Kernel Offset: 0x0 from 0xffffffff80000000
[    2.332431] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 ]---
with the commandline:
[    0.000000] Kernel command line: earlycon=sbi console=ttyS0,115200n8 loglevel=8 swiotlb=65536 init=/nix/store/yqr77mh0018a3ln6m57qks91vv0ms1dq-nixos-system-jupiter-sd-card-25.11pre-git/init debug lsm=landlock,yama,bpf boot.debugtrace

and I'm not sure where to go from here, because it doesn't seem to be starting init (or I'm just getting no logs, I see nothing about ttyS0 actually coming online)
IIRC both initramfs and rootfs use systemd as the init program.
In my experience, systemd is very picky of what state it expects the system to be in and doesn't touch the stdout or stderr provided by the kernel even if it can't/hasn't set up logging yet. Maybe there is an option or environment variable to make it less stupid?
See if you can get ahold of any logs recorded by journald?
12:41:14
25 Sep 2025
@dramforever:matrix.orgdramforever @outfoxxed:outfoxxed.me: https://gist.github.com/cyyself/a07096e6e99c949ed13f8fa16d884402#off-topic-strange-pxa-uart 20:44:28
@dramforever:matrix.orgdramforever

A simple work around can be turn on CONFIG_RISCV_SBI_V01, CONFIG_NONPORTABLE and CONFIG_HVC_RISCV_SBI, then use console=hvc0 so we will have a pulling based uart for debugging purpose.

20:44:46
@dramforever:matrix.orgdramforeveri'm not entirely sure what the vendor kernel has20:45:18
@dramforever:matrix.orgdramforeverbut it should have the sbi stuff and hvc_riscv_sbi20:45:33
@outfoxxed:outfoxxed.meoutfoxxedI've seen pxa-uart in dmesg before at least20:45:46
@dramforever:matrix.orgdramforeverand maybe also earlycon_sbi, but i forgot what that's called20:45:46
@dramforever:matrix.orgdramforeveryeah but remember "unable to open an initial console"?20:46:10
@dramforever:matrix.orgdramforeveri think this is why init isn't printing anything before dying20:46:22
@outfoxxed:outfoxxed.meoutfoxxedyeah I've been ignoring those issues and booting with booti + bootargs20:46:25

Show newer messages


Back to Room ListRoom Version: 10