majiru / 9front-in-a-box

A nix flake for running 9front virtual machines with drawterm
40 stars 2 forks source link

arm32 target via raspi qemu machine #6

Open majiru opened 10 months ago

majiru commented 10 months ago

Currently we support 386, amd64, arm64 and mips (kinda). It is theoretically possible to also do arm32 using qemu's raspi machine emulation but naive attempts have failed.

I was attempting an invocation like so: qemu-system-arm -machine type=raspi2b -m 1024 -drive file=9front.pi.img,format=raw -serial stdio -kernel 9pi2

So far what I've learned is:

With that said I attempted tinkering with the loadaddr to make it match the default, but there is likely more that is needed then just that. I also attempted to force it to load the kernel where the kernel expects to be placed:

qemu-system-arm -machine type=raspi2b -m 1024 -drive file=9front.pi.img,format=raw -serial stdio -device loader,file=./9pi2,addr=0x80000000,cpu-num=0,force-raw=on

I also tried addr=0x80008000 and that also seemed to fail. When I attached gdb I was unable to access the instructions at that address, so there is something I am not quite understanding here.