From 0d752a4b59a72f3cc95390083e1c606962b42411 Mon Sep 17 00:00:00 2001 From: Teemu Holappa Date: Fri, 27 Nov 2015 12:35:49 +0200 Subject: Added support for Jetson-tk1-pro device. The configuration has dependency to the interal repositories (meta-tegra and jetson-tk1-pro). Change-Id: I5e13377cf8cfbe4fad3f19215a292b49195f1546 Reviewed-by: Samuli Piippo --- b2qt-init-build-env | 3 ++ conf/bblayers.conf.nvidia-logan.sample | 48 ++++++++++++++++++++++ conf/distro/include/nvidia-logan.conf | 39 ++++++++++++++++++ meta-nvidia-logan-extras/conf/layer.conf | 33 +++++++++++++++ .../recipes/connman-conf/connman-conf.bbappend | 33 +++++++++++++++ .../connman-conf/nvidia-logan/main.conf | 4 ++ .../recipes/qt5/qtbase_git.bbappend | 24 +++++++++++ .../recipes/qt5/qtwebengine_git.bbappend | 24 +++++++++++ .../qt5/qtbase/nvidia-logan/oe-device-extra.pri | 11 +++++ recipes/adbd/files/nvidia-logan/adb-init | 46 +++++++++++++++++++++ recipes/adbd/files/nvidia-logan/defaults | 4 ++ scripts/manifest.xml | 11 +++++ scripts/manifest_fido.xml | 11 +++++ scripts/setup-environment.sh | 3 ++ 14 files changed, 294 insertions(+) create mode 100644 conf/bblayers.conf.nvidia-logan.sample create mode 100644 conf/distro/include/nvidia-logan.conf create mode 100644 meta-nvidia-logan-extras/conf/layer.conf create mode 100644 meta-nvidia-logan-extras/recipes/connman-conf/connman-conf.bbappend create mode 100644 meta-nvidia-logan-extras/recipes/connman-conf/connman-conf/nvidia-logan/main.conf create mode 100644 meta-nvidia-logan-extras/recipes/qt5/qtbase_git.bbappend create mode 100644 meta-nvidia-logan-extras/recipes/qt5/qtwebengine_git.bbappend create mode 100644 recipes-qt/qt5/qtbase/nvidia-logan/oe-device-extra.pri create mode 100644 recipes/adbd/files/nvidia-logan/adb-init create mode 100644 recipes/adbd/files/nvidia-logan/defaults diff --git a/b2qt-init-build-env b/b2qt-init-build-env index 9c67a64..709b0b9 100755 --- a/b2qt-init-build-env +++ b/b2qt-init-build-env @@ -114,6 +114,9 @@ get_groups() { nuc) PROJECT_GROUPS="nuc" ;; + nvidia-logan) + PROJECT_GROUPS="nvidia-logan" + ;; emulator) PROJECT_GROUPS="emulator" ;; diff --git a/conf/bblayers.conf.nvidia-logan.sample b/conf/bblayers.conf.nvidia-logan.sample new file mode 100644 index 0000000..1df641c --- /dev/null +++ b/conf/bblayers.conf.nvidia-logan.sample @@ -0,0 +1,48 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://www.qt.io/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-tegra \ + ${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-qt5 \ + ${BSPDIR}/sources/meta-openembedded/meta-ruby \ + ${BSPDIR}/sources/meta-b2qt \ + ${BSPDIR}/sources/meta-b2qt/meta-nvidia-logan-extras \ + " + +BBLAYERS_NON_REMOVABLE ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + " diff --git a/conf/distro/include/nvidia-logan.conf b/conf/distro/include/nvidia-logan.conf new file mode 100644 index 0000000..c39d757 --- /dev/null +++ b/conf/distro/include/nvidia-logan.conf @@ -0,0 +1,39 @@ +############################################################################# +## +## Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://www.qt.io/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +DISTRO_FEATURES_remove += "wayland" + +MACHINE_EXTRA_INSTALL = "\ + libegl \ + libgles2 \ + tegra-firmware-gk20a \ + graphics-fw \ + libdrm-nv \ +" + +MACHINE_EXTRA_INSTALL_SDK = "\ + libegl-dev \ + libgles2-dev \ + graphics-headers-dev \ + libdrm-nv-dev \ +" + diff --git a/meta-nvidia-logan-extras/conf/layer.conf b/meta-nvidia-logan-extras/conf/layer.conf new file mode 100644 index 0000000..0fc22ca --- /dev/null +++ b/meta-nvidia-logan-extras/conf/layer.conf @@ -0,0 +1,33 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## 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-logan" +BBFILE_PATTERN_b2qt_nvidia-logan := "^${LAYERDIR}/" +BBFILE_PRIORITY_b2qt_nvidia-logan = "20" diff --git a/meta-nvidia-logan-extras/recipes/connman-conf/connman-conf.bbappend b/meta-nvidia-logan-extras/recipes/connman-conf/connman-conf.bbappend new file mode 100644 index 0000000..becde5f --- /dev/null +++ b/meta-nvidia-logan-extras/recipes/connman-conf/connman-conf.bbappend @@ -0,0 +1,33 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## 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-logan-extras/recipes/connman-conf/connman-conf/nvidia-logan/main.conf b/meta-nvidia-logan-extras/recipes/connman-conf/connman-conf/nvidia-logan/main.conf new file mode 100644 index 0000000..a1e45b9 --- /dev/null +++ b/meta-nvidia-logan-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-logan-extras/recipes/qt5/qtbase_git.bbappend b/meta-nvidia-logan-extras/recipes/qt5/qtbase_git.bbappend new file mode 100644 index 0000000..1cb7143 --- /dev/null +++ b/meta-nvidia-logan-extras/recipes/qt5/qtbase_git.bbappend @@ -0,0 +1,24 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://www.qt.io/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +DEPENDS += "graphics-headers" + diff --git a/meta-nvidia-logan-extras/recipes/qt5/qtwebengine_git.bbappend b/meta-nvidia-logan-extras/recipes/qt5/qtwebengine_git.bbappend new file mode 100644 index 0000000..78453ef --- /dev/null +++ b/meta-nvidia-logan-extras/recipes/qt5/qtwebengine_git.bbappend @@ -0,0 +1,24 @@ +############################################################################# +## +## Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://www.qt.io/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +CXXFLAGS +=" -DWIN_INTERFACE_CUSTOM" + diff --git a/recipes-qt/qt5/qtbase/nvidia-logan/oe-device-extra.pri b/recipes-qt/qt5/qtbase/nvidia-logan/oe-device-extra.pri new file mode 100644 index 0000000..6554742 --- /dev/null +++ b/recipes-qt/qt5/qtbase/nvidia-logan/oe-device-extra.pri @@ -0,0 +1,11 @@ +TK1_CFLAGS = -DWIN_INTERFACE_CUSTOM +QMAKE_LIBS_EGL += -lEGL +QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL +QMAKE_CFLAGS += $$TK1_CFLAGS +QMAKE_CXXFLAGS += $$TK1_CFLAGS + +QMAKE_PLATFORM += boot2qt + +QT_QPA_DEFAULT_PLATFORM = eglfs +EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice + diff --git a/recipes/adbd/files/nvidia-logan/adb-init b/recipes/adbd/files/nvidia-logan/adb-init new file mode 100644 index 0000000..1be08c8 --- /dev/null +++ b/recipes/adbd/files/nvidia-logan/adb-init @@ -0,0 +1,46 @@ +#!/bin/sh + +DAEMON=/usr/bin/adbd + +. /etc/default/adbd + +case "$1" in +start) + if [ "$USE_ETHERNET" = "no" ]; then + echo 0 > /sys/class/android_usb/android0/enable + sleep 1 + echo ${SERIAL} > /sys/class/android_usb/android0/iSerial + echo ${VENDOR} > /sys/class/android_usb/android0/idVendor + echo ${PRODUCT} > /sys/class/android_usb/android0/idProduct + echo ffs > /sys/class/android_usb/android0/functions + echo adb >/sys/class/android_usb/android0/f_ffs/aliases + echo 1 > /sys/class/android_usb/android0/enable + + if [ ! -d "/dev/usb-ffs" ]; then + mkdir /dev/usb-ffs + mkdir /dev/usb-ffs/adb + fi + mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000 + fi + start-stop-daemon --start --quiet --exec $DAEMON & + ;; +stop) + start-stop-daemon --stop --quiet --exec $DAEMON + if [ "$USE_ETHERNET" = "no" ]; then + sleep 1 + if mount | grep /dev/usb-ffs/adb > /dev/null; then + umount /dev/usb-ffs/adb + fi + fi + ;; +restart) + start-stop-daemon --stop --quiet --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --exec $DAEMON & + ;; +*) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac +exit 0 + diff --git a/recipes/adbd/files/nvidia-logan/defaults b/recipes/adbd/files/nvidia-logan/defaults new file mode 100644 index 0000000..93bba63 --- /dev/null +++ b/recipes/adbd/files/nvidia-logan/defaults @@ -0,0 +1,4 @@ +VENDOR=0955 +PRODUCT=7940 +SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth1/address) +USE_ETHERNET=no diff --git a/scripts/manifest.xml b/scripts/manifest.xml index 927a2f3..e7b1c52 100644 --- a/scripts/manifest.xml +++ b/scripts/manifest.xml @@ -12,6 +12,7 @@ + + + diff --git a/scripts/manifest_fido.xml b/scripts/manifest_fido.xml index 2a1c78e..e633e35 100644 --- a/scripts/manifest_fido.xml +++ b/scripts/manifest_fido.xml @@ -12,6 +12,7 @@ + + + diff --git a/scripts/setup-environment.sh b/scripts/setup-environment.sh index da7ec69..0736d0d 100755 --- a/scripts/setup-environment.sh +++ b/scripts/setup-environment.sh @@ -70,6 +70,9 @@ if [ ! -f ${PWD}/${BUILDDIRECTORY}/conf/bblayers.conf ]; then nuc) LAYERSCONF="bblayers.conf.nuc.sample" ;; + nvidia-logan) + LAYERSCONF="bblayers.conf.nvidia-logan.sample" + ;; emulator) LAYERSCONF="bblayers.conf.emulator.sample" ;; -- cgit v1.2.3-54-g00ecf