Yo,
so i wanted to port pebble's fork of QEMU on the GCW0, just for the kicks.
Now, i'm not talking about running the QEMU emulator on a PC to run the GCW0's buildroot,
i'm talking about running QEMU on the actual GCW0.
Here's the repo for reference :
https://github.com/pebble/qemuIt worked just fine on my Ubuntu PC. (it was a straight compile)
Unfortunately, this isn't the case on the GCW0.
And the annoying thing is that the bug is not even graphics-related or stupid, it seems to be a uclibc issue.
(no, this time i'm not lying)
I compiled like so for the GCW0 :
./configure --disable-werror --target-list="arm-softmmu" --extra-cflags=-DSTM32_UART_NO_BAUD_DELAY --cross-prefix=mipsel-linux- --disable-linux-aio --disable-curl --disable-curses --audio-drv-list=sdl --disable-kvm --disable-vhdx
make
Then you have your binary in arm-softmmu called qemu-system-arm.
But anyway, you have download the emery firmware files (
here) and you run like so:
./qemu-system-arm -rtc base=localtime -pflash ./qemu_micro_flash.bin -machine pebble-robert-bb -cpu cortex-m4 -pflash ./qemu_spi_flash.bin -display sdl,frame=off
Once, you run it, you get this error message :
Unexpected error in aio_context_new() at async.c:338:
qemu-system-arm: Failed to initialize event notifier
Aborted
Nooooooo
If you look at the offending line, apparently it has failed to init the event notifier.
It doesn't tell you why it has failed of course, mind you.
Looking at util/event_notifier-posix.c, we can see it uses by default eventfd for initialising the vent notifier.
This function apparently returns -1 (for some reason it fails) so it tries to manually force it i guess.
Since errno doesn't return ENOSYS, it exists there and throws an error. (line 42,43)
So where errno is set ? I don't know, maybe that eventfd function...
In any case, if you try to force it, it will throw you a bunch of asserts errors.
Remove the event notifier and it won't work at all. (on both the pc and the gcw0)
Disabling the assets will instead throw you a Seg fault so it's a never-ending-story.
Has anyone managed to get Qemu to work on the GCW0 ?
Obviously not. (at least not the latest version)
I don't know how eventfd is implemented in uclibc but it doesn't seem to work. (not a big surprise)
Any ideas ?