summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlari Ängeslevä <ilari.angesleva@qt.io>2017-10-19 08:15:56 +0300
committerIlari Ängeslevä <ilari.angesleva@qt.io>2017-11-02 12:32:14 +0000
commit450388ddf932c1ed892d29fe8da6429fbc5797e5 (patch)
tree20993d65fb0e0d1136c794ca7737daa742ed5f3f
parentce8684eb34011262ea52e03650af8d9a43846d54 (diff)
downloadmeta-boot2qt-450388ddf932c1ed892d29fe8da6429fbc5797e5.tar.gz
Add support for jetson-tx2
* Update env init and set-up scripts with jetson-tx2 definitions. * Include jetson-tx2 specific configuration files. * Create a copy of an existing patch to adapt to recent changes in the kernel directory structure. Change-Id: I28fbc6cdfe91562ef261543bba4d136c4291ce23 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
-rwxr-xr-xb2qt-init-build-env2
-rw-r--r--conf/distro/include/jetson-tx1.conf14
-rw-r--r--conf/distro/include/jetson-tx2.conf32
-rw-r--r--conf/distro/include/jetson.inc43
-rw-r--r--meta-tegra-extras/recipes/linux/linux-tegra/jetson-tx2/0001-fbcon-Compare-variable-screen-info-instead-of-modes-.patch46
-rw-r--r--meta-tegra-extras/recipes/qt5/qtbase_git.bbappend6
-rw-r--r--recipes-qt/qt5/qtbase/jetson-tx2/oe-device-extra.pri4
-rwxr-xr-xscripts/setup-environment.sh2
8 files changed, 132 insertions, 17 deletions
diff --git a/b2qt-init-build-env b/b2qt-init-build-env
index d4dbbdf..33e12e8 100755
--- a/b2qt-init-build-env
+++ b/b2qt-init-build-env
@@ -130,7 +130,7 @@ get_groups() {
130 emulator) 130 emulator)
131 PROJECT_GROUPS="emulator" 131 PROJECT_GROUPS="emulator"
132 ;; 132 ;;
133 jetson-tx1|jetson-tk1) 133 jetson-tx1|jetson-tx2|jetson-tk1)
134 PROJECT_GROUPS="jetson" 134 PROJECT_GROUPS="jetson"
135 ;; 135 ;;
136 salvator-x|h3ulcb|m3ulcb) 136 salvator-x|h3ulcb|m3ulcb)
diff --git a/conf/distro/include/jetson-tx1.conf b/conf/distro/include/jetson-tx1.conf
index 80435f3..ca82ab0 100644
--- a/conf/distro/include/jetson-tx1.conf
+++ b/conf/distro/include/jetson-tx1.conf
@@ -29,16 +29,4 @@
29 29
30DEPLOY_CONF_NAME = "NVIDIA Jetson TX1" 30DEPLOY_CONF_NAME = "NVIDIA Jetson TX1"
31 31
32# use mmc0 32include conf/distro/include/jetson.inc
33ROOTFS_DEVICE = "mmcblk1p1"
34
35INITRAMFS_MAXSIZE = "165888"
36IMAGE_CLASSES += "image_types_tegra"
37IMAGE_FSTYPES += "tegraflash"
38IMAGE_ROOTFS_ALIGNMENT = "1024"
39UBOOT_SUFFIX = "bin"
40
41QBSP_IMAGE_CONTENT = "\
42 ${IMAGE_LINK_NAME}.img \
43 ${IMAGE_LINK_NAME}.conf \
44 "
diff --git a/conf/distro/include/jetson-tx2.conf b/conf/distro/include/jetson-tx2.conf
new file mode 100644
index 0000000..7ab3fb0
--- /dev/null
+++ b/conf/distro/include/jetson-tx2.conf
@@ -0,0 +1,32 @@
1############################################################################
2##
3## Copyright (C) 2017 The Qt Company Ltd.
4## Contact: https://www.qt.io/licensing/
5##
6## This file is part of the Boot to Qt meta layer.
7##
8## $QT_BEGIN_LICENSE:GPL$
9## Commercial License Usage
10## Licensees holding valid commercial Qt licenses may use this file in
11## accordance with the commercial license agreement provided with the
12## Software or, alternatively, in accordance with the terms contained in
13## a written agreement between you and The Qt Company. For licensing terms
14## and conditions see https://www.qt.io/terms-conditions. For further
15## information use the contact form at https://www.qt.io/contact-us.
16##
17## GNU General Public License Usage
18## Alternatively, this file may be used under the terms of the GNU
19## General Public License version 3 or (at your option) any later version
20## approved by the KDE Free Qt Foundation. The licenses are as published by
21## the Free Software Foundation and appearing in the file LICENSE.GPL3
22## included in the packaging of this file. Please review the following
23## information to ensure the GNU General Public License requirements will
24## be met: https://www.gnu.org/licenses/gpl-3.0.html.
25##
26## $QT_END_LICENSE$
27##
28############################################################################
29
30DEPLOY_CONF_NAME = "NVIDIA Jetson TX2"
31
32include conf/distro/include/jetson.inc
diff --git a/conf/distro/include/jetson.inc b/conf/distro/include/jetson.inc
new file mode 100644
index 0000000..00a7bf8
--- /dev/null
+++ b/conf/distro/include/jetson.inc
@@ -0,0 +1,43 @@
1############################################################################
2##
3## Copyright (C) 2016 The Qt Company Ltd.
4## Contact: https://www.qt.io/licensing/
5##
6## This file is part of the Boot to Qt meta layer.
7##
8## $QT_BEGIN_LICENSE:GPL$
9## Commercial License Usage
10## Licensees holding valid commercial Qt licenses may use this file in
11## accordance with the commercial license agreement provided with the
12## Software or, alternatively, in accordance with the terms contained in
13## a written agreement between you and The Qt Company. For licensing terms
14## and conditions see https://www.qt.io/terms-conditions. For further
15## information use the contact form at https://www.qt.io/contact-us.
16##
17## GNU General Public License Usage
18## Alternatively, this file may be used under the terms of the GNU
19## General Public License version 3 or (at your option) any later version
20## approved by the KDE Free Qt Foundation. The licenses are as published by
21## the Free Software Foundation and appearing in the file LICENSE.GPL3
22## included in the packaging of this file. Please review the following
23## information to ensure the GNU General Public License requirements will
24## be met: https://www.gnu.org/licenses/gpl-3.0.html.
25##
26## $QT_END_LICENSE$
27##
28############################################################################
29
30# use mmc0
31
32ROOTFS_DEVICE = "mmcblk1p1"
33
34INITRAMFS_MAXSIZE = "165888"
35IMAGE_CLASSES += "image_types_tegra"
36IMAGE_FSTYPES += "tegraflash"
37IMAGE_ROOTFS_ALIGNMENT = "1024"
38UBOOT_SUFFIX = "bin"
39
40QBSP_IMAGE_CONTENT = "\
41 ${IMAGE_LINK_NAME}.img \
42 ${IMAGE_LINK_NAME}.conf \
43 "
diff --git a/meta-tegra-extras/recipes/linux/linux-tegra/jetson-tx2/0001-fbcon-Compare-variable-screen-info-instead-of-modes-.patch b/meta-tegra-extras/recipes/linux/linux-tegra/jetson-tx2/0001-fbcon-Compare-variable-screen-info-instead-of-modes-.patch
new file mode 100644
index 0000000..1bce6d7
--- /dev/null
+++ b/meta-tegra-extras/recipes/linux/linux-tegra/jetson-tx2/0001-fbcon-Compare-variable-screen-info-instead-of-modes-.patch
@@ -0,0 +1,46 @@
1From 75a27373962e24424bcd2781568e6c6c5715ca92 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ilari=20=C3=84ngeslev=C3=A4?= <ilari.angesleva@qt.io>
3Date: Tue, 17 Oct 2017 14:13:02 +0300
4Subject: [PATCH] fbcon: Compare variable screen info instead of modes (FIX)
5
6Previous commit changed behavior, so that when trying to match a mode to a
7variable screen info structure, the mode was first converted to a variable
8screen structure rather than the variable screen info structure to a mode.
9
10However, when new mode was being added to the modelist, matching was still
11being done using mode structure. This could cause situation, where existing
12mode would match when comparing with mode structure, but not when compared
13using variable screen info structure. This would eventually result in a
14NULL pointer dereference in fbcon_switch.
15
16Fix the issue by using the variable screen info structure also when adding
17new mode to the modelist.
18---
19 drivers/video/fbdev/core/modedb.c | 7 ++++---
20 1 file changed, 4 insertions(+), 3 deletions(-)
21
22diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c
23index f5a53a6..a8fd871 100644
24--- a/drivers/video/fbdev/core/modedb.c
25+++ b/drivers/video/fbdev/core/modedb.c
26@@ -2187,13 +2187,14 @@ int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head)
27 {
28 struct list_head *pos;
29 struct fb_modelist *modelist;
30- struct fb_videomode *m;
31+ struct fb_var_screeninfo v1, v2;
32 int found = 0;
33
34+ fb_videomode_to_var(&v1, mode);
35 list_for_each(pos, head) {
36 modelist = list_entry(pos, struct fb_modelist, list);
37- m = &modelist->mode;
38- if (fb_mode_is_equal(m, mode)) {
39+ fb_videomode_to_var(&v2, &modelist->mode);
40+ if (fb_var_is_equal(&v1, &v2)) {
41 found = 1;
42 break;
43 }
44--
452.7.4
46
diff --git a/meta-tegra-extras/recipes/qt5/qtbase_git.bbappend b/meta-tegra-extras/recipes/qt5/qtbase_git.bbappend
index ae323cf..5b9f84b 100644
--- a/meta-tegra-extras/recipes/qt5/qtbase_git.bbappend
+++ b/meta-tegra-extras/recipes/qt5/qtbase_git.bbappend
@@ -29,5 +29,7 @@
29 29
30PACKAGECONFIG += "kms" 30PACKAGECONFIG += "kms"
31 31
32# Disable getentropy because of older than 3.17 kernel 32# Disable getentropy for jetson-tx1 because of older than 3.17 kernel.
33QT_CONFIG_FLAGS += "--no-feature-getentropy" 33# The kernel version in jetson-tx2 is 4.4.
34
35QT_CONFIG_FLAGS_append_jetson-tx1 = " --no-feature-getentropy"
diff --git a/recipes-qt/qt5/qtbase/jetson-tx2/oe-device-extra.pri b/recipes-qt/qt5/qtbase/jetson-tx2/oe-device-extra.pri
new file mode 100644
index 0000000..d4c14ca
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/jetson-tx2/oe-device-extra.pri
@@ -0,0 +1,4 @@
1QMAKE_PLATFORM += boot2qt
2
3QT_QPA_DEFAULT_PLATFORM = eglfs
4EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
diff --git a/scripts/setup-environment.sh b/scripts/setup-environment.sh
index fbe8672..204ded6 100755
--- a/scripts/setup-environment.sh
+++ b/scripts/setup-environment.sh
@@ -83,7 +83,7 @@ if [ ! -f ${PWD}/${BUILDDIRECTORY}/conf/bblayers.conf ]; then
83 emulator) 83 emulator)
84 LAYERSCONF="bblayers.conf.emulator.sample" 84 LAYERSCONF="bblayers.conf.emulator.sample"
85 ;; 85 ;;
86 jetson-tx1|jetson-tk1) 86 jetson-tx1|jetson-tx2|jetson-tk1)
87 LAYERSCONF="bblayers.conf.jetson.sample" 87 LAYERSCONF="bblayers.conf.jetson.sample"
88 ;; 88 ;;
89 *) 89 *)