aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2021-10-15 10:39:35 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2021-10-15 14:47:21 +0300
commit9d12b3cbbe7a89ab447e83f5477bd20529d25124 (patch)
tree2240a37a4c120858a7cbae5b27506a488179f6fd
parentec57c66ddc02e5abfd54847c14d03b3509a7d288 (diff)
Split the image types bbclass
Split the image types bbclass so that each device has now its own bbclass with the overrides that they need. We are only left with tezi overrides for Toradex boards and tegra overrides for Jetson boards. The extra space addition is now applied only in the boot2qt demo image, so custom images are not affected. Fix dependency in deploy-buildinfo which was hidden previously since all machines inherit the image types bbclass. Pick-to: 6.2 Change-Id: I7c9cbe014b7f51cc31885d6b4da62da0bb9622fd Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
-rw-r--r--meta-boot2qt-distro/conf/distro/b2qt.conf2
-rw-r--r--meta-boot2qt-distro/conf/distro/include/jetson.inc2
-rw-r--r--meta-boot2qt-distro/conf/distro/include/toradex.inc2
-rw-r--r--meta-boot2qt-distro/recipes-qt/images/b2qt-embedded-qt6-image.bb5
-rw-r--r--meta-boot2qt/classes/deploy-buildinfo.bbclass2
-rw-r--r--meta-boot2qt/classes/image_type_tezi_b2qt.bbclass (renamed from meta-boot2qt/classes/image_types_sdcard.bbclass)23
-rw-r--r--meta-boot2qt/classes/image_types_tegra_b2qt.bbclass49
7 files changed, 59 insertions, 26 deletions
diff --git a/meta-boot2qt-distro/conf/distro/b2qt.conf b/meta-boot2qt-distro/conf/distro/b2qt.conf
index 12111fc2..798dc0bb 100644
--- a/meta-boot2qt-distro/conf/distro/b2qt.conf
+++ b/meta-boot2qt-distro/conf/distro/b2qt.conf
@@ -60,7 +60,7 @@ PREFERRED_PROVIDER_jpeg ?= "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native ?= "libjpeg-turbo-native"
IMAGE_FSTYPES += "conf"
-IMAGE_CLASSES += "image_types_sdcard deploy-conf"
+IMAGE_CLASSES += "deploy-conf"
QBSP_README ?= "README"
QBSP_IMAGE_CONTENT ?= "${QBSP_README}"
diff --git a/meta-boot2qt-distro/conf/distro/include/jetson.inc b/meta-boot2qt-distro/conf/distro/include/jetson.inc
index e5e5359b..e2ef26f2 100644
--- a/meta-boot2qt-distro/conf/distro/include/jetson.inc
+++ b/meta-boot2qt-distro/conf/distro/include/jetson.inc
@@ -44,6 +44,8 @@ DEPLOY_CONF_NAME:jetson-tx2-devkit = "NVIDIA Jetson TX2 Development Kit"
DEPLOY_CONF_IMAGE_TYPE = "wic.xz"
+IMAGE_CLASSES += "image_types_tegra_b2qt"
+
QBSP_IMAGE_CONTENT += "\
${IMAGE_LINK_NAME}.${DEPLOY_CONF_IMAGE_TYPE} \
${IMAGE_LINK_NAME}.conf \
diff --git a/meta-boot2qt-distro/conf/distro/include/toradex.inc b/meta-boot2qt-distro/conf/distro/include/toradex.inc
index e7e25789..737881c4 100644
--- a/meta-boot2qt-distro/conf/distro/include/toradex.inc
+++ b/meta-boot2qt-distro/conf/distro/include/toradex.inc
@@ -34,6 +34,8 @@ include conf/machine/include/${MACHINE}.inc
PREFERRED_PROVIDER_virtual/dtb:use-nxp-bsp = "device-tree-overlays"
+IMAGE_CLASSES += "image_type_tezi_b2qt"
+
QBSP_IMAGE_CONTENT += "\
${IMAGE_LINK_NAME}.tezi.tar \
"
diff --git a/meta-boot2qt-distro/recipes-qt/images/b2qt-embedded-qt6-image.bb b/meta-boot2qt-distro/recipes-qt/images/b2qt-embedded-qt6-image.bb
index d937674f..744bde58 100644
--- a/meta-boot2qt-distro/recipes-qt/images/b2qt-embedded-qt6-image.bb
+++ b/meta-boot2qt-distro/recipes-qt/images/b2qt-embedded-qt6-image.bb
@@ -1,6 +1,6 @@
############################################################################
##
-## Copyright (C) 2019 The Qt Company Ltd.
+## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the Boot to Qt meta layer.
@@ -45,6 +45,9 @@ IMAGE_FEATURES += "\
inherit core-image qbsp-image deploy-buildinfo
inherit consistent_timestamps
+# add some extra space to the device images
+IMAGE_ROOTFS_EXTRA_SPACE = "100000"
+
IMAGE_INSTALL += "\
packagegroup-b2qt-embedded-base \
packagegroup-b2qt-embedded-tools \
diff --git a/meta-boot2qt/classes/deploy-buildinfo.bbclass b/meta-boot2qt/classes/deploy-buildinfo.bbclass
index df83e507..08a62e25 100644
--- a/meta-boot2qt/classes/deploy-buildinfo.bbclass
+++ b/meta-boot2qt/classes/deploy-buildinfo.bbclass
@@ -29,7 +29,7 @@
inherit image-buildinfo
-buildinfo[depends] += "qtbase-native:do_populate_sysroot"
+do_image[depends] += "qtbase-native:do_populate_sysroot"
IMAGE_BUILDINFO_VARS:append = " QT_VERSION"
diff --git a/meta-boot2qt/classes/image_types_sdcard.bbclass b/meta-boot2qt/classes/image_type_tezi_b2qt.bbclass
index 1daf768a..c2a1fd5d 100644
--- a/meta-boot2qt/classes/image_types_sdcard.bbclass
+++ b/meta-boot2qt/classes/image_type_tezi_b2qt.bbclass
@@ -27,29 +27,6 @@
##
############################################################################
-IMAGE_ROOTFS_EXTRA_SPACE = "100000"
-
-# create flash package that utilizes the SD card image
-create_tegraflash_pkg:append() {
- cd ${WORKDIR}/tegraflash
- cat > prepare-image.sh <<END
-#!/bin/sh -e
-if [ ! -e "${IMAGE_BASENAME}.img" ]; then
- xz -dc ../${IMAGE_LINK_NAME}.wic.xz | dd of=${IMAGE_LINK_NAME}.${IMAGE_TEGRAFLASH_FS_TYPE} iflag=fullblock skip=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) count=$(expr ${ROOTFS_SIZE} / 1024)
- ./mksparse -v --fillpattern=0 ${IMAGE_LINK_NAME}.${IMAGE_TEGRAFLASH_FS_TYPE} ${IMAGE_BASENAME}.img
- rm -f ${IMAGE_LINK_NAME}.${IMAGE_TEGRAFLASH_FS_TYPE}
-fi
-echo "Flash image ready"
-END
- chmod +x prepare-image.sh
- rm ${IMAGE_BASENAME}.img
-
- cd ..
- rm -f ${IMGDEPLOYDIR}/${IMAGE_NAME}.flasher.tar.gz
- tar czhf ${IMGDEPLOYDIR}/${IMAGE_NAME}.flasher.tar.gz tegraflash
- ln -sf ${IMAGE_NAME}.flasher.tar.gz ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.flasher.tar.gz
-}
-
do_image[depends] += "qtbase-native:do_populate_sysroot"
IMAGE_CMD:teziimg:append() {
${IMAGE_CMD_TAR} --transform 's,^,${IMAGE_NAME}-Tezi_${TEZI_VERSION}/,' -rhf ${IMGDEPLOYDIR}/${IMAGE_NAME}-Tezi_${TEZI_VERSION}.tar TEZI_B2QT_EULA.TXT Built_with_Qt.png
diff --git a/meta-boot2qt/classes/image_types_tegra_b2qt.bbclass b/meta-boot2qt/classes/image_types_tegra_b2qt.bbclass
new file mode 100644
index 00000000..e006b64d
--- /dev/null
+++ b/meta-boot2qt/classes/image_types_tegra_b2qt.bbclass
@@ -0,0 +1,49 @@
+############################################################################
+##
+## Copyright (C) 2021 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$
+##
+############################################################################
+
+# create flash package that utilizes the SD card image
+create_tegraflash_pkg:append() {
+ cd ${WORKDIR}/tegraflash
+ cat > prepare-image.sh <<END
+#!/bin/sh -e
+if [ ! -e "${IMAGE_BASENAME}.img" ]; then
+ xz -dc ../${IMAGE_LINK_NAME}.wic.xz | dd of=${IMAGE_LINK_NAME}.${IMAGE_TEGRAFLASH_FS_TYPE} iflag=fullblock skip=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) count=$(expr ${ROOTFS_SIZE} / 1024)
+ ./mksparse -v --fillpattern=0 ${IMAGE_LINK_NAME}.${IMAGE_TEGRAFLASH_FS_TYPE} ${IMAGE_BASENAME}.img
+ rm -f ${IMAGE_LINK_NAME}.${IMAGE_TEGRAFLASH_FS_TYPE}
+fi
+echo "Flash image ready"
+END
+ chmod +x prepare-image.sh
+ rm ${IMAGE_BASENAME}.img
+
+ cd ..
+ rm -f ${IMGDEPLOYDIR}/${IMAGE_NAME}.flasher.tar.gz
+ tar czhf ${IMGDEPLOYDIR}/${IMAGE_NAME}.flasher.tar.gz tegraflash
+ ln -sf ${IMAGE_NAME}.flasher.tar.gz ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.flasher.tar.gz
+}