Exotic Nix Targets | 354 Members | |
| 111 Servers |
| Sender | Message | Time |
|---|---|---|
| 14 Mar 2022 | ||
| 08:17:25 | ||
| 15 Mar 2022 | ||
| I don't have it all polished up yet, I'm going to make it more efficient and use virtiofsd, but I have a nixos module that will build a cross-compiled qemu with an ssh port forwarded for use as a native builder. | 01:39:37 | |
| * I don't have it all polished up yet, I'm going to make it more efficient and use virtiofsd, but I have a nixos module that will build a cross-compiled vm and systemd service to run qemu with an ssh port forwarded for use as a native builder. | 01:40:04 | |
In reply to @colemickens:matrix.orgHave you seen thefloweringash's module for more or less that? | 13:24:56 | |
| if you do pick up my module, a couple of points: it assumes that overlayfs doesn't work due to a O_LARGEFILE test failure I ran into with go, so on boot it does a one-off file copy of the initial store from the host store over virtio which takes a number of minutes (virtiofs is apparently slooooow). and the other thing is the ssh host key seems unreliable. it's stored on the host for persistence over reboots, and also served over virtio, but every so often sshd just reports that it can't read it. I never got to the bottom of it, but maybe just copy that to /etc/ssh on startup too. | 13:37:31 | |
| if you dig around in the history you'll see me trying a bunch of different approaches (squashfs, tarball, overlayfs) before arriving at the slow but boringly standard "files on ext4" | 13:38:28 | |
| * EDIT: I did not send nor intend to send such an email, and the question was a rhetorical device. We have had a talk and cleared the air, and Matt clarified to the vendor that he does not represent the Nix community as previously discussed in here. I am confident that we've come to an understanding and that this won't happen in the same way again and look forward to working together productively :) Leaving the original message as context: matthewcroughan - nix.zone: how would you feel about me sending this email to the VisionFive people along with a transcript of this chat? Hi, It's come to my attention that you're corresponding with Matthew Croughan about getting some VisionFive development boards into the hands of NixOS developers who would work on getting NixOS working on them. I'd love to see this initiative succeed! However, I'm somewhat concerned that Matt might have unintentionally misled you concerning the level of organisation and commitment of the initiative. For the sake of transparency, I thought I'd let you know about this. Please find attached a transcript of the discussion we had in the public "Exotic Nix Targets" Matrix channel (#exotic:nixos.org) concerning the matter, I'll leave forming an opinion on the matter up to you. Hoping we'll still get those boards! | 16:37:34 | |
In reply to @linus.heckemann:matrix.mayflower.deI've had a talk with Matt and some others, and amended this message to add what's happened since. :) | 16:38:41 | |
| 18:06:30 | ||
In reply to @colemickens:matrix.orgConsider building with qemu-user as well, at least the speed figures posted here earlier suggest it really is a much faster. There are a few things you need to patch, but you can at least build the sdImage closure with it. | 18:42:00 | |
One out of 2 qemu-user bugs I submitted upstream had its status updated to 'in progress' today, so perhaps someone is looking at fixing those issues as well. | 18:43:29 | |
| 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 | |