Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
HTML
<! To make a ToC move/scroll with the page >
<style> .toc-macro {position: static !important;} </style>

<! Make the ToC in-line (not float on the right) >
<style> .toc-macro {float: none !important;} </style>


<! To make a ToC wider >
<style> .toc-macro {width: 350px !important;} </style>

<! Transparent background (no color) >
<style> .toc-macro {background: transparent !important;} </style>

<! To make a ToC Font Size bigger. Default font-size: 15px. Default line-height: 1.6 >
<style> .toc-item-body {font-size: 18px !important;} </style>

Table of Contents

Overview

This page is an an example for RZ/G2L. It is based on using VLP 3.0.6.

Qt 5.15.2 can run on various backends. The EGLFS and Wayland backends are widely used. Here, we will talk about how to build and integrate Qt 5.15.2 with EGLFS and Wayland backends support based on VLP 3.0.6.

...


Prepare the SDK or toolchain

...

The default Yocto SDK of VLP 3.0.6 can only support the Qt with Wayland backend building. So the patch for the Qt 5.6.3(Qt version of VLP 3.0.6) recipe must be applied.

1.1)Modify meta-qt5/recipes-qt/qt5/qtbase_git.bb:

...

Note: The Qt 5.6.3 with EGLFS backend support is ready. If you only need Qt 5.6.3, you can skip the following steps.

...

Download,

...

configure and build the Qt 5.15.2 source code

...

2.1) Get the Qt source code

...

#
# qmake configuration for building with aarch64-linux-gnu-g++
#

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib

QMAKE_LIBS_EGL         += -lEGL
QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL

QMAKE_CFLAGS            = -march=armv8-a -mtune=cortex-a55
QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS
EGLFS_DEVICE_INTEGRATION = eglfs_kms

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

# modifications to g++.conf
QMAKE_CC = aarch64-poky-linux-gcc
QMAKE_CXX = aarch64-poky-linux-g++
QMAKE_LINK = aarch64-poky-linux-g++
QMAKE_LINK_SHLIB = aarch64-poky-linux-g++

#  # modifications to linux.conf
QMAKE_AR = aarch64-poky-linux-ar cqs
QMAKE_OBJCOPY = aarch64-poky-linux/aarch64-poky-linux-objcopy
QMAKE_NM = aarch64-poky-linux/aarch64-poky-linux-nm -P
QMAKE_STRIP = aarch64-poky-linux-strip
load(qt_config)

...

#!/bin/bash

if [ "x" == "x$1" ]; then
    echo "No qt source dir specified"
    exit 0
fi

PWD=`pwd`
OUTPUT=$PWD/output

YOCTOSDK=/opt/poky/3.1.31/sysroots

ROOTFS=$YOCTOSDK/aarch64-poky-linux

export PATH=$YOCTOSDK/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux:$PATH

export PKG_CONFIG_LIBDIR=$YOCTOSDK/aarch64-poky-linux/usr/lib64/pkgconfig

rm -rf $OUTPUT/*

cd $1
./configure -v -extprefix $OUTPUT -opensource -release -optimized-qmake -confirm-license -xplatform linux-aarch64-gnu-g++ -sysroot $ROOTFS -shared -silent -no-pch -no-rpath -pkg-config -no-pulseaudio -no-alsa -no-evdev -no-sse2 -no-sse3 -no-cups -dbus -make examples -compile-examples -no-fontconfig -opengl es2 -egl -eglfs -no-glib -no-harfbuzz -no-iconv -icu -system-libjpeg -kms -gbm -system-libpng -no-libproxy -make libs -linuxfb -no-mtdev -no-openssl -no-openvg -qt-pcre -sm -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -sql-sqlite -system-sqlite -sql-sqlite2 -no-sql-tds -nomake tests -make tools -no-tslib -libudev -widgets -no-xcb -system-zlib -skip webengine -c++std c++11 -skip qtdoc -qpa wayland

if [ "0" != "$?" ]; then
    exit 1
fi

make

if [ "0" != "$?" ]; then
    exit 1
fi

make install

if [ "0" != "$?" ]; then
    exit 1
fi

cd ../$OUTPUT
tar -zcf ../qt-5.15.2-eglfs-wayland-build.tar.gz *

echo ====== SUCCESS ======

...

If everything is OK, you will get the built out binary Qt 5.15.2 in gzip file: qt-5.15.2-eglfs-wayland-build.tar.gz. The build process may take several hours.

...

Integrate Qt 5.15.2

...

to the target Yocto filesystem

...

It will coexist with Qt 5.6.3.

3.1) Install

Decompress qt-5.15.2-eglfs-wayland-build.tar.gzto some directory of the MPU target filesystem(Not ubuntu PC). Here we use /usr/share/qt-5.15.2.

...