Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cross-compiling Qt 6.6.0 with EGLFS, mali not detected
Qt 6.11 is out! See what's new in the release blog

Cross-compiling Qt 6.6.0 with EGLFS, mali not detected

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RobertB
    wrote on last edited by RobertB
    #1

    I am cross compiling Qt with Buildroot and GCC on Ubuntu for an Allwinner H618 with a "integrated Mali G31 MP2" GPU target.

    cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
    -DQT_HOST_PATH=/foo/host/
    -DCMAKE_STAGING_PREFIX=/foo/target
    -DCMAKE_INSTALL_PREFIX=/usr/local/qt6
    -DCMAKE_TOOLCHAIN_FILE=/foo/toolchain.cmake
    -DQT_QMAKE_TARGET_MKSPEC=devices/linux-orangepi-zero2w-aarch64
    /foo/qt6

    I would like to use eglfs platform plugin but i am confused about the list of associated backends available.

    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. yes
    EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ yes
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ yes

    My device has a Mali GPU, yet the configure report above says: EGLFS Mali ........................... no. Shouldn't it perhaps say 'yes' instead? Or is EGLFS GBM fine? On the device I do seem to have /usr/lib/aarch64-linux-gnu/libgbm.so available.

    My mkspec for this device (/foo/qt6/qtbase/mkspecs/devices/linux-orangepi-zero2w-aarch64/qmake.conf):

    DISTRO_OPTS            += deb-multi-arch
    
    include(../common/linux_device_pre.conf)
    
    QMAKE_LIBS_EGL         += -lEGL
    QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL
    
    QMAKE_CFLAGS            += -march=armv8-a -mtune=cortex-a53
    QMAKE_CXXFLAGS          += $$QMAKE_CFLAGS
    
    EGLFS_DEVICE_INTEGRATION = eglfs_mali
    
    LINKER_FLAGS   += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
    
    include(../common/linux_device_post.conf)
    
    load(qt_config)
    

    Should this then be changed to EGLFS_DEVICE_INTEGRATION = eglfs_gbm too?

    jsulmJ 1 Reply Last reply
    0
    • R Offline
      R Offline
      RobertB
      wrote on last edited by RobertB
      #2

      whoops, this should probably be in the forum category "Mobile and Embedded".

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RobertB
        wrote on last edited by RobertB
        #3

        The device itself fails to compile the mali test case:

        alt text

        1 Reply Last reply
        0
        • R RobertB

          I am cross compiling Qt with Buildroot and GCC on Ubuntu for an Allwinner H618 with a "integrated Mali G31 MP2" GPU target.

          cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
          -DQT_HOST_PATH=/foo/host/
          -DCMAKE_STAGING_PREFIX=/foo/target
          -DCMAKE_INSTALL_PREFIX=/usr/local/qt6
          -DCMAKE_TOOLCHAIN_FILE=/foo/toolchain.cmake
          -DQT_QMAKE_TARGET_MKSPEC=devices/linux-orangepi-zero2w-aarch64
          /foo/qt6

          I would like to use eglfs platform plugin but i am confused about the list of associated backends available.

          QPA backends:
          DirectFB ............................... no
          EGLFS .................................. yes
          EGLFS details:
          EGLFS OpenWFD ........................ no
          EGLFS i.Mx6 .......................... no
          EGLFS i.Mx6 Wayland .................. no
          EGLFS RCAR ........................... no
          EGLFS EGLDevice ...................... yes
          EGLFS GBM ............................ yes
          EGLFS VSP2 ........................... no
          EGLFS Mali ........................... no
          EGLFS Raspberry Pi ................... no
          EGLFS X11 ............................ yes

          My device has a Mali GPU, yet the configure report above says: EGLFS Mali ........................... no. Shouldn't it perhaps say 'yes' instead? Or is EGLFS GBM fine? On the device I do seem to have /usr/lib/aarch64-linux-gnu/libgbm.so available.

          My mkspec for this device (/foo/qt6/qtbase/mkspecs/devices/linux-orangepi-zero2w-aarch64/qmake.conf):

          DISTRO_OPTS            += deb-multi-arch
          
          include(../common/linux_device_pre.conf)
          
          QMAKE_LIBS_EGL         += -lEGL
          QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL
          
          QMAKE_CFLAGS            += -march=armv8-a -mtune=cortex-a53
          QMAKE_CXXFLAGS          += $$QMAKE_CFLAGS
          
          EGLFS_DEVICE_INTEGRATION = eglfs_mali
          
          LINKER_FLAGS   += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
          
          include(../common/linux_device_post.conf)
          
          load(qt_config)
          

          Should this then be changed to EGLFS_DEVICE_INTEGRATION = eglfs_gbm too?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:

          On the device I do seem to have /usr/lib/aarch64-linux-gnu/libgbm.so available

          You need all needed headers and libs on your build machine...

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          R 1 Reply Last reply
          0
          • jsulmJ jsulm

            @RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:

            On the device I do seem to have /usr/lib/aarch64-linux-gnu/libgbm.so available

            You need all needed headers and libs on your build machine...

            R Offline
            R Offline
            RobertB
            wrote on last edited by RobertB
            #5

            @jsulm Yes, I have a proper sysroot setup on my host machine with all the relevant libraries/headers from the device, and my toolchain reflects that.

            I am using the following GPU driver:

            /lib/modules/6.1.31-sun50iw9/kernel/drivers/gpu/drm/panfrost/panfrost.ko

            panfrost has support for Mali G31 so that should be fine.

            So I am wondering why Qt reports that Mali EGLFS is not used.

            jsulmJ 1 Reply Last reply
            0
            • R RobertB

              @jsulm Yes, I have a proper sysroot setup on my host machine with all the relevant libraries/headers from the device, and my toolchain reflects that.

              I am using the following GPU driver:

              /lib/modules/6.1.31-sun50iw9/kernel/drivers/gpu/drm/panfrost/panfrost.ko

              panfrost has support for Mali G31 so that should be fine.

              So I am wondering why Qt reports that Mali EGLFS is not used.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:

              So I am wondering why Qt reports that Mali EGLFS is not used.

              Because it can't build the Mali test application.
              The error message you posted say that the type is unknown, so I guess header files for Mali support are missing. The lib alone is not enough, you also need header files (usually you need to install dev package to get them).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              R 1 Reply Last reply
              0
              • jsulmJ jsulm

                @RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:

                So I am wondering why Qt reports that Mali EGLFS is not used.

                Because it can't build the Mali test application.
                The error message you posted say that the type is unknown, so I guess header files for Mali support are missing. The lib alone is not enough, you also need header files (usually you need to install dev package to get them).

                R Offline
                R Offline
                RobertB
                wrote on last edited by RobertB
                #7

                @jsulm said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:

                Because it can't build the Mali test application.

                Indeed. I took that test from qtbase.

                So, seeing as I am using these Mesa panfrost drivers (and not actual Mali drivers) I am guessing this is enough to have 3d acceleration?:

                QPA backends:
                DirectFB ............................... no
                EGLFS .................................. yes
                EGLFS details:
                EGLFS OpenWFD ........................ no
                EGLFS i.Mx6 .......................... no
                EGLFS i.Mx6 Wayland .................. no
                EGLFS RCAR ........................... no
                EGLFS EGLDevice ...................... yes
                EGLFS GBM ............................ yes
                EGLFS VSP2 ........................... no
                EGLFS Mali ........................... no
                EGLFS Raspberry Pi ................... no
                EGLFS X11 ............................ yes
                

                My only question remains is what to do with the mkspec file; currently I have:

                EGLFS_DEVICE_INTEGRATION = eglfs_mali
                

                But I suppose that should be changed to something else. Some info here

                Do you have a hint as to what to pick? Possible candidates:

                $ grep -r 'EGLFS_DEVICE_INTEGRATION' .
                ./qtbase/mkspecs/integrity-armv7-imx6/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_viv
                ./qtbase/mkspecs/integrity-armv8-rcar/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_rcar
                ./qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_viv
                ./qtbase/mkspecs/devices/linux-orangepi-zero2w-aarch64/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_mali
                ./qtbase/mkspecs/devices/integrity-armv8-SA8155P/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_openwfd
                ./qtbase/mkspecs/devices/linux-imx8-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_viv
                ./qtbase/mkspecs/devices/linux-rcar-h2-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms
                ./qtbase/mkspecs/devices/integrity-armv8-drive-cx/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
                ./qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_brcm
                ./qtbase/mkspecs/devices/linux-tinkerboard-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms
                ./qtbase/mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms
                ./qtbase/mkspecs/devices/linux-jetson-tk1-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
                ./qtbase/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
                ./qtbase/mkspecs/devices/linux-nuc-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms
                ./qtbase/mkspecs/devices/linux-beagleboard-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = none
                ./qtbase/mkspecs/devices/linux-jetson-tx1-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_x11
                ./qtbase/mkspecs/devices/integrity-armv8-msm8996au/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_openwfd
                ./qtbase/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_mali
                ./qtbase/mkspecs/devices/linux-drive-cx-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
                ./qtbase/mkspecs/devices/linux-emu-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_emu
                ./qtbase/mkspecs/devices/linux-rasp-pi2-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_brcm
                ./qtbase/mkspecs/devices/linux-odroid-xu3-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_mali
                ./qtbase/mkspecs/devices/linux-rcar-m3-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms
                ./qtbase/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms
                ./qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION= eglfs_brcm
                ./qtbase/mkspecs/devices/linux-rasp-pi4-v3d-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms
                ./qtbase/mkspecs/devices/freebsd-rasp-pi-clang/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_brcm
                
                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  RobertB
                  wrote on last edited by RobertB
                  #8

                  I ended up leaving out EGLFS_DEVICE_INTEGRATION from the mkspec and compiling as-is, works fine.

                  1 Reply Last reply
                  0
                  • R RobertB has marked this topic as solved on

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt
                  • Unsolved