From cfebf8586735f4db9c9573c1af9eb1553132c0e8 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 28 Sep 2016 16:44:45 +0300 Subject: tegra: update recipes to work with krogoth Extra patch needed for linux libc headers to get systemd to build. ../git/src/basic/btrfs-util.c:1122:23: error: 'BTRFS_IOC_QUOTA_RESCAN_WAIT' undeclared (first use in this function) Change-Id: Ic4706679cef9b9eef7a333c7a7c3985104be6012 Reviewed-by: Risto Avila --- conf/distro/include/nvidia-logan.conf | 3 +- conf/distro/include/tegra-t18x.conf | 2 + .../linux-libc-headers_4.%.bbappend | 14 +++ .../linux-libc-headers_4.1.bbappend | 9 -- ...octl-to-wait-for-qgroup-rescan-completion.patch | 124 +++++++++++++++++++++ .../recipes/linux/linux-nvidia_3.10.bbappend | 6 + meta-vib4-extras/recipes/glibc/glibc_2.22.bbappend | 15 --- .../linux-libc-headers_4.%.bbappend | 7 ++ .../linux-libc-headers_4.1.bbappend | 7 -- .../recipes/linux/linux-nvidia.bbappend | 6 +- meta-vib4-extras/recipes/weston/weston-nv.bbappend | 32 ++++++ 11 files changed, 192 insertions(+), 33 deletions(-) create mode 100644 meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend delete mode 100644 meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend create mode 100644 meta-vib3-extras/recipes/linux/linux-nvidia/0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch delete mode 100644 meta-vib4-extras/recipes/glibc/glibc_2.22.bbappend create mode 100644 meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend delete mode 100644 meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend create mode 100644 meta-vib4-extras/recipes/weston/weston-nv.bbappend diff --git a/conf/distro/include/nvidia-logan.conf b/conf/distro/include/nvidia-logan.conf index 23c84c6..0dc1d84 100644 --- a/conf/distro/include/nvidia-logan.conf +++ b/conf/distro/include/nvidia-logan.conf @@ -60,6 +60,7 @@ BBMASK += "\ meta-vib3/recipes-core/systemd \ meta-vib3/recipes-connectivity \ meta-vib3/recipes-multimedia/pulseaudio \ - meta-vib3/recipes-core/meta/external-tegra-toolchain.bb \ + meta-vib3/recipes-core/meta \ meta-vib3/recipes-core/packagegroups \ + meta-vib3/recipes-devtools/gcc \ " diff --git a/conf/distro/include/tegra-t18x.conf b/conf/distro/include/tegra-t18x.conf index 189c4c9..515eb8d 100644 --- a/conf/distro/include/tegra-t18x.conf +++ b/conf/distro/include/tegra-t18x.conf @@ -22,6 +22,8 @@ include conf/distro/include/tegra.inc +OLDEST_KERNEL_aarch64 = "3.18" + TARGET_CFLAGS += " -DWIN_INTERFACE_CUSTOM" DISTRO_FEATURES_DEFAULT += "wayland" diff --git a/meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend b/meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend new file mode 100644 index 0000000..661e595 --- /dev/null +++ b/meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend @@ -0,0 +1,14 @@ + +# Use our kernel instead of yocto which defaults to mainline 3.10. +# Commit id of our kernel's include/uapi directory in kernel tree - +# 8c37e1bfe7dd26a9d4cf4510460a75264c906444 +SRC_URI = "file://${KERN_DIR}/linux.tar.bz2" + +# Extracting linux.tar.bz2 creates directories +# /vibrante-oss-src/kernel +S = "${WORKDIR}/vibrante-oss-src/kernel" + +FILESEXTRAPATHS_prepend := "${THISDIR}/../linux/linux-nvidia:" +SRC_URI += "\ + file://0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch \ + " diff --git a/meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend b/meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend deleted file mode 100644 index 3ff042b..0000000 --- a/meta-vib3-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend +++ /dev/null @@ -1,9 +0,0 @@ - -# Use our kernel instead of yocto which defaults to mainline 3.10. -# Commit id of our kernel's include/uapi directory in kernel tree - -# 8c37e1bfe7dd26a9d4cf4510460a75264c906444 -SRC_URI = "file://${KERN_DIR}/linux.tar.bz2" - -# Extracting linux.tar.bz2 creates directories -# /vibrante-oss-src/kernel -S = "${WORKDIR}/vibrante-oss-src/kernel" diff --git a/meta-vib3-extras/recipes/linux/linux-nvidia/0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch b/meta-vib3-extras/recipes/linux/linux-nvidia/0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch new file mode 100644 index 0000000..b495d39 --- /dev/null +++ b/meta-vib3-extras/recipes/linux/linux-nvidia/0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch @@ -0,0 +1,124 @@ +From 57254b6ebce4ceca02d9c8b615f6059c56c19238 Mon Sep 17 00:00:00 2001 +From: Jan Schmidt +Date: Mon, 6 May 2013 19:14:17 +0000 +Subject: [PATCH] Btrfs: add ioctl to wait for qgroup rescan completion + +btrfs_qgroup_wait_for_completion waits until the currently running qgroup +operation completes. It returns immediately when no rescan process is in +progress. This is useful to automate things around the rescan process (e.g. +testing). + +Signed-off-by: Jan Schmidt +Signed-off-by: Josef Bacik +--- + fs/btrfs/ctree.h | 2 ++ + fs/btrfs/ioctl.c | 12 ++++++++++++ + fs/btrfs/qgroup.c | 21 +++++++++++++++++++++ + include/uapi/linux/btrfs.h | 1 + + 4 files changed, 36 insertions(+) + +diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h +index a365400..e36e97b 100644 +--- a/fs/btrfs/ctree.h ++++ b/fs/btrfs/ctree.h +@@ -1613,6 +1613,7 @@ struct btrfs_fs_info { + struct mutex qgroup_rescan_lock; /* protects the progress item */ + struct btrfs_key qgroup_rescan_progress; + struct btrfs_workers qgroup_rescan_workers; ++ struct completion qgroup_rescan_completion; + + /* filesystem state */ + unsigned long fs_state; +@@ -3820,6 +3821,7 @@ int btrfs_quota_enable(struct btrfs_trans_handle *trans, + int btrfs_quota_disable(struct btrfs_trans_handle *trans, + struct btrfs_fs_info *fs_info); + int btrfs_qgroup_rescan(struct btrfs_fs_info *fs_info); ++int btrfs_qgroup_wait_for_completion(struct btrfs_fs_info *fs_info); + int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans, + struct btrfs_fs_info *fs_info, u64 src, u64 dst); + int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans, +diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c +index 0f81d67..1e0dda1 100644 +--- a/fs/btrfs/ioctl.c ++++ b/fs/btrfs/ioctl.c +@@ -3937,6 +3937,16 @@ static long btrfs_ioctl_quota_rescan_status(struct file *file, void __user *arg) + return ret; + } + ++static long btrfs_ioctl_quota_rescan_wait(struct file *file, void __user *arg) ++{ ++ struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; ++ ++ if (!capable(CAP_SYS_ADMIN)) ++ return -EPERM; ++ ++ return btrfs_qgroup_wait_for_completion(root->fs_info); ++} ++ + static long btrfs_ioctl_set_received_subvol(struct file *file, + void __user *arg) + { +@@ -4179,6 +4189,8 @@ long btrfs_ioctl(struct file *file, unsigned int + return btrfs_ioctl_quota_rescan(file, argp); + case BTRFS_IOC_QUOTA_RESCAN_STATUS: + return btrfs_ioctl_quota_rescan_status(file, argp); ++ case BTRFS_IOC_QUOTA_RESCAN_WAIT: ++ return btrfs_ioctl_quota_rescan_wait(file, argp); + case BTRFS_IOC_DEV_REPLACE: + return btrfs_ioctl_dev_replace(root, argp); + case BTRFS_IOC_GET_FSLABEL: +diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c +index 7f38cce..d059d86 100644 +--- a/fs/btrfs/qgroup.c ++++ b/fs/btrfs/qgroup.c +@@ -2070,6 +2070,8 @@ out: + } else { + pr_err("btrfs: qgroup scan failed with %d\n", err); + } ++ ++ complete_all(&fs_info->qgroup_rescan_completion); + } + + static void +@@ -2110,6 +2112,7 @@ btrfs_qgroup_rescan(struct btrfs_fs_info *fs_info) + fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_RESCAN; + memset(&fs_info->qgroup_rescan_progress, 0, + sizeof(fs_info->qgroup_rescan_progress)); ++ init_completion(&fs_info->qgroup_rescan_completion); + + /* clear all current qgroup tracking information */ + for (n = rb_first(&fs_info->qgroup_tree); n; n = rb_next(n)) { +@@ -2126,3 +2129,21 @@ btrfs_qgroup_rescan(struct btrfs_fs_info *fs_info) + + return 0; + } ++ ++int btrfs_qgroup_wait_for_completion(struct btrfs_fs_info *fs_info) ++{ ++ int running; ++ int ret = 0; ++ ++ mutex_lock(&fs_info->qgroup_rescan_lock); ++ spin_lock(&fs_info->qgroup_lock); ++ running = fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_RESCAN; ++ spin_unlock(&fs_info->qgroup_lock); ++ mutex_unlock(&fs_info->qgroup_rescan_lock); ++ ++ if (running) ++ ret = wait_for_completion_interruptible( ++ &fs_info->qgroup_rescan_completion); ++ ++ return ret; ++} +diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h +index 5ef0df5..5b683b5 100644 +--- a/include/uapi/linux/btrfs.h ++++ b/include/uapi/linux/btrfs.h +@@ -530,6 +530,7 @@ struct btrfs_ioctl_send_args { + struct btrfs_ioctl_quota_rescan_args) + #define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ + struct btrfs_ioctl_quota_rescan_args) ++#define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) + #define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \ + char[BTRFS_LABEL_SIZE]) + #define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \ diff --git a/meta-vib3-extras/recipes/linux/linux-nvidia_3.10.bbappend b/meta-vib3-extras/recipes/linux/linux-nvidia_3.10.bbappend index e59898d..ee2d5ba 100644 --- a/meta-vib3-extras/recipes/linux/linux-nvidia_3.10.bbappend +++ b/meta-vib3-extras/recipes/linux/linux-nvidia_3.10.bbappend @@ -37,8 +37,14 @@ SRC_URI += "\ file://0001-Change-extern-inline-to-static-inline.patch \ file://Fix_compile_error_in_tegra_drivers.patch \ file://Fix_compiler_error_in_tegra12_lock.patch \ + file://0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch \ " +do_unpack_append() { + rm -rf ${STAGING_KERNEL_DIR} + ln -s ${S} ${STAGING_KERNEL_DIR} +} + do_compile_prepend () { # Cross compiling exports export ARCH=${TARGET_ARCH} diff --git a/meta-vib4-extras/recipes/glibc/glibc_2.22.bbappend b/meta-vib4-extras/recipes/glibc/glibc_2.22.bbappend deleted file mode 100644 index d7353bc..0000000 --- a/meta-vib4-extras/recipes/glibc/glibc_2.22.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -# Append --enable-kernel flag to configure flags -# only for target build case. -# We are setting this to kernel 3.18 to keep glibc -# compatbile across all 3.18 series -# We will not support < 3.18 for V4L: -EXTRA_OECONF_append_class-target = " \ - --enable-kernel=3.18 \ -" - -# Search $PWD/eglibc-2.18 for additional patches -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" - -# Placeholder for patches -SRC_URI_append_class-target = " \ -" diff --git a/meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend b/meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend new file mode 100644 index 0000000..f2bdba1 --- /dev/null +++ b/meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend @@ -0,0 +1,7 @@ +# Use our kernel instead of yocto which defaults to mainline 3.18 +SRC_URI = "file://${KERN_DIR}/linux.tar.bz2" +PV = "3.18" + +# Extracting linux.tar.bz2 creates directories +# /vibrante-oss-src/kernel +S = "${WORKDIR}/vibrante-oss-src/kernel" diff --git a/meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend b/meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend deleted file mode 100644 index f2bdba1..0000000 --- a/meta-vib4-extras/recipes/linux-libc-headers/linux-libc-headers_4.1.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -# Use our kernel instead of yocto which defaults to mainline 3.18 -SRC_URI = "file://${KERN_DIR}/linux.tar.bz2" -PV = "3.18" - -# Extracting linux.tar.bz2 creates directories -# /vibrante-oss-src/kernel -S = "${WORKDIR}/vibrante-oss-src/kernel" diff --git a/meta-vib4-extras/recipes/linux/linux-nvidia.bbappend b/meta-vib4-extras/recipes/linux/linux-nvidia.bbappend index 07c9646..70ee515 100644 --- a/meta-vib4-extras/recipes/linux/linux-nvidia.bbappend +++ b/meta-vib4-extras/recipes/linux/linux-nvidia.bbappend @@ -1,4 +1,3 @@ - ############################################################################ ## ## Copyright (C) 2016 The Qt Company Ltd. @@ -28,6 +27,11 @@ ## ############################################################################ +do_unpack_append() { + rm -rf ${STAGING_KERNEL_DIR} + ln -s ${S} ${STAGING_KERNEL_DIR} +} + do_kernel_defconfig_prepend () { } diff --git a/meta-vib4-extras/recipes/weston/weston-nv.bbappend b/meta-vib4-extras/recipes/weston/weston-nv.bbappend new file mode 100644 index 0000000..31b1ad1 --- /dev/null +++ b/meta-vib4-extras/recipes/weston/weston-nv.bbappend @@ -0,0 +1,32 @@ +############################################################################ +## +## Copyright (C) 2016 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$ +## +############################################################################ + +do_install_prepend() { + mv ${WORKDIR}/prebuilt/* ${WORKDIR}/ +} -- cgit v1.2.3-54-g00ecf