circle icon indicating copy to clipboard operation
circle copied to clipboard

QEMU setup instructions seems to be outdated.

Open DFL1973 opened this issue 2 years ago • 6 comments

I'm trying to install using Ubuntu, but fails when I try to "/configure" with a lot of errors. (error to create symbolic links, meson error and others)

DFL1973 avatar Apr 26 '22 14:04 DFL1973

Which QEMU did you tried? My own QEMU repo is outdated, that's true. The current version is maintained here.

rsta2 avatar Apr 26 '22 15:04 rsta2

I had to patch meson because I'm on a Mac and issues with case insensitive filenames and "version".

I still can't for the life of me get the USB keyboard and mouse to work though even with the patched QEMU? Any idea?

I did see this in circle_stdlib_app.h:

// The USB driver is not supported under 64-bit QEMU, so
// the initialization must be skipped in this case, or an
// exit happens here under 64-bit QEMU.

Is this even with patched QEMU?

zolbatar avatar May 05 '22 09:05 zolbatar

The QEMU version from here supports USB, even with AArch64. So this comment is not valid any more. You shouldn't use the --qemu option with configure of the circle-stdlib project, because it disables the USB driver.

The USB keyboard should work this way, but unfortunately the USB mouse cannot be used with QEMU normally, because the Raspberry Pi firmware emulation does not support the mouse cursor. So USB mouse without mouse cursor does work, but does not work with the mouse cursor.

rsta2 avatar May 05 '22 14:05 rsta2

I tried that and still can't get it to detect a keyboard. I wonder if the fact I am running this on macOS affects things in any way?

zolbatar avatar May 05 '22 22:05 zolbatar

I tried the following again successfully on a PC/Linux host:

cd circle-stdlib
configure -r 3 -p aarch64-none-elf-
make -j
cd samples/04-std
make -j
qemu-system-aarch64 -M raspi3b -kernel ./kernel8.img \
	-drive file=/var/mtools/sdcard.img,if=sd,format=raw \
	-device usb-kbd

The keyboard works. Unfortunately I cannot talk about using it on macOS, because I do not have it.

rsta2 avatar May 06 '22 07:05 rsta2

Thank you for trying, I might try getting it to work on Linux.

zolbatar avatar May 06 '22 11:05 zolbatar

The --qemu option of circle-stdlib configure does not disable USB any more for AArch64 with Release v15.14. So this issue should be solved and can be closed.

rsta2 avatar Dec 04 '22 07:12 rsta2