From patchwork Thu May 4 14:48:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18602 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6EA08C327C for ; Thu, 4 May 2023 14:48:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5A855633B5; Thu, 4 May 2023 16:48:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1683211689; bh=l7vYOSDfk2w3/NkfqAVHXW3cFN465DX/rZaoY2+qhew=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=VueOaUDlI60zpUZQ1x/pokdec4b7/XseoMegX58lmJMw/Tg3sw4aKdXGPBfr0EC6h 1GIa15FvXUMxVEO5IUQfQUzaWhuQwcqARbkOC4hvigWXHdmtsXK6BdwDixEoxrVCbQ pGt4tNJqwi3J181nQoduY3VdCixDexf7CRQQk1nIRPoc1joOl9x+IOUw9+4Co5b468 vAX4BxU+w8vvGnAKUxyvi6+TMbsSUEy/FG8REeE6CukaDQXJQonIYg4md+m77oYu9p 0H3s32cuygVvLN1e8kt3l/PeNYMucNlL+rWj3AI8c/Rv64yeGcKDpKGFgxTlw1LWZK CdmgeM8sG43gQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5AFDB627DE for ; Thu, 4 May 2023 16:48:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YevsyqP4"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C0EF27CE; Thu, 4 May 2023 16:48:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1683211683; bh=l7vYOSDfk2w3/NkfqAVHXW3cFN465DX/rZaoY2+qhew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YevsyqP4yefnFaDVsx7zme37BT6UuNJF41DnTKV7DAVxnBB6lYrF0NgFTblm688LD 0jOJdobGdLNnCJxMpyV1F2OQJiw5C1+PwLROdLtlkXdG9qQLFuu9560s3Lx7OJF6mw Ek9g0sKIG0JGhcLvrKFb/NSMyJv3Q3qcdBOx+K7g= To: libcamera devel Date: Thu, 4 May 2023 15:48:00 +0100 Message-Id: <20230504144801.2590668-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230504144801.2590668-1-kieran.bingham@ideasonboard.com> References: <20230504144801.2590668-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/2] libcamera: ipa_manager: Only parse IPA modules X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Ensure that when we iterate the libcamera libdir we only select shared objects which are expected to be IPA modules, with an ipa_ prefix. Any shared object not matching this filter is ignored and not processed by the IPA Manager. Reviewed-by: Javier Martinez Canillas Signed-off-by: Kieran Bingham --- src/libcamera/ipa_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp index 030ef43fb994..c0c2f027e902 100644 --- a/src/libcamera/ipa_manager.cpp +++ b/src/libcamera/ipa_manager.cpp @@ -206,6 +206,10 @@ void IPAManager::parseDir(const char *libDir, unsigned int maxDepth, if (strcmp(&ent->d_name[offset], ".so")) continue; + /* Ignore any modules which are not IPAs. */ + if (strncmp(ent->d_name, "ipa_", 4) != 0) + continue; + files.push_back(std::string(libDir) + "/" + ent->d_name); } From patchwork Thu May 4 14:48:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18603 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C6621C0DA4 for ; Thu, 4 May 2023 14:48:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 16F6E633BB; Thu, 4 May 2023 16:48:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1683211691; bh=V9oQ2RNbwux0oSPiNo7eDpDwcjGtG8xComNBhdK2UsQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=3RQU9T4eROWd0oJFu1pJSkntku1fnnTgU2qow1J7Z2x+AKzGYwsVy5riTOxnSDoYx uwHX55i6GwqFcjer4x3Gejx4TplasxhENBe+vdc7j7I401Vt1nLGw7QAcWF2hQB3EU E54VZ0AN4lJK8eoXp9bWF42l4T4WuMwrciQ9XaaepujmjkvhyR6sARnRpLX8qn6Lox zYDJXCbtsG8phcbDhPdGcBj/PoLlrC5TJbyNyt74czNDx4cuUb0imh3drOT2PhhB3d 0oxIU4EcsMKxc2y441vt7rKIK13/MFcvhwJuxBGm14IoSkVj+McfgYkUDM2IqyPnvR MD0VhFuf34Afw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8F34161EAE for ; Thu, 4 May 2023 16:48:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MuDy1P4q"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1BF6DDC9; Thu, 4 May 2023 16:48:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1683211684; bh=V9oQ2RNbwux0oSPiNo7eDpDwcjGtG8xComNBhdK2UsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MuDy1P4q+Hd26AF7yNED3UUTo1ecLB2X1p/fMerOw4mNxP3G3nXg+koExYOdDxxbL /ylRJ2eK8VlJHLHogtveZOqFc587sW9pQQGU8QKFgvFkeQU7KE5h4YVRwdHD6Xla32 GnxHBoTuBF5wwSzO21HY7Y/NlNfW4v/PkE3asaNU= To: libcamera devel Date: Thu, 4 May 2023 15:48:01 +0100 Message-Id: <20230504144801.2590668-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230504144801.2590668-1-kieran.bingham@ideasonboard.com> References: <20230504144801.2590668-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/2] v4l2: Move the v4l2 compat layer to libexec/libcamera X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Move the v4l2-compat.so shared library installation to the libcamera directory under libexec. This is the same location that the proxy workers live and will facilitate easier packaging of the V4L2 compatibiltiy layer with distributions. Create a new libcamera_libexecdir variable within meson to simplify representation of this path and update the proxy worker meson.build infrastructure to make use of it as well. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Javier Martinez Canillas --- src/libcamera/proxy/worker/meson.build | 2 +- src/meson.build | 1 + src/v4l2/meson.build | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcamera/proxy/worker/meson.build b/src/libcamera/proxy/worker/meson.build index 70c8760a3d42..aa4d9cd7b5d8 100644 --- a/src/libcamera/proxy/worker/meson.build +++ b/src/libcamera/proxy/worker/meson.build @@ -1,6 +1,6 @@ # SPDX-License-Identifier: CC0-1.0 -proxy_install_dir = get_option('libexecdir') / 'libcamera' +proxy_install_dir = libcamera_libexecdir # generate {pipeline}_ipa_proxy_worker.cpp foreach mojom : ipa_mojoms diff --git a/src/meson.build b/src/meson.build index a3821fb90a0f..165a77bb9d53 100644 --- a/src/meson.build +++ b/src/meson.build @@ -3,6 +3,7 @@ # Cache system paths libcamera_datadir = get_option('datadir') / 'libcamera' libcamera_libdir = get_option('libdir') / 'libcamera' +libcamera_libexecdir = get_option('libexecdir') / 'libcamera' libcamera_sysconfdir = get_option('sysconfdir') / 'libcamera' config_h.set('LIBCAMERA_DATA_DIR', '"' + get_option('prefix') / libcamera_datadir + '"') diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build index f132103cb503..ab4b35dd0e6b 100644 --- a/src/v4l2/meson.build +++ b/src/v4l2/meson.build @@ -31,6 +31,7 @@ v4l2_compat = shared_library('v4l2-compat', v4l2_compat_sources, name_prefix : '', install : true, + install_dir : libcamera_libexecdir, dependencies : [libcamera_private, libdl], cpp_args : v4l2_compat_cpp_args) @@ -38,7 +39,7 @@ v4l2_compat = shared_library('v4l2-compat', # adaptation layer. cdata = configuration_data() -cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / get_option('libdir') / 'v4l2-compat.so') +cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / libcamera_libexecdir / 'v4l2-compat.so') configure_file(input : 'libcamerify.in', output : 'libcamerify',