Vitaly Varyvdin
Vitaly Varyvdin

Reputation: 21

Buildroot x86_64 WPE kiosk not running in QEMU

Building small and basic Linux system with Buildroot, the goal is to run it as kiosk. My approach is to use wpe, cog and cage

My defconfig is as follows:

BR2_x86_64=y
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_DHCP="eth0"
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_TARGET_TZ_INFO=y
BR2_TARGET_LOCALTIME="Europe/Moscow"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_ZSTD=y
BR2_PACKAGE_BUSYBOX_WATCHDOG=y
BR2_PACKAGE_CAGE=y
BR2_PACKAGE_COG=y
BR2_PACKAGE_LIBGLVND=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
BR2_PACKAGE_MESA3D_OSMESA_GALLIUM=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_GNUTLS=y
BR2_PACKAGE_WPEWEBKIT=y
BR2_PACKAGE_LIBPCIACCESS=y
BR2_PACKAGE_GLIB_NETWORKING=y
BR2_PACKAGE_ELFUTILS=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_ZSTD=y

Launching it with qemu:

qemu-system-x86_64 \
  --enable-kvm \
  -kernel bzImage \
  -initrd rootfs.cpio.zst \
  -m 2048 \
  -cpu host \
  -device virtio-gpu \
  -display gtk,gl=on

It successfully boots. However, launching cage and cogs XDG_RUNTIME_DIR=/root cage cog doesn't work

These are the errors I get:

libEGL warning: egl: failed to create dri2 screen
error: EGL_NOT_INITIALIZED
libEGL warning: NEEDS EXTENSION: falling back to kms_swrast
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
libEGL warning: MESA-LOADER: failed to open zink: Error loading shared library /usr/lib/dri/zink_dri.so

I don't get it why it tries to load zink, but there's no option to build zink within Buildroot

Upvotes: 0

Views: 184

Answers (1)

Vitaly Varyvdin
Vitaly Varyvdin

Reputation: 21

Should've been ran by:

sudo qemu-system-x86_64 \
  --enable-kvm \
  -kernel bzImage \
  -initrd rootfs.cpio.zst \
  -m 2048 \
  -cpu host \
  -device virtio-gpu-gl \
  -display gtk,gl=on \
  -append console=ttyS0

Notice how virtio-gpu was changed to virtio-gpu-gl.

For anyone stumbling on this and following along the same lines: font and cursors have to be installed in order to render the page.

Upvotes: 0

Related Questions