Running X11 on core-image-minimal image compiled with Yocto

203 Views Asked by At

I have a Raspberry Pi 3b and a 7" touchscreen connected to it. I want to run a PyQt5 application on this device with the image I created. When I use core-image-sato when creating an image and write the necessary meta-qt packages in local.conf and bblayers.conf, I can run my application without any problems, but core-image-sato is not the simple image I want. It's boot time is too long for my application. So i decided to use core-image-minimal and configured to local.conf and bblayers.conf like below.

local.conf


MACHINE ?= "raspberrypi3"
CORE_IMAGE_EXTRA_INSTALL += "openssh"
IMAGE_INSTALL_append = " xserver-xorg"
DISTRO_FEATURES_append = " x11 x11-base x11-sato"
bblayers.conf

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /home/oguzhant/yocto-minimal/poky/meta \
  /home/oguzhant/yocto-minimal/poky/meta-poky \
  /home/oguzhant/yocto-minimal/poky/meta-yocto-bsp \
  /home/oguzhant/yocto-minimal/poky/meta-raspberrypi \
  /home/oguzhant/yocto-minimal/poky/meta-openembedded/meta-oe \
  /home/oguzhant/yocto-minimal/poky/meta-openembedded/meta-multimedia \
  /home/oguzhant/yocto-minimal/poky/meta-openembedded/meta-networking \
  /home/oguzhant/yocto-minimal/poky/meta-openembedded/meta-python \
  /home/oguzhant/yocto-minimal/poky/meta-qt5-dunfell \
  "
IMAGE_INSTALL_append = " python3"
IMAGE_INSTALL_append = " python3-pyqt5"
IMAGE_INSTALL_append = " xorg-minimal-fonts packagegroup-fonts-truetype-core"

Then I compiled the image without any problems. But when i type Xorg command to shell. Xorg gives "no screens found". I'm new in yocto and linux and i did not found similar problem with mine on internet. Please help me guys.

1

There are 1 best solutions below

3
shakta On

I disagree that core-image-sato is not a simple image. Look at it's recipe, it is about as simple as it get if you want to have an image with x11 support. Use core-image-sato and build off that, otherwise you are just going to end up essentially recreating it.

If you are not happy with boot time you will need make optimizations to bootloader, kernel & init manager.