From a1bd62f6157b1251a6956cf85f6191e34837178f Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Fri, 5 Apr 2019 10:43:30 +0300
Subject: [PATCH] imx8: update meta layer

For NXP boards, use sumo-4.14.98-2.0.0_ga branch for meta-fsl-bsp-release,
and add configuration form NXP i.MX 8QuadMax MEK and 8MQuad EVK boards.

For Toradex board, use toradex-sumo-4.14.78-1.0.0_ga-bringup branch for the
same layer, and add configuration for Colibri-iMX8QXP board.

Task-number: QTBUG-73355
Task-number: QTBUG-73372
Change-Id: Ib0d7669d9a06f65a891f9ec849cb6ed5ba830688
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
---
 b2qt-init-build-env                           |  7 ++-
 .../conf/bblayers.conf.toradex-imx8.sample    | 55 +++++++++++++++++++
 .../conf/distro/include/apalis-imx8.conf      |  9 ++-
 .../conf/distro/include/colibri-imx8qxp.conf  | 34 ++++++++++++
 .../conf/distro/include/fsl-imx8.inc          | 44 ++++-----------
 .../{imx8qmlpddr4arm2.conf => imx8mqevk.conf} |  6 +-
 .../conf/distro/include/imx8qmmek.conf        | 38 +++++++++++++
 .../firmware-imx/firmware-imx_%.bbappend      | 31 +++++++++++
 .../linux-firmware_git.bbappend               | 38 +++++++++++++
 ...ootpart.wks => imx8-uboot-bootpart.wks.in} |  2 +-
 scripts/manifest.xml                          | 14 +++--
 scripts/setup-environment.sh                  |  5 +-
 12 files changed, 237 insertions(+), 46 deletions(-)
 create mode 100644 meta-boot2qt-distro/conf/bblayers.conf.toradex-imx8.sample
 create mode 100644 meta-boot2qt-distro/conf/distro/include/colibri-imx8qxp.conf
 rename meta-boot2qt-distro/conf/distro/include/{imx8qmlpddr4arm2.conf => imx8mqevk.conf} (91%)
 create mode 100644 meta-boot2qt-distro/conf/distro/include/imx8qmmek.conf
 create mode 100644 meta-fsl-extras/recipes-bsp/firmware-imx/firmware-imx_%.bbappend
 create mode 100644 meta-fsl-extras/recipes/linux-firmware/linux-firmware_git.bbappend
 rename meta-fsl-extras/wic/{imx8-uboot-bootpart.wks => imx8-uboot-bootpart.wks.in} (84%)

diff --git a/b2qt-init-build-env b/b2qt-init-build-env
index 3919b996..bec9db92 100755
--- a/b2qt-init-build-env
+++ b/b2qt-init-build-env
@@ -1,7 +1,7 @@
 #!/bin/sh
 ############################################################################
 ##
-## Copyright (C) 2016 The Qt Company Ltd.
+## Copyright (C) 2019 The Qt Company Ltd.
 ## Contact: https://www.qt.io/licensing/
 ##
 ## This file is part of the Boot to Qt meta layer.
@@ -115,9 +115,12 @@ get_groups() {
     all)
       PROJECT_GROUPS="external"
     ;;
-    apalis-imx8|imx8qmlpddr4arm2)
+    imx8qmmek|imx8mqevk)
       PROJECT_GROUPS="fsl-imx8"
     ;;
+    apalis-imx8|colibri-imx8qxp)
+      PROJECT_GROUPS="toradex-imx8"
+    ;;
     apalis-imx6|colibri-imx6|colibri-imx6ull|colibri-vf|colibri-imx7|colibri-imx7-emmc)
       PROJECT_GROUPS="toradex"
     ;;
