summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAri Parkkila <ari.parkkila@qt.io>2022-08-15 10:06:46 +0300
committerAri Parkkila <ari.parkkila@qt.io>2022-08-16 09:55:55 +0000
commita7ccff1eadb72ec5137445e3e6578497bec284ab (patch)
treed7c41172e8d8082ba4dba89536d07f1a843503dd
parent7296e773a268d9433b3cdd5c63ba063f64befaa8 (diff)
Add support for am62xx-evm
Task-number: QTBUG-103918 Change-Id: I08d60bda37b592278cf76058cbfcfe72dc4ba536 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
-rw-r--r--README52
-rw-r--r--conf/bblayers.conf.sample55
-rw-r--r--conf/distro/include/b2qt.inc46
-rw-r--r--conf/layer.conf42
-rw-r--r--recipes-qt/boot2qt-addons/default-qt-envs.bbappend41
-rw-r--r--recipes-qt/boot2qt-addons/default-qt-envs/kms.conf5
-rw-r--r--recipes-qt/qt5/qtbase_git.bbappend30
-rw-r--r--recipes-security/optee/optee-os/0001-mk-LIBGCC_LOCATE_CFLAGS-allows-setting-sysroot-path.patch49
-rw-r--r--recipes-security/optee/optee-os_%.bbappend3
9 files changed, 323 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..8128166
--- /dev/null
+++ b/README
@@ -0,0 +1,52 @@
+############################################################################
+##
+## Copyright (C) 2022 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Boot to Qt meta layer.
+##
+## $QT_BEGIN_LICENSE:GPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 or (at your option) any later version
+## approved by the KDE Free Qt Foundation. The licenses are as published by
+## the Free Software Foundation and appearing in the file LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+Boot2Qt BSP layer for TI boards
+===============================
+
+This layer provides additional configuration and recipe appends to support
+Boot2Qt on TI Boards.
+
+How to use this layer
+---------------------
+
+Using this layer requires Google's repo tool to be installed, you can install
+it from package manager (apt install repo) or download with:
+
+ curl https://storage.googleapis.com/git-repo-downloads/repo -o repo
+ chmod a+x repo
+
+
+After installing the repo tool, run following commands to initialize the build environment.
+
+ repo init -u git://code.qt.io/yocto/boot2qt-manifest -b ti -m lts-5.15.xml
+ repo sync
+
+ export MACHINE=am62xx-evm
+ . ./setup-environment.sh
diff --git a/conf/bblayers.conf.sample b/conf/bblayers.conf.sample
new file mode 100644
index 0000000..d742bbd
--- /dev/null
+++ b/conf/bblayers.conf.sample
@@ -0,0 +1,55 @@
+############################################################################
+##
+## Copyright (C) 2022 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Boot to Qt meta layer.
+##
+## $QT_BEGIN_LICENSE:GPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 or (at your option) any later version
+## approved by the KDE Free Qt Foundation. The licenses are as published by
+## the Free Software Foundation and appearing in the file LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+POKY_BBLAYERS_CONF_VERSION = "1"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE')) + '/../..')}"
+
+BBLAYERS ?= " \
+ ${BSPDIR}/sources/poky/meta \
+ ${BSPDIR}/sources/poky/meta-poky \
+ ${BSPDIR}/sources/meta-openembedded/meta-oe \
+ ${BSPDIR}/sources/meta-openembedded/meta-python \
+ ${BSPDIR}/sources/meta-openembedded/meta-networking \
+ ${BSPDIR}/sources/meta-openembedded/meta-initramfs \
+ ${BSPDIR}/sources/meta-openembedded/meta-multimedia \
+ ${BSPDIR}/sources/meta-python2 \
+ ${BSPDIR}/sources/meta-boot2qt/meta-boot2qt \
+ ${BSPDIR}/sources/meta-boot2qt/meta-boot2qt-distro \
+ ${BSPDIR}/sources/meta-boot2qt-ti \
+ ${BSPDIR}/sources/meta-mingw \
+ ${BSPDIR}/sources/meta-qt5 \
+ ${BSPDIR}/sources/meta-arm/meta-arm-toolchain \
+ ${BSPDIR}/sources/meta-arm/meta-arm \
+ ${BSPDIR}/sources/meta-ti \
+ "
diff --git a/conf/distro/include/b2qt.inc b/conf/distro/include/b2qt.inc
new file mode 100644
index 0000000..34e9436
--- /dev/null
+++ b/conf/distro/include/b2qt.inc
@@ -0,0 +1,46 @@
+############################################################################
+##
+## Copyright (C) 2022 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Boot to Qt meta layer.
+##
+## $QT_BEGIN_LICENSE:GPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 or (at your option) any later version
+## approved by the KDE Free Qt Foundation. The licenses are as published by
+## the Free Software Foundation and appearing in the file LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+DEPLOY_CONF_NAME = "TI AM62x"
+
+IMAGE_FSTYPES += "wic.xz"
+DEPLOY_CONF_IMAGE_TYPE = "wic.xz"
+
+QBSP_IMAGE_CONTENT += "\
+ ${IMAGE_LINK_NAME}.wic.xz \
+ ${IMAGE_LINK_NAME}.conf \
+ "
+
+DISTRO_FEATURES:remove = "vulkan ld-is-gold webengine"
+
+PREFERRED_PROVIDER_virtual/egl_am62xx = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgles1_am62xx = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgles2_am62xx = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgbm_am62xx = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/gpudriver_am62xx = "ti-img-rogue-driver"
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..d8465e9
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,42 @@
+############################################################################
+##
+## Copyright (C) 2022 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Boot to Qt meta layer.
+##
+## $QT_BEGIN_LICENSE:GPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 or (at your option) any later version
+## approved by the KDE Free Qt Foundation. The licenses are as published by
+## the Free Software Foundation and appearing in the file LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb \
+ ${LAYERDIR}/recipes*/*/*.bbappend \
+ "
+
+BBFILE_COLLECTIONS += "b2qt-ti"
+BBFILE_PATTERN_b2qt-ti := "^${LAYERDIR}/"
+BBFILE_PRIORITY_b2qt-ti = "20"
+
+LAYERSERIES_COMPAT_b2qt-ti = "dunfell"
diff --git a/recipes-qt/boot2qt-addons/default-qt-envs.bbappend b/recipes-qt/boot2qt-addons/default-qt-envs.bbappend
new file mode 100644
index 0000000..05a7f15
--- /dev/null
+++ b/recipes-qt/boot2qt-addons/default-qt-envs.bbappend
@@ -0,0 +1,41 @@
+############################################################################
+##
+## Copyright (C) 2022 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Boot to Qt meta layer.
+##
+## $QT_BEGIN_LICENSE:GPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 or (at your option) any later version
+## approved by the KDE Free Qt Foundation. The licenses are as published by
+## the Free Software Foundation and appearing in the file LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://kms.conf"
+
+do_configure:append() {
+ echo "QT_QPA_EGLFS_KMS_CONFIG=/etc/kms.conf" >> ${WORKDIR}/defaults
+ echo "QSG_RENDER_LOOP=basic" >> ${WORKDIR}/defaults
+}
+
+do_install:append() {
+ install -m 0644 ${WORKDIR}/kms.conf ${D}${sysconfdir}/
+}
diff --git a/recipes-qt/boot2qt-addons/default-qt-envs/kms.conf b/recipes-qt/boot2qt-addons/default-qt-envs/kms.conf
new file mode 100644
index 0000000..25b34be
--- /dev/null
+++ b/recipes-qt/boot2qt-addons/default-qt-envs/kms.conf
@@ -0,0 +1,5 @@
+{
+ "device": "/dev/dri/card0",
+ "hwcursor": false
+}
+
diff --git a/recipes-qt/qt5/qtbase_git.bbappend b/recipes-qt/qt5/qtbase_git.bbappend
new file mode 100644
index 0000000..ea4b18c
--- /dev/null
+++ b/recipes-qt/qt5/qtbase_git.bbappend
@@ -0,0 +1,30 @@
+############################################################################
+##
+## Copyright (C) 2022 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Boot to Qt meta layer.
+##
+## $QT_BEGIN_LICENSE:GPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 or (at your option) any later version
+## approved by the KDE Free Qt Foundation. The licenses are as published by
+## the Free Software Foundation and appearing in the file LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+PACKAGECONFIG += "gbm kms"
diff --git a/recipes-security/optee/optee-os/0001-mk-LIBGCC_LOCATE_CFLAGS-allows-setting-sysroot-path.patch b/recipes-security/optee/optee-os/0001-mk-LIBGCC_LOCATE_CFLAGS-allows-setting-sysroot-path.patch
new file mode 100644
index 0000000..7582499
--- /dev/null
+++ b/recipes-security/optee/optee-os/0001-mk-LIBGCC_LOCATE_CFLAGS-allows-setting-sysroot-path.patch
@@ -0,0 +1,49 @@
+From fca50bfd0a1ea055c13735c56c70c04ae59b5448 Mon Sep 17 00:00:00 2001
+From: Etienne Carriere <etienne.carriere@linaro.org>
+Date: Thu, 8 Jul 2021 10:28:30 +0200
+Subject: [PATCH] mk: LIBGCC_LOCATE_CFLAGS allows setting sysroot path for GCC
+
+OP-TEE OS compilation fails with Yocto like build environment
+as libgcc.a cannot be find when gcc.mk is executed [1]. A trick
+used was to set comp-cflagscore='--sysroot=/path/to/sysroot'
+at OP-TEE OS build. This is no more sufficient as CXXFLAGS
+(comp-cxxflagscore=...) may also be needed.
+
+This change implements LIBGCC_LOCATE_CFLAGS as a better way to
+path sysroot info for the expected purpose, as proposed in [2] and
+[3], recently mentioned in [1] and used in several distributions.
+
+Build environment are expected to set path when needed:
+LIBGCC_LOCATE_CFLAGS='--sysroot=/path/to/sysroot'
+
+Link: [1] https://github.com/OP-TEE/optee_os/issues/4673
+Link: [2] https://github.com/OP-TEE/optee_os/pull/2853
+Link: [3] https://github.com/OP-TEE/optee_os/issues/4485#issuecomment-803025139
+
+Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
+---
+ mk/gcc.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mk/gcc.mk b/mk/gcc.mk
+index adc77a24f..81bfa78ad 100644
+--- a/mk/gcc.mk
++++ b/mk/gcc.mk
+@@ -13,11 +13,11 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \
+ -print-file-name=include 2> /dev/null)
+
+ # Get location of libgcc from gcc
+-libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
++libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
+ -print-libgcc-file-name 2> /dev/null)
+-libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
++libstdc++$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
+ -print-file-name=libstdc++.a 2> /dev/null)
+-libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
++libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
+ -print-file-name=libgcc_eh.a 2> /dev/null)
+
+ # Define these to something to discover accidental use
+--
+2.25.1
+
diff --git a/recipes-security/optee/optee-os_%.bbappend b/recipes-security/optee/optee-os_%.bbappend
new file mode 100644
index 0000000..3deda00
--- /dev/null
+++ b/recipes-security/optee/optee-os_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " file://0001-mk-LIBGCC_LOCATE_CFLAGS-allows-setting-sysroot-path.patch"