Exotic Nix Targets | 334 Members | |
| 105 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 Mar 2022 | ||
| What is that? Is that the same as the binfmt trick? | 22:30:34 | |
| And yes, this builds on top of floweringash's module. Adds support for riscv, and then I'm adding in some more niceties tonight. | 22:30:59 | |
| And I'm sad to see the notes about overlayfs but really appreciate you sharing them since I was going to head in that direction. I might have a few ideas beyond wanting to try myself and see if things have improved. | 22:33:00 | |
| And of course thank you for this module. I've hacked on it a fair bit by now but I wouldn't have had the ... gumption to do this all from scratch | 22:33:39 | |
In reply to @colemickens:matrix.orgYep | 23:34:16 | |
| 16 Mar 2022 | ||
| Re: qemu, looks like the
Let me know if anyone figures it out before I do, chasing qemu bugs is fairly time consuming. | 07:55:09 | |
In reply to @colemickens:matrix.orgqemu-user is what's actually doing the work. binfmt_misc is just the mechanism that tells the kernel to run qemu-user on files that match certain patterns. | 08:02:02 | |
| I had been told that was unreliable in the past, but maybe that was just the binfmt bit? | 18:30:55 | |
| Also qemu 7 looks interesting though I'm unsure if it's super useful beyond allowing more cores on the riscv virt board which... If nothing else should be nice. | 18:31:32 | |
In reply to @colemickens:matrix.orgNo, that would be qemu-user itself. The binfmt glue just tells the kernel to load RISC-V executables using qemu when attempting to execute a RISC-V binary. | 22:18:51 | |
| Is it worth it to run qemu-user, build as much as possible, then run qemu-system to build the rest? I think I'd generally prefer trustable/reliable over "faster" for this sort of thing. | 22:19:38 | |
| It breaks at times (mostly when running tests), but it's a handful of patches in total. Most things can also be fixed (although I haven't dared looking at qemu's user emulation code yet) | 22:20:05 | |
| In that case, system would be the best choice yeah | 22:20:14 | |
| I am (or was) trying to keep up with nixos-master, which is slow enough as-is with qemu-user | 22:20:41 | |
| huh, I have to look into qemu-user and figure out what magic it's supposedly doing. I don't have any idea how it works | 22:20:58 | |
| It's fairly simple in theory. It dynamically translates all RISC-V instructions to x86 and intercepts all syscalls to call their native counterpart. | 22:22:12 | |
| one more question to put this together in my head -- is there an advantage to using qemu-user versus using binfmt and trying ot use nix directly? | 22:23:29 | |
| * one more question to put this together in my head -- is there an advantage to using qemu-user (standalone) versus using binfmt and trying ot use nix directly? | 22:23:41 | |
| * one more question to put this together in my head -- is there an advantage to using qemu-user (standalone) versus using binfmt and trying ot use nix directly? ( I guess I'm assuming qemu-user is used similarly to qemu-system, but maybe not) | 22:23:53 | |
| In practice, some things turn out to be quite difficult. Emulation of threading for example (there's a ticket about occasional deadlocks, but sadly the status is that it's pretty much unfixable) | 22:24:01 | |
| You wouldn't use qemu-user standalone in this case - only though binfmt | 22:24:40 | |
You normally don't invoke qemu-user directly, you set up binfmt registrations (boot.binfmt.emulatedSystems is a helper to set it up) so kernel runs qemu-user for you | 22:24:50 | |
| I only called it directly when I was debugging qemu issues and hadn't get discovered you can influence its arguments via the environment (that also works with binfmt inbetween) | 22:25:39 | |
| * I only called it directly when I was debugging qemu issues and hadn't yet discovered you can influence its arguments via the environment (that also works with binfmt inbetween) | 22:25:47 | |
| I spent some time looking into systemd-boot on RISC-V recently btw. Encountered another reason to patch VisionFive u-boot: https://github.com/u-boot/u-boot/commit/66028930dac08f7116b5e3cdba35c3e65676c0cd | 22:28:57 | |
| (though it can be worked around) - tl;dr EFI bug in u-boot, triggered by systemd-boot | 22:31:06 | |
In reply to @colemickens:matrix.orgIt's also quite possible for there to be qemu bugs which affect both -user and -system | 22:41:05 | |
| Possible, but I'm not sure about quite. The TCG layer seems okay compared to all of the syscall emulation going on, and everything shared with x86/kvm is solid. | 22:49:33 | |
| 17 Mar 2022 | ||
| https://forum.rvspace.org/t/create-debian-system-image-on-risc-v-visionfive/234 | 13:43:16 | |
| I think we can make a video like this. | 13:43:22 | |