!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

323 Members
101 Servers

Load older messages


SenderMessageTime
14 Mar 2022
@zhaofeng:zhaofeng.liZhaofeng LiWhat's your command line? Which OpenSBI build are you using?01:45:45
@colemickens:matrix.orgcolemickens Zhaofeng Li: https://github.com/colemickens/nixcfg/blob/main/modules/other-arch-vm.nix#L13-L15 01:46:55
@colemickens:matrix.orgcolemickensI'm using your riscv-cached brach, override-ing opensbi to set a payload, and then the bottom has the qemu invocation, but it looks like this01:47:26
@colemickens:matrix.orgcolemickens
qemu-system-riscv64 \
  -kernel "/nix/store/mm2klrf890qscrwr7ybxxwch4b8xw1mg-linux-riscv64-unknown-linux-gnu-5.15.11/Image" \
  -bios "/nix/store/4vnj9ldy7dag9vjs635nn3gp0iww6if6-opensbi-riscv64-unknown-linux-gnu-1.0/share/opensbi/lp64/generic/f
irmware/fw_jump.elf" \
  -initrd "/nix/store/mal116ylijyk27bag0m10src569h6qq9-initrd-linux-riscv64-unknown-linux-gnu-5.15.11/initrd" \
  -append "init=/nix/store/q1xj8xw9vh4wy8l2qv7f6dkakgh72nl7-nixos-system-nixos-22.05pre-git/init boot.shell_on_fail con
sole=ttyAMA0,115200 loglevel=4 closureInfo=56vjydrfrr8dm3vsywz9qmb81zx8iadh-closure-info-riscv64-unknown-linux-gnu" \
   \
   \
  -smp 4 \
  -machine virt \
   \
  -nographic \
  -drive if=none,id=hd0,file=$TMPDIR/scratch.raw,format=raw,werror=report,cache=unsafe \
  -fsdev local,id=state,path=$STATEDIR,security_model=none \
  -fsdev local,id=host-store,path=/nix/store,security_model=none,readonly=true \
  -device virtio-net-device,netdev=usernet \
  -netdev user,id=usernet,hostfwd=tcp:0.0.0.0:2222-:22 \
  -chardev stdio,mux=on,id=char0 \
  -mon chardev=char0,mode=readline \
  -serial "$serial" \
  "${extra_args[@]}"
01:47:54
@colemickens:matrix.orgcolemickensgoing off of : https://github.com/riscv-software-src/opensbi/blob/master/docs/platform/qemu_virt.md01:48:40
@colemickens:matrix.orgcolemickensoh, maybe I'm doing it wrong01:49:15
@colemickens:matrix.orgcolemickensthe example there doesn't have a kernel line... so it is embedding it into the opensbi, which I guess is what I was originally looking for01:49:38
@zhaofeng:zhaofeng.liZhaofeng LiUsually you can just skip the -bios flag and use qemu's built-in opensbi01:52:43
@zhaofeng:zhaofeng.liZhaofeng LiIf you don't care which version is being used01:52:55
@colemickens:matrix.orgcolemickenswhich I guess implies the fw_jump.elf, which I think should be pretty close to what I have here... :/ hm01:54:16
@colemickens:matrix.orgcolemickens(since I see now that it seems that I could either fw_jump+kernel or embed into opensbi and use fw_payload (though not sure why, that seems like extra steps and builds)01:55:01
@colemickens:matrix.orgcolemickensOh, s/fw_jump.elf/fw_jump.bin/g and removing a arm kernel conf tweak and let's see how it goes02:01:10
@colemickens:matrix.orgcolemickensthere we go, a kernel panic at least02:01:52
@colemickens:matrix.orgcolemickens ah maybe initrd doesn't work this way though: Initramfs unpacking failed: write error 02:02:29
@colemickens:matrix.orgcolemickensand sure enough the default bios gets me to the same place, thanks for saying ;)02:04:11
@colemickens:matrix.orgcolemickensthere we go, some more memory and it seems to be going02:08:10
@colemickens:matrix.orgcolemickensalright, looks like I'm bumping into some stuff since riscv-cached is "old", I might try to rebase it03:10:26
@colemickens:matrix.orgcolemickens wow this is basically all upstream in nixos-unstable already, fantastic Zhaofeng Li. it's so cool to get this board and have so much ready to go 03:43:21
@ma27:nicht-so.sexyma27 joined the room.08:17:25
15 Mar 2022
@colemickens:matrix.orgcolemickensI 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
@colemickens:matrix.orgcolemickens * 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
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @colemickens:matrix.org
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.
Have you seen thefloweringash's module for more or less that?
13:24:56
@thefloweringash:matrix.orgthefloweringashif 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
@thefloweringash:matrix.orgthefloweringashif 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
@linus.heckemann:matrix.mayflower.deLinux Hackerman *

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!
Linus

16:37:34
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @linus.heckemann:matrix.mayflower.de

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!
Linus

I've had a talk with Matt and some others, and amended this message to add what's happened since. :)
16:38:41
@matthewcroughan:defenestrate.itmatthewcroughan - nix.zone joined the room.18:06:30
@ius:nltrix.netius
In reply to @colemickens:matrix.org
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.
Consider 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
@ius:nltrix.netius 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
@colemickens:matrix.orgcolemickensWhat is that? Is that the same as the binfmt trick?22:30:34

There are no newer messages yet.


Back to Room ListRoom Version: 6