Mats de Waard
Mats de Waard

Reputation: 139

Yocto custom application through custom layer does not copy source files to destination rootfs

I am trying to install a custom application on my Yocto build.

I currently use a Raspberry Pi 4 64 bit setup, for which I want PyQt5 to display an application directly on the frame buffer (so no windowing manager or desktop envoirement).

My current build with Yocto completes and boots on the Raspberry Pi. All the Qt5 libraries are also present in the root fs after the bitbake build.

Although, I'm having problems getting a custom layer, that adds a custom recipe with a custom application to also copy over to the destination root fs.

My custom layer is called 'meta-rpikms' with recipe 'recipes-kms-qt-app' which contains the application bb files. This files is called 'basicquick_0.1.bb' and has the following contents (this test application tries to add a EGLFS friendly Qt5 applicaiton, i'll try PyQt5 later):

SUMMARY = "Simple Qt5 Quick application"
#SECTION = "examples"
LICENSE = "MIT"
#PACKAGE_ARCH = "all"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
DEPENDS += "qtbase qtdeclarative qtquickcontrols2"
SRCREV = "${AUTOREV}"
SRC_URI = "git://github.com/shigmas/BasicQuick.git"

S = "${WORKDIR}/git"

require recipes-qt/qt5/qt5.inc



do_install() {
      install -d ${D}${bindir_native}
      install -m 0755 BasicQuick ${D}${bindir_native}
}
FILES_${PN} += "${bindir_native}"

When I bitbake the custom layer of my meta-rpikms (called 'qt5-kms-rpi-image'), it does compute. When I take a look at the 'image_initial_manifest' file, my custom application does show up, suggesting that it does compile and try to install the application:

# This file was generated automatically and contains the packages
# passed on to the package manager in order to create the rootfs.

# Format:
#  <package_type>,<package_name>
# where:
#   <package_type> can be:
#      'mip' = must install package
#      'aop' = attempt only package
#      'mlp' = multilib package
#      'lgp' = language package

mip,basicquick
mip,bluez5
mip,bridge-utils
mip,hostapd
mip, bla bla bla etc etc etc.

And if I take a look in: '~/builds/pyqt5_try1/poky/rpi64-build/tmp/work/cortexa72-poky-linux/basicquick/0.1-r0', the expected files do show up. Also suggesting that it does atleast build the application. This makes the think that the 'install' arguments in my .bb file are pointing to the wrong folder.

In my basicquick_*.bb file this is to make the directory and install (copy) the built files:

install -d ${D}${bindir_native}
install -m 0755 BasicQuick ${D}${bindir_native}

I used the 'bitbake -e' command to trace the variable D and bindir_native:

D="/home/mats/builds/pyqt5_try1/poky/rpi64-build/tmp/work/raspberrypi4_64-poky-linux/qt5-kms-rpi-image/1.0-r0/image"

bindir_native="/usr/bin"

This seems okay at first glance, but when I manually follow the destination of the variable 'D', there is no 'images' folder created. I also wonder why everybody installs their custom applications on ${D}/usr/bin? Should this not be written to the build/tmp/deploy directory? Or am I missing a step here.

So, in this 'qt5-kms-rpi-image/1.0-r0' folder, there is a folder called 'deploy-qt5-kms-rpi-image-image-complete', which contains a rootfs. But there also is a rootfs folder in the 'qt5-kms-rpi-image/1.0-r0' folder. Both of these rootfs's do not contain any mention of my basicquick application, or a BasicQuick folder being created in /usr/bin.

Also, the rootfs found in the "build/tmp/deploy/images/raspberrypi4-64/qt5-kms-rpi-image-raspberrypi4-64.tar.bz2" does not contain any mention of the basicquick application being present in the filesystem.

Does anybody have any clues on what I am missing? Am I just not copying my files to the correct location? Or does the final deploy image end up somewhere else from where I am expecting it?

Thanks in advance.

With kind regards,
Mats de Waard

Upvotes: 0

Views: 673

Answers (0)

Related Questions