From patchwork Thu Feb 20 16:56:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 2859 Return-Path: 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 CAD9261F48 for ; Thu, 20 Feb 2020 17:57:07 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3032B563; Thu, 20 Feb 2020 17:57:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1582217827; bh=UJETUvHgK+hdm2o/oJJaSqLtTz/YCBfyDeiql5apXW0=; h=From:To:Cc:Subject:Date:From; b=cA6BqgmcFWyYGzWNUN/cxRIYPlS+NkALxXr34kSwJGP/kQvzypEUVrr3dRSrVfx05 jcAphChxNnggywJEs1u4GM3D7agSpNsi0BpfLyUjwc9NQ3tSb4zpI3xczOPEsIBdRf DlmJfJsHpHGZCFmU+QrHhaKuN6gxCXR+EBRuPTV4= From: Kieran Bingham To: libcamera devel Date: Thu, 20 Feb 2020 16:56:58 +0000 Message-Id: <20200220165704.23600-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/6] Support loading IPAs from the build tree 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-List-Received-Date: Thu, 20 Feb 2020 16:57:08 -0000 This series has been a real pain (more than it should have been). This is posted as v3, even though I didn't post v2, as it's the third complete rewrite of the implementation, where v2 was abandoned before posting. When developing and testing libcamera, the usual development model is to compile and run one of the test or utility applications. IPA modules are loaded by the IPAManager, from a system path, or by parsing an environment variable. Provide a means for the library to detect if it has been installed or not, and if not - generate a relative path from the libcamera.so to locate IPAs to parse and load before searching the system paths. Specifying a LIBCAMERA_IPA_MODULE_PATH will take precedence over both the system path and the build path. Previously to this series the IPA tests would only be able to be run from the root of the build tree, due to the hardcoded path relative to that point. Now that the IPAs can be found from their build location, we no longer need to provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH for tests, and as a further consequence they can be run directly without requiring the launch to be run from the top level of the build tree. Kieran Bingham (6): libcamera: utils: Add an internal dirname helper libcamera: ipa_manager: Split path handling libcamera: ipa_manager: Allow recursive parsing libcamera: ipa_manager: Re-arrange IPA precedence libcamera: ipa_manager: Search for IPA libraries in build tree tests: Remove IPA_MODULE_PATH environment variable src/libcamera/include/ipa_manager.h | 5 +- src/libcamera/include/utils.h | 1 + src/libcamera/ipa_manager.cpp | 160 +++++++++++++++++++++++----- src/libcamera/meson.build | 6 ++ src/libcamera/utils.cpp | 17 +++ test/libtest/test.cpp | 4 - 6 files changed, 159 insertions(+), 34 deletions(-)