dhruvvyas90 / qemu-rpi-kernel

Qemu kernel for emulating Rpi on QEMU
2.06k stars 363 forks source link

native emulation on aws ec2 #144

Closed ronaldpetty closed 2 years ago

ronaldpetty commented 2 years ago

Hello, Great work! I was trying to native emulation example on AWS EC2.

~$ uname -a
Linux ip-172-31-35-49 5.11.0-1022-aws #23~20.04.1-Ubuntu SMP Mon Nov 15 14:03:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
~$ sudo qemu-system-aarch64 -M raspi3 -dtb ./dtbs/bcm2710-rpi-3-b-plus.dtb -sd 2022-04-04-raspios-bullseye-arm64-lite.img -kernel kernel8.img -m 1G -smp 4 -serial stdio
Unable to init server: Could not connect: Connection refused
WARNING: Image format was not specified for '2022-04-04-raspios-bullseye-arm64-lite.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
gtk initialization failed

I was hoping this would work (and then SSH/console), but I think I don't understand 'lite' and the need for gtk. I suspect this is even the wrong forum to ask, any tip appreciated.

ronaldpetty commented 2 years ago

I got it, of course, after reading the qemu help :). Thanks for listening.

sudo qemu-system-aarch64 -M raspi3 -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" -dtb ./dtbs/bcm2710-rpi-3-b-plus.dtb -sd 2022-04-04-raspios-bullseye-arm64-lite.img -kernel kernel8.img -m 1G -smp 4 -serial stdio -display none -show-cursor