From patchwork Wed Feb 5 13:04:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 2770 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 D52FE60443 for ; Wed, 5 Feb 2020 14:04:25 +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 4C8FD4F8; Wed, 5 Feb 2020 14:04:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1580907865; bh=+YPHbWoiho0nRKZlB5XZxWVP0eznsz/iogxGZhdaCmg=; h=From:To:Cc:Subject:Date:From; b=T4JNvAzLvdlL7AFIVbThqa6nlqkqWFBs0utp6Px33OaN5g6k8aAiiJll/VAlR5t0c dq7pbm4sLo2smm2Uem9CqGLvlhwRqXunsubdLNwDq4VqrITuIZvIDm1J9OYoUtVh5v hvG+G/7Idc/xr0zn7+pZiC+OJfPOFXCEaiDwYlrc= From: Kieran Bingham To: LibCamera Devel Date: Wed, 5 Feb 2020 13:04:15 +0000 Message-Id: <20200205130420.8736-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] 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: Wed, 05 Feb 2020 13:04:26 -0000 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 the build path to the library through a temporary storage in the runpath of the ELF library strings table. This entry is stripped at install time, but allows us to identify the location of the recently compiled IPA modules without the user having to manually declare paths to the build system. 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 (5): libcamera: utils: Provide helper to get dynamic library runpath libcamera: ipa_manager: Split path handling libcamera: ipa_manager: Allow recursive parsing libcamera: ipa_manager: Search the runpath for IPA libraries 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 | 111 ++++++++++++++++++++++------ src/libcamera/meson.build | 1 + src/libcamera/utils.cpp | 26 +++++++ src/meson.build | 7 ++ test/libtest/test.cpp | 4 - 7 files changed, 126 insertions(+), 29 deletions(-)