| 13 Mar 2022 |
[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 |
colemickens | there we go, some more memory and it seems to be going | 02:08:10 |
colemickens | alright, looks like I'm bumping into some stuff since riscv-cached is "old", I might try to rebase it | 03:10:26 |
colemickens | 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 joined the room. | 08:17:25 |
| 15 Mar 2022 |
colemickens | 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 |
colemickens | * 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 |
Linux Hackerman is moving: @linus:schreibt.jetzt | 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 |