agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
507 stars 397 forks source link

Question. How to apply custom oe-device-extra.pri for qtbase #1215

Closed buldo closed 10 months ago

buldo commented 10 months ago

Description I trying to build image for rasbperry with Qt application that have to work with fake kms(dtoverlay=vc4-fkms-v3d). For Raspberry pi OS I use custom build of Qt5 with custom oe-device-extra.pri

How to write right bbappend for qtbase?

Steps to reproduce the issue:

  1. mickledore Priorities: raspberrypi 9 my-layer 6 qt5-layer 7

  2. I created file my-layer\recipes-multimedia\recipes-qt\qt5\qtbase_%.bbappend with next content:

    
    do_configure:prepend() {
    echo "CONFIGURE QT_TBASE"
    
    cat > ${S}/mkspecs/oe-device-extra.pri <<EOF
    QMAKE_LIBS_EGL         += -lEGL
    QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL
    
    QMAKE_CFLAGS            += -march=armv8-a -mtune=cortex-a72 -mfpu=crypto-neon-fp-armv8
    QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS
    
    EGLFS_DEVICE_INTEGRATION = eglfs_kms
    EOF
    }

PACKAGECONFIG += "gles2"

2.  My `.conf` contains next lines:

GPU_MEM = "128"

LICENSE_FLAGS_ACCEPTED = " synaptics-killswitch \ commercial \ license \ "

MACHINE = "raspberrypi4"

IMAGE_FSTYPES = "tar.xz ext3 rpi-sdimg" DISTRO_FEATURES:remove = " wayland vulkan x11 directfb " DISTRO_FEATURES:append = " opengl gles2"

VC4DTBO = "vc4-fkms-v3d"



**Am I doing everything right?**
kraj commented 10 months ago

yes it seems correct. In yoe distro it should work out of box too. See https://github.com/YoeDistro/yoe-distro

here is pi project config

https://github.com/YoeDistro/yoe-distro/blob/master/conf/projects/rpi4-64/config.conf

here is a kas definition which you might find helpful too.

https://github.com/OOHehir/meta-test/blob/main/poky-rpi-qt-custom.yml