| 13 Mar 2022 |
colemickens | how's the riscv64 qemu perf on x86_64-linux? I'm trying to figure out if I should be building on device or if I'm better off just paying a few bucks to boot a Threadripper and let it go once a week. | 03:45:26 |
Zhaofeng Li | On my 3900X, qemu-system was roughly on par with my HiFive Unmatched in the single-core 7z b benchmark. qemu-user binfmt was considerably faster, but some packages don't build. | 03:55:03 |
colemickens | it's easy to workaround but the visionfive nixos module isn't part of the flake outputs | 04:09:45 |
colemickens | also curious if theres a wider riscv64 matrix room | 04:14:45 |
Jamie | wider riscv64 is called riscv128 | 05:52:34 |
Jamie | :3 | 05:52:35 |
[0x4A6F] | In reply to @colemickens:matrix.org so, my visionfive board arrived, and I figured I'd use the microsd they sent and then I start to open and notice this: https://photos.app.goo.gl/5TnSws4szCYktRm99 Surgically provisioned fedora RISC-V image.. | 09:01:14 |
[0x4A6F] |  Download 636d621e-0b07-4ace-b9d4-9102ea840552.jpg | 09:02:29 |
[0x4A6F] | In reply to @colemickens:matrix.org also curious if theres a wider riscv64 matrix room There is also #riscv-main:matrix.org | 09:09:45 |
[0x4A6F] | In reply to @colemickens:matrix.org also curious if theres a wider riscv64 matrix room * There is also #riscv-main:matrix.org in the #riscv:matrix.org space | 09:11:08 |
[0x4A6F] | * There is also #riscv-main:matrix.org in the #riscv:matrix.org space (unofficial) | 09:30:53 |
colemickens | Any idea if uboot riscv cross-compiles? I'm close to something neat, if so. | 23:57:20 |
colemickens | I'll play with the nixpkgs branch after a bit, gotta do a call | 23:57:29 |
| 14 Mar 2022 |
Zhaofeng Li | In reply to @colemickens:matrix.org Any idea if uboot riscv cross-compiles? I'm close to something neat, if so. Yes it does | 00:04:50 |
colemickens | hm, I'm trying to boot qemu with an opensbi build with the kernel as a FW_PAYLOAD and then directly loading kernel but it's not going super well so far -_- | 01:45:00 |
Zhaofeng Li | What's your command line? Which OpenSBI build are you using? | 01:45:45 |
colemickens | Zhaofeng Li: https://github.com/colemickens/nixcfg/blob/main/modules/other-arch-vm.nix#L13-L15 | 01:46:55 |
colemickens | I'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 this | 01:47:26 |
colemickens | 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 | going off of : https://github.com/riscv-software-src/opensbi/blob/master/docs/platform/qemu_virt.md | 01:48:40 |
colemickens | oh, maybe I'm doing it wrong | 01:49:15 |
colemickens | the 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 for | 01:49:38 |
Zhaofeng Li | Usually you can just skip the -bios flag and use qemu's built-in opensbi | 01:52:43 |
Zhaofeng Li | If you don't care which version is being used | 01:52:55 |
colemickens | which I guess implies the fw_jump.elf, which I think should be pretty close to what I have here... :/ hm | 01:54:16 |
colemickens | (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 | Oh, s/fw_jump.elf/fw_jump.bin/g and removing a arm kernel conf tweak and let's see how it goes | 02:01:10 |
colemickens | there we go, a kernel panic at least | 02:01:52 |
colemickens | ah maybe initrd doesn't work this way though: Initramfs unpacking failed: write error | 02:02:29 |
colemickens | and sure enough the default bios gets me to the same place, thanks for saying ;) | 02:04:11 |