From 80402502806c94d2954852549d6549c9e333c586 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 3 Oct 2016 16:57:08 +0300 Subject: renesas: 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: I52492cff70228bee477b1e5b287af66138564dd1 Reviewed-by: Tuomas Heimonen --- .../linux-libc-headers_%.bbappend | 6 + ...octl-to-wait-for-qgroup-rescan-completion.patch | 124 +++++++++++++++++++++ .../recipes/linux/linux-renesas_3.10%.bbappend | 8 +- .../recipes/qt5/qt3d/0001-Remove-qgltf.patch | 25 +++++ meta-renesas-extras/recipes/qt5/qt3d_git.bbappend | 34 ++++++ 5 files changed, 193 insertions(+), 4 deletions(-) create mode 100644 meta-renesas-extras/recipes/linux/linux-renesas/0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch create mode 100644 meta-renesas-extras/recipes/qt5/qt3d/0001-Remove-qgltf.patch create mode 100644 meta-renesas-extras/recipes/qt5/qt3d_git.bbappend (limited to 'meta-renesas-extras') diff --git a/meta-renesas-extras/recipes/linux-libc-headers/linux-libc-headers_%.bbappend b/meta-renesas-extras/recipes/linux-libc-headers/linux-libc-headers_%.bbappend index b421e1d..2aec751 100644 --- a/meta-renesas-extras/recipes/linux-libc-headers/linux-libc-headers_%.bbappend +++ b/meta-renesas-extras/recipes/linux-libc-headers/linux-libc-headers_%.bbappend @@ -28,3 +28,9 @@ ############################################################################ COMPATIBLE_MACHINE = "" + +FILESEXTRAPATHS_prepend := "${THISDIR}/../linux/linux-renesas:" + +SRC_URI += " \ + file://0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch \ + " diff --git a/meta-renesas-extras/recipes/linux/linux-renesas/0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch b/meta-renesas-extras/recipes/linux/linux-renesas/0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch new file mode 100644 index 0000000..b495d39 --- /dev/null +++ b/meta-renesas-extras/recipes/linux/linux-renesas/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-renesas-extras/recipes/linux/linux-renesas_3.10%.bbappend b/meta-renesas-extras/recipes/linux/linux-renesas_3.10%.bbappend index d5e05f0..0309846 100644 --- a/meta-renesas-extras/recipes/linux/linux-renesas_3.10%.bbappend +++ b/meta-renesas-extras/recipes/linux/linux-renesas_3.10%.bbappend @@ -29,7 +29,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " \ -file://b2qt.cfg \ -" - +SRC_URI += " \ + file://b2qt.cfg \ + file://0001-Btrfs-add-ioctl-to-wait-for-qgroup-rescan-completion.patch \ + " diff --git a/meta-renesas-extras/recipes/qt5/qt3d/0001-Remove-qgltf.patch b/meta-renesas-extras/recipes/qt5/qt3d/0001-Remove-qgltf.patch new file mode 100644 index 0000000..48a4085 --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/qt3d/0001-Remove-qgltf.patch @@ -0,0 +1,25 @@ +From 49a04f4faa135fa6ef56fc35dfb9dfe55ff2a3c4 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Wed, 18 Nov 2015 10:14:18 +0200 +Subject: [PATCH] Remove qgltf + +assimp does not compile for ARM because of GCC bug +(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66964) + +Task-number: QTBUG-49153 +--- + tools/tools.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/tools.pro b/tools/tools.pro +index 055f412..c1eba7f 100644 +--- a/tools/tools.pro ++++ b/tools/tools.pro +@@ -1,3 +1,3 @@ + TEMPLATE = subdirs +-SUBDIRS = qgltf ++#SUBDIRS = qgltf + qgltf.CONFIG += host_build +-- +1.9.1 + diff --git a/meta-renesas-extras/recipes/qt5/qt3d_git.bbappend b/meta-renesas-extras/recipes/qt5/qt3d_git.bbappend new file mode 100644 index 0000000..d32d0e6 --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/qt3d_git.bbappend @@ -0,0 +1,34 @@ +############################################################################ +## +## 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$ +## +############################################################################ + +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" + +SRC_URI_append_class-target = " \ + file://0001-Remove-qgltf.patch \ + " -- cgit v1.2.3-54-g00ecf