diff options
author | Louai Al-Khanji <louai.al-khanji@theqtcompany.com> | 2016-03-10 23:39:46 -0800 |
---|---|---|
committer | Louai Al-Khanji <louai.al-khanji@theqtcompany.com> | 2016-03-22 14:16:00 +0000 |
commit | 431c82aefd72d6eb7a73b704bc7c6dadcd9295c5 (patch) | |
tree | 7474e42ac03bc705a772a3174c542ff8eef7032a /meta-nvidia-extras | |
parent | ccec3da8bfeef0e86a153772130212e36f68e8c8 (diff) |
nvidia-t18x support
Steps to use this:
Set up vibrante installation, mine looks like this:
$ ls -l ~/VibranteSDK
total 234880
drwxrwxr-x 1 louai louai 298 Mar 20 2014 eclipse
-r-xr-xr-x 1 louai louai 171826846 Jan 4 09:59 NVIDIA_Tegra_Graphics_Debugger_2.1_linux-v4l_l4t-egl.run
-r--r--r-- 1 louai louai 68688729 Jan 4 09:59 NVIDIA_Tegra_System_Profiler_2.5-linux-x64.tar.gz
drwxr-xr-x 1 louai louai 262 Jan 5 14:50 toolchains
drwxrwxr-x 1 louai louai 34 Jan 5 13:55 vibrante-oss-src
drwxr-xr-x 1 louai louai 12 Jan 4 09:47 vibrante-t186ref-cuda
drwxrwxr-x 1 louai louai 264 Feb 10 10:50 vibrante-t186ref-foundation
drwxr-xr-x 1 louai louai 164 Jan 5 14:49 vibrante-t186ref-foundation_src
drwxrwxr-x 1 louai louai 228 Jan 5 13:56 vibrante-t186ref-linux
drwxr-xr-x 1 louai louai 314 Feb 10 10:58 vibrante-t186ref-linux_sr
Set up Yocto build dir:
$ mkdir ~/work
$ cd ~/work
$ ~/tqtc-b2qt/yocto-meta/b2qt-init-build-env init --device tegra-t18x
Add NVIDIA's Yocto things:
$ mkdir ~/work/sources/nvidia-layer
$ cd ~/work/sources/nvidia-layer
$ tar xf ~/VibranteSDK/vibrante-t186ref-linux_src/yocto/nvidia-layer.tgz
$ cd -
Set up build environment:
$ export MACHINE=tegra-t18x
$ . setup-environment.sh
Set the following environment variables:
$ export KERN_DIR=~/VibranteSDK/vibrante-t186ref-linux_src/kernel
$ export PLATFORM_TOPDIR=~/VibranteSDK/vibrante-t186ref-linux
$ export TOOLCHAIN_PATH=~/VibranteSDK/toolchains/tegra-4.9-nv
$ export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOOLCHAIN_PATH KERN_DIR PLATFORM_TOPDIR"
Add NVLAYER_DIR to local.conf:
$ echo 'NVLAYER_DIR = "${TOPDIR}/../sources/nvidia-layer"' >> conf/local.conf
Build your image:
$ bitbake b2qt-embedded-qt5-image
Flash your board:
$ cd $PLATFORM_TOPDIR
$ mv targetfs targetfs-old
$ cd targetfs && tar xf /path/to/rootfs.tar.bz2
$ cd ../../vibrante-t186ref-foundation/utils/scripts/bootburn
$ ./bootburn.sh -b p2382-t186
Change-Id: I4209cd0c19a007c4457460fd67342fc579c2a735
Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com>
Diffstat (limited to 'meta-nvidia-extras')
11 files changed, 186 insertions, 0 deletions
diff --git a/meta-nvidia-extras/conf/layer.conf b/meta-nvidia-extras/conf/layer.conf new file mode 100644 index 00000000..aa447a53 --- /dev/null +++ b/meta-nvidia-extras/conf/layer.conf @@ -0,0 +1,32 @@ +############################################################################## +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:COMM$ +## +## 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 http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## $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_nvidia" +BBFILE_PATTERN_b2qt_nvidia := "^${LAYERDIR}/" +BBFILE_PRIORITY_b2qt_nvidia = "20" diff --git a/meta-nvidia-extras/recipes/connman-conf/connman-conf.bbappend b/meta-nvidia-extras/recipes/connman-conf/connman-conf.bbappend new file mode 100644 index 00000000..86f0571a --- /dev/null +++ b/meta-nvidia-extras/recipes/connman-conf/connman-conf.bbappend @@ -0,0 +1,32 @@ +############################################################################## +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:COMM$ +## +## 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 http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## $QT_END_LICENSE$ +## +############################################################################## + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +FILES_${PN} += "etc/connman/main.conf" + +SRC_URI += "file://main.conf \ + " + +do_install_append() { + install -d ${D}${sysconfdir}/connman + install -m 0644 ${WORKDIR}/main.conf ${D}${sysconfdir}/connman/main.conf +} diff --git a/meta-nvidia-extras/recipes/connman-conf/connman-conf/nvidia-logan/main.conf b/meta-nvidia-extras/recipes/connman-conf/connman-conf/nvidia-logan/main.conf new file mode 100644 index 00000000..a1e45b95 --- /dev/null +++ b/meta-nvidia-extras/recipes/connman-conf/connman-conf/nvidia-logan/main.conf @@ -0,0 +1,4 @@ +[General] +PreferredTechnologies=ethernet,wifi,cellular +NetworkInterfaceBlacklist=eth0 + diff --git a/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend b/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend new file mode 100644 index 00000000..f9d9cc6b --- /dev/null +++ b/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend @@ -0,0 +1,28 @@ +do_kernel_defconfig_prepend_tegra-t18x () { +} + +do_install_append_tegra-t18x () { + s=$(readlink -m "${S}") + kernsrc="${STAGING_KERNEL_DIR}" + + if [ "${s}" != "${kernsrc}" ]; then + mkdir -p "${kernsrc}" + rm -rf "${kernsrc}" + mv "${S}" "${STAGING_KERNEL_DIR}" + ln -sf "${kernsrc}" "${s}" + fi +} + +do_compile_prepend_tegra-t18x () { + if [ -z "${TOOLCHAIN_PATH}" ] ; then + echo "TOOLCHAIN_PATH must be set" + exit -1 + fi + + export PATH="${TOOLCHAIN_PATH}/usr/bin/aarch64-gnu-linux:${PATH}" + + echo "CONFIG_USB_FUNCTIONFS=m" >> ${B}/.config + echo "CONFIG_USB_ACM=m" >> ${B}/.config + + make olddefconfig +} diff --git a/meta-nvidia-extras/recipes/packagegroups/packagegroup-b2qt-embedded-toolchain-target.bbappend b/meta-nvidia-extras/recipes/packagegroups/packagegroup-b2qt-embedded-toolchain-target.bbappend new file mode 100644 index 00000000..1800e5ee --- /dev/null +++ b/meta-nvidia-extras/recipes/packagegroups/packagegroup-b2qt-embedded-toolchain-target.bbappend @@ -0,0 +1,4 @@ +RDEPENDS_${PN}_remove_tegra-t18x = "\ +libgbm-dev \ +" + diff --git a/meta-nvidia-extras/recipes/qt5/qtbase_git.bbappend b/meta-nvidia-extras/recipes/qt5/qtbase_git.bbappend new file mode 100644 index 00000000..cd74ddf6 --- /dev/null +++ b/meta-nvidia-extras/recipes/qt5/qtbase_git.bbappend @@ -0,0 +1,23 @@ +############################################################################## +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:COMM$ +## +## 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 http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## $QT_END_LICENSE$ +## +############################################################################## + +DEPENDS_nvidia-logan += "graphics-headers" +PACKAGECONFIG_nvidia-logan += "kms" diff --git a/meta-nvidia-extras/recipes/qt5/qtwebengine_git.bbappend b/meta-nvidia-extras/recipes/qt5/qtwebengine_git.bbappend new file mode 100644 index 00000000..97acf20d --- /dev/null +++ b/meta-nvidia-extras/recipes/qt5/qtwebengine_git.bbappend @@ -0,0 +1,23 @@ +############################################################################## +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:COMM$ +## +## 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 http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## $QT_END_LICENSE$ +## +############################################################################## + +CXXFLAGS +=" -DWIN_INTERFACE_CUSTOM" +COMPATIBLE_MACHINE_aarch64 = "(.*)" diff --git a/meta-nvidia-extras/recipes/systemd/systemd/tegra-t18x/0001-Disable-LTO-in-LDFLAGS-and-CFLAGS.patch b/meta-nvidia-extras/recipes/systemd/systemd/tegra-t18x/0001-Disable-LTO-in-LDFLAGS-and-CFLAGS.patch new file mode 100644 index 00000000..629ccf40 --- /dev/null +++ b/meta-nvidia-extras/recipes/systemd/systemd/tegra-t18x/0001-Disable-LTO-in-LDFLAGS-and-CFLAGS.patch @@ -0,0 +1,18 @@ +diff --git a/configure.ac b/configure.ac +index 97a29d6..b0e4060 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -208,10 +208,6 @@ AS_CASE([$CC], [*clang*], + -Wno-gnu-variable-sized-type-not-at-end \ + ])]) + +-AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*], +- [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ +- -flto -ffat-lto-objects])], +- [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) + AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags") + + AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], +-- +2.5.0 + diff --git a/meta-nvidia-extras/recipes/systemd/systemd_%.bbappend b/meta-nvidia-extras/recipes/systemd/systemd_%.bbappend new file mode 100644 index 00000000..d86ee9d3 --- /dev/null +++ b/meta-nvidia-extras/recipes/systemd/systemd_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend_tegra-t18x := "${THISDIR}/${PN}:" diff --git a/meta-nvidia-extras/recipes/tegra-drivers/tegra-drivers_%.bbappend b/meta-nvidia-extras/recipes/tegra-drivers/tegra-drivers_%.bbappend new file mode 100644 index 00000000..85a29965 --- /dev/null +++ b/meta-nvidia-extras/recipes/tegra-drivers/tegra-drivers_%.bbappend @@ -0,0 +1,12 @@ +GRAPHICS_PACKAGES = " \ +virtual/libgles2 \ +virtual/libegl \ +virtual/egl \ +libgbm \ +libgbm-dev \ +" + +PROVIDES_append = " ${GRAPHICS_PACKAGES}" +RPROVIDES_append_${PN} = " ${GRAPHICS_PACKAGES}" +CONFLICTS_append_${PN} = " ${GRAPHICS_PACKAGES}" +REPLACES_append_${PN} = " ${GRAPHICS_PACKAGES}" diff --git a/meta-nvidia-extras/recipes/wayland-nv/wayland-nv.bbappend b/meta-nvidia-extras/recipes/wayland-nv/wayland-nv.bbappend new file mode 100644 index 00000000..db0da648 --- /dev/null +++ b/meta-nvidia-extras/recipes/wayland-nv/wayland-nv.bbappend @@ -0,0 +1,9 @@ +EXTRA_PROVIDES = " \ +virtual/wayland-native \ +wayland-native \ +" + +PROVIDES_append = "${EXTRA_PROVIDES}" +RPROVIDES_append_${PN} = "${EXTRA_PROVIDES}" +CONFLICTS_append_${PN} = "${EXTRA_PROVIDES}" +REPLACES_append_${PN} = "${EXTRA_PROVIDES}" |