From 8521f121d3c7d5ced67abf44dff73021437e7a87 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 3 Apr 2017 13:46:55 +0300 Subject: tegra: update to [4.1.4.0] Vibrante 4.1 Linux Drive CX2 Task-number: QTAUTO-272 Change-Id: I63a564996a363cdd14f14f51a88364f9a9f99d73 Reviewed-by: Teemu Holappa --- .../linux-libc-headers_4.%.bbappend | 26 ++++- .../recipes/linux/linux-nvidia.bbappend | 48 ++++------ .../0001-Fix-misleading-indentation-error.patch | 42 +++++++++ .../wayland/wayland/always-build-scanner.patch | 105 --------------------- .../recipes/wayland/wayland_%.bbappend | 12 +-- .../recipes/weston/weston_%.bbappend | 10 +- 6 files changed, 92 insertions(+), 151 deletions(-) create mode 100644 meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch delete mode 100644 meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch (limited to 'meta-nvidia-extras') diff --git a/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend b/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend index f2bdba1..c7730c6 100644 --- a/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend +++ b/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend @@ -1,7 +1,29 @@ -# Use our kernel instead of yocto which defaults to mainline 3.18 +# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# KERN_DIR holds linux.tar.bz2 +KERN_DIR := "${LNX_TOPDIR}_src/kernel" +# Kernel source is the kernel tarball in PDK SRC_URI = "file://${KERN_DIR}/linux.tar.bz2" -PV = "3.18" +PV = "4.4" # Extracting linux.tar.bz2 creates directories # /vibrante-oss-src/kernel S = "${WORKDIR}/vibrante-oss-src/kernel" + +# Need to pass this to for oe_runmake explicitly for building outside kerneldir +EXTRA_OEMAKE += " -C ${S} O=${B}" + +# Apply RT patches +require recipes-kernel/linux/apply-rt-patches.inc diff --git a/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend b/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend index 70ee515..835dfe8 100644 --- a/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend +++ b/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -27,43 +27,31 @@ ## ############################################################################ -do_unpack_append() { - rm -rf ${STAGING_KERNEL_DIR} - ln -s ${S} ${STAGING_KERNEL_DIR} -} +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +SRC_URI += "file://0001-Fix-misleading-indentation-error.patch;patchdir=.." -do_kernel_defconfig_prepend () { -} +CROSS_COMPILE_PREFIX = "${CROSS_COMPILE}" -do_compile_prepend () { - # cross_compile_exports - export ARCH=${KERNEL_ARCH} - export CROSS_COMPILE=${CROSS_COMPILE} +PACKAGES += "kernel-devicetree" +FILES_kernel-devicetree = "/boot/*.dtb" - echo "CONFIG_USB_FUNCTIONFS=m" >> ${B}/.config - echo "CONFIG_USB_ACM=m" >> ${B}/.config +RDEPENDS_kernel-base = "kernel-image kernel-devicetree" - make olddefconfig +python do_patch () { + bb.build.exec_func('patch_do_patch', d) } -do_install () { - kernel_do_install - - 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_unpack_append() { + mkdir -p ${STAGING_KERNEL_DIR} + rm -rf ${STAGING_KERNEL_DIR} + ln -s ${S} ${STAGING_KERNEL_DIR} } -do_deploy() { - kernel_do_deploy +do_install_append() { + kernel_do_install + install -m 0664 -t ${D}/boot/ ${B}/arch/arm64/boot/dts/*.dtb } -do_compile () { - kernel_do_compile +dtbs_deploy() { + install -m 0664 -t ${DEPLOY_DIR_IMAGE} ${B}/arch/arm64/boot/dts/*.dtb } diff --git a/meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch b/meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch new file mode 100644 index 0000000..a344adc --- /dev/null +++ b/meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch @@ -0,0 +1,42 @@ +From 33d112e943590020f2cda2a403a755531833b016 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Fri, 31 Mar 2017 09:42:18 +0300 +Subject: [PATCH] Fix misleading-indentation error + +error: this 'if' clause does not guard... [-Werror=misleading-indentation] + if (!runlist->active_channels) +--- + nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +index 3e57c67..e2fe4db 100644 +--- a/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c ++++ b/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +@@ -209,15 +209,15 @@ static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) + if (!runlist->active_channels) + goto clean_up_runlist; + +- runlist_size = sizeof(u16) * f->num_channels; +- for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { +- int err = gk20a_gmmu_alloc_sys(g, runlist_size, +- &runlist->mem[i]); +- if (err) { +- dev_err(d, "memory allocation failed\n"); +- goto clean_up_runlist; +- } ++ runlist_size = sizeof(u16) * f->num_channels; ++ for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { ++ int err = gk20a_gmmu_alloc_sys(g, runlist_size, ++ &runlist->mem[i]); ++ if (err) { ++ dev_err(d, "memory allocation failed\n"); ++ goto clean_up_runlist; + } ++ } + mutex_init(&runlist->mutex); + + /* None of buffers is pinned if this value doesn't change. +-- +2.7.4 + diff --git a/meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch b/meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch deleted file mode 100644 index 5e0e6bf..0000000 --- a/meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch +++ /dev/null @@ -1,105 +0,0 @@ -build: always build wayland-scanner - -The previous idiom for building a cross-compiled Wayland is to build once for -the build host (with --enable-scanner --disable-libraries) to get a -wayland-scanner binary that can then be used in a cross-compile (with ---disable-scanner). The problem with this is that the cross wayland is missing -a wayland-scanner binary, which means you then can't do any Wayland development -on the target. - -Instead, always build wayland-scanner for the target and change ---enable/disable-scanner to --with/without-host-scanner. Normal builds use the -default of --without-host-scanner and run the wayland-scanner it just built, and -cross-compiled builds pass --with-host-scanner to use a previously built host -scanner but still get a wayland-scanner to install. - -(a theoretically neater solution would be to build two scanners if required (one -to run and one to install), but automake makes this overly complicated) - -Signed-off-by: Ross Burton -Upstream-Status: Submitted - -diff --git a/Makefile.am b/Makefile.am -index c19494f..c2d929b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -64,16 +64,17 @@ nodist_libwayland_client_la_SOURCES = \ - - pkgconfig_DATA += src/wayland-client.pc src/wayland-server.pc - --if ENABLE_SCANNER --wayland_scanner = $(top_builddir)/wayland-scanner - bin_PROGRAMS = wayland-scanner - wayland_scanner_SOURCES = src/scanner.c - wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(AM_CFLAGS) - wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la --$(BUILT_SOURCES) : wayland-scanner - pkgconfig_DATA += src/wayland-scanner.pc --else -+ -+if HOST_SCANNER - wayland_scanner = wayland-scanner -+else -+$(BUILT_SOURCES) : wayland-scanner -+wayland_scanner = $(top_builddir)/wayland-scanner - endif - - protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml -diff --git a/configure.ac b/configure.ac -index c2a804e..de0b02f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -65,11 +65,11 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [[#include ]]) - AC_CHECK_HEADERS([execinfo.h]) - --AC_ARG_ENABLE([scanner], -- [AC_HELP_STRING([--disable-scanner], -- [Disable compilation of wayland-scanner])], -- [], -- [enable_scanner=yes]) -+AC_ARG_WITH([host-scanner], -+ [AC_HELP_STRING([--with-host-scanner], -+ [Use a host wayland-scanner])], -+ [], -+ [with_host_scanner=no]) - - AC_ARG_ENABLE([documentation], - [AC_HELP_STRING([--disable-documentation], -@@ -77,25 +77,23 @@ AC_ARG_ENABLE([documentation], - [], - [enable_documentation=yes]) - --AM_CONDITIONAL(ENABLE_SCANNER, test "x$enable_scanner" = xyes) -+AM_CONDITIONAL(HOST_SCANNER, test "x$with_host_scanner" = xyes) - - AC_ARG_WITH(icondir, [ --with-icondir= Look for cursor icons here], - [ ICONDIR=$withval], - [ ICONDIR=${datadir}/icons]) - AC_SUBST([ICONDIR]) - --if test "x$enable_scanner" = "xyes"; then -- PKG_CHECK_MODULES(EXPAT, [expat], [], -- [AC_CHECK_HEADERS(expat.h, [], -- [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) -- SAVE_LIBS="$LIBS" -- AC_SEARCH_LIBS(XML_ParserCreate, expat, [], -- [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) -- EXPAT_LIBS="$LIBS" -- LIBS="$SAVE_LIBS" -- AC_SUBST(EXPAT_LIBS) -- ]) --fi -+PKG_CHECK_MODULES(EXPAT, [expat], [], -+ [AC_CHECK_HEADERS(expat.h, [], -+ [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) -+ SAVE_LIBS="$LIBS" -+ AC_SEARCH_LIBS(XML_ParserCreate, expat, [], -+ [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) -+ EXPAT_LIBS="$LIBS" -+ LIBS="$SAVE_LIBS" -+ AC_SUBST(EXPAT_LIBS) -+ ]) - - AC_PATH_PROG(XSLTPROC, xsltproc) - AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"]) diff --git a/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend b/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend index 463d5a1..5ab7634 100644 --- a/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend +++ b/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -27,10 +27,8 @@ ## ############################################################################ -FILESEXTRAPATHS_append := ":${NVLAYER_DIR}/packages:${LNX_TOPDIR}/${PN}:${THISDIR}/${PN}" +FILESEXTRAPATHS_append := ":${LNX_TOPDIR}_src/wayland" -SRC_URI_remove = "file://${NVLAYER_DIR}/packages/wayland-1.8.1-src.tar.gz" -SRC_URI = "\ - file://wayland-1.8.1-src.tar.gz \ - file://always-build-scanner.patch \ - " +SRC_URI = "file://wayland-1.11.0-src.tar.gz" + +DEPENDS_class-target += "wayland-egl" diff --git a/meta-nvidia-extras/recipes/weston/weston_%.bbappend b/meta-nvidia-extras/recipes/weston/weston_%.bbappend index cfc286f..22f0f11 100644 --- a/meta-nvidia-extras/recipes/weston/weston_%.bbappend +++ b/meta-nvidia-extras/recipes/weston/weston_%.bbappend @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -27,10 +27,6 @@ ## ############################################################################ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" -S = "${WORKDIR}/${LNX_TOPDIR}/samples/wayland/weston" +PACKAGECONFIG_remove = "kms" -do_install_prepend() { - mkdir -p ${WORKDIR}/${LNX_TOPDIR}/samples/weston/tools - cp ${WORKDIR}/${LNX_TOPDIR}/samples/wayland/weston/tools/weston.ini ${WORKDIR}/${LNX_TOPDIR}/samples/weston/tools/weston.ini -} +TARGET_CFLAGS += "-DWIN_INTERFACE_CUSTOM" -- cgit v1.2.3-54-g00ecf