diff --git a/meta-boot2qt-distro/conf/bblayers.conf.toradex-imx8.sample b/meta-boot2qt-distro/conf/bblayers.conf.toradex-imx8.sample
new file mode 100644
index 00000000..db166212
--- /dev/null
+++ b/meta-boot2qt-distro/conf/bblayers.conf.toradex-imx8.sample
@@ -0,0 +1,55 @@
+############################################################################
+##
+## Copyright (C) 2019 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 = "2"
+
+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-fsl-bsp-release-toradex/imx/meta-bsp \
+  ${BSPDIR}/sources/meta-fsl-bsp-release-toradex/imx/meta-sdk \
+  ${BSPDIR}/sources/meta-freescale \
+  ${BSPDIR}/sources/meta-freescale-3rdparty \
+  ${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-boot2qt/meta-boot2qt \
+  ${BSPDIR}/sources/meta-boot2qt/meta-boot2qt-distro \
+  ${BSPDIR}/sources/meta-boot2qt/meta-fsl-extras \
+  ${BSPDIR}/sources/meta-mingw \
+  ${BSPDIR}/sources/meta-qt5 \
+  "
diff --git a/meta-boot2qt-distro/conf/distro/include/apalis-imx8.conf b/meta-boot2qt-distro/conf/distro/include/apalis-imx8.conf
index 7a7728c2..833af446 100644
--- a/meta-boot2qt-distro/conf/distro/include/apalis-imx8.conf
+++ b/meta-boot2qt-distro/conf/distro/include/apalis-imx8.conf
@@ -1,6 +1,6 @@
 ############################################################################
 ##
-## Copyright (C) 2018 The Qt Company Ltd.
+## Copyright (C) 2019 The Qt Company Ltd.
 ## Contact: https://www.qt.io/licensing/
 ##
 ## This file is part of the Boot to Qt meta layer.
@@ -29,6 +29,11 @@
 
 include conf/distro/include/fsl-imx8.inc
 
+FSL_EULA_FILE := "${COREBASE}/../meta-fsl-bsp-release-toradex/imx/EULA.txt"
+
 DEPLOY_CONF_NAME = "Toradex Apalis iMX8"
 
-SERIAL_CONSOLE = "115200 ttyLP1"
+IMAGE_BOOT_FILES += "\
+    dpfw.bin \
+    hdmitxfw.bin \
+    "
diff --git a/meta-boot2qt-distro/conf/distro/include/colibri-imx8qxp.conf b/meta-boot2qt-distro/conf/distro/include/colibri-imx8qxp.conf
new file mode 100644
index 00000000..2b900c14
--- /dev/null
+++ b/meta-boot2qt-distro/conf/distro/include/colibri-imx8qxp.conf
@@ -0,0 +1,34 @@
+############################################################################
+##
+## Copyright (C) 2019 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$
+##
+############################################################################
+
+include conf/distro/include/fsl-imx8.inc
+
+FSL_EULA_FILE := "${COREBASE}/../meta-fsl-bsp-release-toradex/imx/EULA.txt"
+
+DEPLOY_CONF_NAME = "Toradex Colibri iMX8QXP"
diff --git a/meta-boot2qt-distro/conf/distro/include/fsl-imx8.inc b/meta-boot2qt-distro/conf/distro/include/fsl-imx8.inc
index 2ad63f5a..9d17aa3c 100644
--- a/meta-boot2qt-distro/conf/distro/include/fsl-imx8.inc
+++ b/meta-boot2qt-distro/conf/distro/include/fsl-imx8.inc
@@ -1,6 +1,6 @@
 ############################################################################
 ##
-## Copyright (C) 2018 The Qt Company Ltd.
+## Copyright (C) 2019 The Qt Company Ltd.
 ## Contact: https://www.qt.io/licensing/
 ##
 ## This file is part of the Boot to Qt meta layer.
@@ -28,52 +28,32 @@
 ############################################################################
 
 include conf/distro/include/fsl.inc
+include conf/distro/include/fsl-imx-preferred-env.inc
 
 FSL_EULA_FILE := "${COREBASE}/../meta-fsl-bsp-release/imx/EULA.txt"
 
 DISTRO_FEATURES_remove = "vulkan"
 
-RDEPENDS_gstreamer1.0-meta-base_remove_pn-gstreamer1.0-meta-base = " gstreamer1.0-plugins-good-souphttpsrc"
-RDEPENDS_gstreamer1.0-meta-base_append_pn-gstreamer1.0-meta-base = " gstreamer1.0-plugins-good-soup"
-
 BBMASK += "\
-    meta-boot2qt-distro/recipes-connectivity/connman/connman_%.bbappend \
     meta-boot2qt/meta-fsl-extras/recipes/u-boot/u-boot-toradex_%.bbappend \
-    meta-freescale/recipes-graphics/wayland/weston \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-browser \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/imx-test \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-connectivity/bluez5 \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-connectivity/connman \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-connectivity/nfs-utils \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-connectivity/wpa-supplicant \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-core/systemd/systemd_%.bbappend \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-devtools/gdb \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-extended/logrotate \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-graphics/opencv \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-graphics/xorg-driver \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/cryptodev \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/alsa \
-    meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/pulseaudio \
-    meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/fsl-rc-local \
-    meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images \
-    meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/packagegroup \
-    meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/devil \
-    meta-fsl-bsp-release/imx/meta-sdk/recipes-qt5/qt5 \
+    meta-freescale/recipes-graphics/drm/libdrm_%.bbappend \
+    imx/meta-bsp/recipes-browser \
+    imx/meta-sdk/recipes-fsl/fsl-rc-local \
+    imx/meta-sdk/recipes-fsl/images \
+    imx/meta-sdk/recipes-fsl/packagegroup/packagegroup-fsl-gstreamer1.0.bbappend \
+    imx/meta-sdk/recipes-fsl/packagegroup/packagegroup-fsl-tools-gpu.bbappend \
+    imx/meta-sdk/recipes-fsl/packagegroup/packagegroup-fsl-tools-testapps.bbappend \
+    imx/meta-sdk/recipes-graphics/devil \
+    imx/meta-sdk/dynamic-layers/qt5-layer \
     "
 
 KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${@d.getVar('KERNEL_VERSION').replace('_','-')}"
-EXTRA_OECONF_append_pn-gstreamer1.0-plugins-base = " --disable-introspection"
-
-MACHINE_GSTREAMER_1_0_PLUGIN += "imx-gst1.0-plugin"
 
-WKS_FILE = "imx8-uboot-bootpart.wks"
+WKS_FILE = "imx8-uboot-bootpart.wks.in"
 WIC_CREATE_EXTRA_ARGS = "--no-fstab-update"
 WKS_FILE_DEPENDS += "imx-boot"
 
-BOOT_CONFIG_MACHINE_pn-imx-boot = "${BOOT_NAME}-${UBOOT_CONFIG}.bin"
-
 IMAGE_BOOT_FILES = "\
     Image \
     fsl-*.dtb \
-    hdmitxfw.bin \
     "
diff --git a/meta-boot2qt-distro/conf/distro/include/imx8qmlpddr4arm2.conf b/meta-boot2qt-distro/conf/distro/include/imx8mqevk.conf
similarity index 91%
rename from meta-boot2qt-distro/conf/distro/include/imx8qmlpddr4arm2.conf
rename to meta-boot2qt-distro/conf/distro/include/imx8mqevk.conf
index a3a2c29a..573d516f 100644
--- a/meta-boot2qt-distro/conf/distro/include/imx8qmlpddr4arm2.conf
+++ b/meta-boot2qt-distro/conf/distro/include/imx8mqevk.conf
@@ -1,6 +1,6 @@
 ############################################################################
 ##
-## Copyright (C) 2018 The Qt Company Ltd.
+## Copyright (C) 2019 The Qt Company Ltd.
 ## Contact: https://www.qt.io/licensing/
 ##
 ## This file is part of the Boot to Qt meta layer.
@@ -29,6 +29,4 @@
 
 include conf/distro/include/fsl-imx8.inc
 
-DEPLOY_CONF_NAME = "NXP iMX8QM"
-
-PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
+DEPLOY_CONF_NAME = "NXP i.MX 8MQuad EVK"
diff --git a/meta-boot2qt-distro/conf/distro/include/imx8qmmek.conf b/meta-boot2qt-distro/conf/distro/include/imx8qmmek.conf
new file mode 100644
index 00000000..21186653
--- /dev/null
+++ b/meta-boot2qt-distro/conf/distro/include/imx8qmmek.conf
@@ -0,0 +1,38 @@
+############################################################################
+##
+## Copyright (C) 2019 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$
+##
+############################################################################
+
+include conf/distro/include/fsl-imx8.inc
+
+DEPLOY_CONF_NAME = "NXP i.MX 8QuadMax MEK"
+
+IMAGE_BOOT_FILES += "\
+    dpfw.bin \
+    hdmirxfw.bin \
+    hdmitxfw.bin \
+    "
diff --git a/meta-fsl-extras/recipes-bsp/firmware-imx/firmware-imx_%.bbappend b/meta-fsl-extras/recipes-bsp/firmware-imx/firmware-imx_%.bbappend
new file mode 100644
index 00000000..9eb14b6d
--- /dev/null
+++ b/meta-fsl-extras/recipes-bsp/firmware-imx/firmware-imx_%.bbappend
@@ -0,0 +1,31 @@
+############################################################################
+##
+## Copyright (C) 2019 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$
+##
+############################################################################
+
+# need to use MACHINE_ARCH since the recipe deploys machine specific files
+PACKAGE_ARCH_mx8 = "${MACHINE_ARCH}"
diff --git a/meta-fsl-extras/recipes/linux-firmware/linux-firmware_git.bbappend b/meta-fsl-extras/recipes/linux-firmware/linux-firmware_git.bbappend
new file mode 100644
index 00000000..932a4ec9
--- /dev/null
+++ b/meta-fsl-extras/recipes/linux-firmware/linux-firmware_git.bbappend
@@ -0,0 +1,38 @@
+############################################################################
+##
+## Copyright (C) 2019 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$
+##
+############################################################################
+
+# Package firmware-qca6174 wants to install file .../etc/bluetooth/firmware.conf
+# But that file is already provided by package  * linux-firmware-qca
+do_install_append () {
+    rm -f ${D}${sysconfdir}/bluetooth/firmware.conf
+}
+
+FILES_${PN}-qca_remove = " \
+  ${sysconfdir}/bluetooth/firmware.conf \
+"
diff --git a/meta-fsl-extras/wic/imx8-uboot-bootpart.wks b/meta-fsl-extras/wic/imx8-uboot-bootpart.wks.in
similarity index 84%
rename from meta-fsl-extras/wic/imx8-uboot-bootpart.wks
rename to meta-fsl-extras/wic/imx8-uboot-bootpart.wks.in
index 33de776d..fb79978c 100644
--- a/meta-fsl-extras/wic/imx8-uboot-bootpart.wks
+++ b/meta-fsl-extras/wic/imx8-uboot-bootpart.wks.in
@@ -12,7 +12,7 @@
 # | |         |              |
 # 0 33kiB    4MiB          32MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB)
 #
-part u-boot --source rawcopy --sourceparams="file=imx-boot-sd.bin" --ondisk mmcblk --no-table --align 33
+part u-boot --source rawcopy --sourceparams="file=imx-boot-${MACHINE}-sd.bin" --ondisk mmcblk --no-table --align ${IMX_BOOT_SEEK}
 part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 32
 part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096
 
diff --git a/scripts/manifest.xml b/scripts/manifest.xml
index ba7e7f18..d375521a 100644
--- a/scripts/manifest.xml
+++ b/scripts/manifest.xml
@@ -15,6 +15,7 @@
   <remote fetch="git://git.toradex.com" name="toradex"/>
   <remote fetch="git://github.com/boundarydevices" name="boundary"/>
   <remote fetch="git://github.com/toradex" name="toradex-github"/>
+  <remote fetch="git://source.codeaurora.org/external/imx" name="aurora-imx"/>
 
   <project name="poky"
            remote="yocto"
@@ -37,12 +38,12 @@
            remote="freescale"
            revision="27ca94f8a4336790ba117b4298566f6820e7e74c"
            path="sources/meta-freescale"
-           groups="notdefault,external,fsl,toradex,smx6,boundary,fsl-imx8"/>
+           groups="notdefault,external,fsl,toradex,smx6,boundary,fsl-imx8,toradex-imx8"/>
   <project name="meta-freescale-3rdparty"
            remote="freescale"
            revision="82037216280a39957fb4272581637abec734ad50"
            path="sources/meta-freescale-3rdparty"
-           groups="notdefault,external,fsl,toradex,smx6,boundary,fsl-imx8"/>
+           groups="notdefault,external,fsl,toradex,smx6,boundary,fsl-imx8,toradex-imx8"/>
   <project name="meta-raspberrypi"
            remote="yocto"
            revision="2d40b000021bc8a9ef7f329ed0ad410f8d227b97"
@@ -89,10 +90,15 @@
            path="sources/meta-boundary"
            groups="notdefault,external,boundary"/>
   <project name="meta-fsl-bsp-release"
-           remote="toradex-github"
-           revision="28c1b2adfb6445a64a42d082299203ec2035ea9f"
+           remote="aurora-imx"
+           revision="cb65aa03c70d0b88cdc2b06eb56ab59ae01f54bf"
            path="sources/meta-fsl-bsp-release"
            groups="notdefault,external,fsl-imx8"/>
+  <project name="meta-fsl-bsp-release"
+           remote="toradex-github"
+           revision="55754a3cc79759f18fa1df88ae2ffa91fbd87d84"
+           path="sources/meta-fsl-bsp-release-toradex"
+           groups="notdefault,external,toradex-imx8"/>
 
   <project name="nvidia-layer"
            remote="playground"
diff --git a/scripts/setup-environment.sh b/scripts/setup-environment.sh
index febda41f..c4f6a3d7 100755
--- a/scripts/setup-environment.sh
+++ b/scripts/setup-environment.sh
@@ -56,9 +56,12 @@ BUILDDIRECTORY=${BUILDDIRECTORY:-build-${MACHINE}}
 
 if [ ! -f ${PWD}/${BUILDDIRECTORY}/conf/bblayers.conf ]; then
   case ${MACHINE} in
-    apalis-imx8|imx8qmlpddr4arm2)
+    imx8qmmek|imx8mqevk)
       LAYERSCONF="bblayers.conf.fsl-imx8.sample"
     ;;
+    apalis-imx8|colibri-imx8qxp)
+      LAYERSCONF="bblayers.conf.toradex-imx8.sample"
+    ;;
     apalis-imx6|colibri-imx6|colibri-imx6ull|colibri-vf|colibri-imx7|colibri-imx7-emmc)
       LAYERSCONF="bblayers.conf.toradex.sample"
     ;;
-- 
GitLab