Yocto "Failed to run qemu: Could not initialize SDL(x11 not > available)"
Asked Answered
A

1

11

So I've got Yocto on a local build server, coz who wants that massive build chewing up their workspace amirite?

Host and Server are Arch Linux 4.19.44-1-lts

Anyway I am just running up the example from the quick build page found here and when I try to

 $ runqemu qemux86 

from the ssh (with X11 forwarding enabled) all I get is this lousy output:

runqemu - INFO - Running MACHINE=qemux86 bitbake -e... runqemu - INFO 
- Continuing with the following parameters: 

KERNEL: [/home/bob/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520164453.bin] MACHINE: [qemux86] FSTYPE: [ext4] ROOTFS: [/home/bob/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520164453.rootfs.ext4] CONFFILE: [/home/bob/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520164453.qemuboot.conf] 

runqemu - INFO - Setting up tap interface under sudo [sudo] password for bob: runqemu - INFO - Network configuration: 
192.168.7.2::192.168.7.1:255.255.255.0 runqemu - INFO - Running /home/bob/poky/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386 
-device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=/home/bob/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520164453.rootfs.ext4,if=virtio,format=raw 
-vga vmware -show-cursor -usb -device usb-tablet -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 -cpu pentium2 -m 256 -serial mon:vc -serial null -kernel /home/bob/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520164453.bin 
-append 'root=/dev/vda rw highres=off mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 ' 

runqemu - ERROR - Failed to run qemu: Could not initialize SDL(x11 not available) - exiting 

runqemu - INFO - Cleaning up Set 'tap0' nonpersistent 

It's this part that is clearly a concern:

runqemu - ERROR - Failed to run qemu: Could not initialize SDL(x11 not available) - exiting

Which is weird, because X is actually running on the machine and I can run qemu just fine. Running

 $ qemu-system-x86_64 

Opens up a qemu VM on my local machine

Is there something I'm missing here? Does SDL need to be re-compiled with X support or something? What about these options: "-vga vmware", "uvesafb.mode_option=640x480-32". Maybe it's an ssh thing? Or a build config option for sdl that I haven't yet come across....

To clarify it works fine from the console of the server and from the tty using the 'nographic' option. Just not over tty with a graphical option, wondering if that's even possible.

Thanks.

Anibalanica answered 21/5, 2019 at 11:14 Comment(0)
I
26

I had the same problem with a build for a minimal image on ubuntu 18.04 server.

Try: runqemu qemux86 nographic

Iona answered 19/7, 2019 at 0:25 Comment(2)
This ended up being the answer. Running it over the network requires a nographic option.Anibalanica
Actually, it depends, since you are building/running core-image-sato (instead of minimal for example) , you actually want the user interface to show up, while passing "nographic" or "serial" to runqemu will allow you to boot, you wont be able to test/see anything from the user interface, on headless setups, you can set up a VNC server that would create a virtual display, this would not only get rid of the error you mentioned, but it will also spawn the QEMU window where you can see the UI (if you connect through VNC of course).Brownson

© 2022 - 2024 — McMap. All rights reserved.