| 12 Mar 2026 |
dramforever | nixos? or just nix | 07:02:14 |
Alister Galpin | Nixos | 07:02:27 |
dramforever | also we don't really have prebuilt stuff for riscv so maybe it's not going to be much less pain | 07:02:36 |
Alister Galpin | True, but might make the iterations faster, last attempt took 2 days of compiling 😅 | 07:03:42 |
Alister Galpin | And then the image didn't boot ran out of time and now that's 6 months ago at least | 07:04:47 |
| 13 Mar 2026 |
| eljamm joined the room. | 10:30:39 |
eljamm | Hello, can someone please help test this program? the executable seems to be working, but I have no clue how to test the module. | 10:34:42 |
Alex | In reply to @eljamm:matrix.org Hello, can someone please help test this program? the executable seems to be working, but I have no clue how to test the module. It's not 100% reliable, but you can try in qEMU.
Otherwise, for the most reliable results, you will need to wait a few days for someone to do a full native build of your branch. | 18:05:40 |
| 16 Mar 2026 |
eljamm | Thanks, I'm looking into doing this right now with this NixOS test. Things are a bit cursed, because I had to enable binfmt for riscv64-linux in my system to get the test to even start, but inside that I'm also supposed to test Linux emulation for RISC-V 😅
Now, the test is just hanging here:
machine: Guest root shell did not produce any data yet...
machine: To debug, enter the VM and run 'systemctl status backdoor.service'.
machine: Guest root shell did not produce any data yet...
machine: To debug, enter the VM and run 'systemctl status backdoor.service'.
| 12:44:05 |
eljamm | * Thanks, I'm looking into doing this right now with this NixOS test. Things are a bit cursed, because I had to enable binfmt for riscv64-linux in my system to get the test to even start, but inside that I'm also supposed to test Linux emulation for RISC-V 😅
This said, the test is just hanging here:
machine: Guest root shell did not produce any data yet...
machine: To debug, enter the VM and run 'systemctl status backdoor.service'.
machine: Guest root shell did not produce any data yet...
machine: To debug, enter the VM and run 'systemctl status backdoor.service'.
| 12:44:47 |
dramforever | oh, dear... | 15:53:26 |
Alex | That's not a good sign.
The backdoor service that the test driver uses to control the VM is not printing the sentinel value that the test driver recognises as "VM is ready". There are a number of ways for this to go wrong, none of which are easy to identify without logs.
It might not be writing system logs to a visible location.
Can you try adding this to the VM's system configuration?
boot.kernelParams = [ "console=ttyS0" "console=hvc0" ];
One of these console options might allow you to see kernel and early userspace logs. | 15:58:21 |
dramforever | i don't know what other logs are showing up, but if that's all that's shown maybe the vm didn't work at all | 15:59:49 |
Alex | True, and if necessary one could also try the early console option. | 16:00:56 |
Alex | Is anyone able to build the latest Nixpkgs natively?
My build is failing during xgcc.
checking for suffix of object files... configure: error: in `/build/build/riscv64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
| 16:01:19 |
dramforever | maybe powerline10k | 16:03:42 |
dramforever | * maybe https://github.com/NixOS/nixpkgs/pull/498702 | 16:03:52 |
Alex | I could try the parent of that merge commit.
The only other option is bisecting, which would probably take days/weeks to find the problematic commit. | 16:04:54 |
dramforever | huh, i'd have thought that would have fixed it | 16:06:23 |
Alex | Ah nevermind, my nixpkgs is older, so I should probably try that commit.
dramforever thanks. | 16:06:24 |
dramforever | do you have more logs | 16:06:25 |
eljamm | Download felix86-with-params.log | 16:42:54 |
eljamm | Download felix86.log | 16:42:55 |
eljamm | These are the log files. When I pass those parameters, the test seems like it moves past the backdoor.service part, but it still doesn't seem to be doing much either. It's also pretty slow. | 16:45:30 |
Alex | Oh so you are getting kernel logs even without setting console=....
One of the annoying things about systemd is that it doesn't log anything useful during boot.
Btw the console=... isn't really helping, even if it no longer prints warnings about backdoor.service, because it's still unable to send commands to the VM.
You could I guess try building the driverInteractive version of the test, then inside the interactive prompt run machine.shell_interact() to get a prompt (assuming this doesn't require the backdoor service, which it might).
It's also pretty slow.
I think that's because you're emulating RISC-V using binfmt emulation to run a riscv64-linux build of qEMU to run the test? That sounds to me like you have qEMU running under qEMU. | 18:48:52 |
Alex | Possibly you might just need to wait long enough for backdoor.service to come online.
How long have you given it? | 18:51:47 |
| 17 Mar 2026 |
Alex | Update: it worked, thanks. | 00:22:11 |
eljamm |
You could I guess try building the driverInteractive version of the test, then inside the interactive prompt run machine.shell_interact() to get a prompt (assuming this doesn't require the backdoor service, which it might).
I tried that, but I wasn't able to do anything:
- shell_interact(): same issues and doesn't give return a shell
- ssh backdoor: crashes the VM
It's also pretty slow.
I think that's because you're emulating RISC-V using binfmt emulation to run a riscv64-linux build of qEMU to run the test? That sounds to me like you have qEMU running under qEMU.
When I first read this comment, I thought so as well, but then it got me thinking: why not enable binfmt inside the test itself? So I commented out everything I previously made and did just that. Performance-wise, everything seemed ... fine, actually.
The test fails ofc, because the package wasn't installed. But then I noticed something interesting:
{
# the package works when installed directly
environment.systemPackages = [
pkgs.pkgsCross.riscv64.felix86
];
}
Whereas:
{
# enabling the module, I get the previous issue with `backdoor.service`
programs.felix86.enable = true;
}
Investigating further, I tracked this back to the felix86 boot.binfmt.registrations. More importantly, the logs now actually print something useful:
machine # [ 6.846377] systemd[1]: lastlog2-import.service: Failed to spawn executor: Exec format error
machine # [ 6.852359] systemd[1]: lastlog2-import.service: Failed to spawn 'start' task: Exec format error
machine # [ 6.857462] firewall-start[607]: /nix/store/qhsrmq9784wvy0la4nr62dhgrjwn93sv-firewall-start/bin/firewall-start: line 105: /nix/store/s657hsrj1cknm7c4cbi87f6w7f3mlv11-iptables-1.8.11/bin/iptables: cannot execute binary file: Exec format error
Then everything clicked: my system is x86_64-linux and I'm using binfmt to emulate risc64-linux, but the module also enables emulation in the other direction, after which chaos ensues.
I already suspected this would happen, but I'm glad to actually confirm it. In a way, this kinda means the module's binfmt registration is working and I can just disable it for now in the test.
| 12:52:49 |
eljamm | *
You could I guess try building the driverInteractive version of the test, then inside the interactive prompt run machine.shell_interact() to get a prompt (assuming this doesn't require the backdoor service, which it might).
I tried that, but I wasn't able to do anything:
- shell_interact(): same issues and doesn't return a shell
- ssh backdoor: crashes the VM
It's also pretty slow.
I think that's because you're emulating RISC-V using binfmt emulation to run a riscv64-linux build of qEMU to run the test? That sounds to me like you have qEMU running under qEMU.
When I first read this comment, I thought so as well, but then it got me thinking: why not enable binfmt inside the test itself? So I commented out everything I previously made and did just that. Performance-wise, everything seemed ... fine, actually.
The test fails ofc, because the package wasn't installed. But then I noticed something interesting:
{
# the package works when installed directly
environment.systemPackages = [
pkgs.pkgsCross.riscv64.felix86
];
}
Whereas:
{
# enabling the module, I get the previous issue with `backdoor.service`
programs.felix86.enable = true;
}
Investigating further, I tracked this back to the felix86 boot.binfmt.registrations. More importantly, the logs now actually print something useful:
machine # [ 6.846377] systemd[1]: lastlog2-import.service: Failed to spawn executor: Exec format error
machine # [ 6.852359] systemd[1]: lastlog2-import.service: Failed to spawn 'start' task: Exec format error
machine # [ 6.857462] firewall-start[607]: /nix/store/qhsrmq9784wvy0la4nr62dhgrjwn93sv-firewall-start/bin/firewall-start: line 105: /nix/store/s657hsrj1cknm7c4cbi87f6w7f3mlv11-iptables-1.8.11/bin/iptables: cannot execute binary file: Exec format error
Then everything clicked: my system is x86_64-linux and I'm using binfmt to emulate risc64-linux, but the module also enables emulation in the other direction, after which chaos ensues.
I already suspected this would happen, but I'm glad to actually confirm it. In a way, this kinda means the module's binfmt registration is working and I can just disable it for now in the test.
| 12:54:51 |
| colemickens joined the room. | 19:36:38 |