From patchwork Wed Sep 23 14:39:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9747 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 E3AD1C3B5B for ; Wed, 23 Sep 2020 14:39:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D770A62FF1; Wed, 23 Sep 2020 16:39:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PL+bVkxZ"; dkim-atps=neutral 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 2B1D862FD2 for ; Wed, 23 Sep 2020 16:39:54 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8CD829CE; Wed, 23 Sep 2020 16:39:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600871993; bh=qdURQ3/etuWnHOD/Wrc3H1jXqClO9iZzUAXr5L34HXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PL+bVkxZxUXYQ4/TqrfH/rqGwxeu3NJQ8/zb74U5lkt+MaUwjcy7/4hb3iPtfWPwo lTbJMZroHsw4VfGat+MHyUGf8UVvYuVWWm+AN9kJSyoRautVvysa5x9QYzM82BXQex vkQwnIOBJZ78xKGhkomE/iC9v6sGnHRwcfWt6sV8= From: Kieran Bingham To: libcamera devel Date: Wed, 23 Sep 2020 15:39:46 +0100 Message-Id: <20200923143949.310439-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> References: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/4] meson: Process utils first 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The utils directory can contain helpers and support tools which are used throughout other components of the build. Ensure that the utils subdir is parsed first allowing helpers to be defined there. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c58d458ca0ff..dd71390baba5 100644 --- a/meson.build +++ b/meson.build @@ -101,9 +101,11 @@ add_project_link_arguments(cpp_arguments, language : 'cpp') libcamera_includes = include_directories('include') +# Utilities are parsed first to provide support for other components. +subdir('utils') + subdir('include') subdir('src') -subdir('utils') # The documentation and test components are optional and can be disabled # through configuration values. They are enabled by default. From patchwork Wed Sep 23 14:39:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9748 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 ADDE8C3B5B for ; Wed, 23 Sep 2020 14:39:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 937BB62FF4; Wed, 23 Sep 2020 16:39:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nT7/Zp93"; dkim-atps=neutral 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 6DEAF62FD2 for ; Wed, 23 Sep 2020 16:39:54 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EFE09DC4; Wed, 23 Sep 2020 16:39:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600871994; bh=dp88X4/2/GQrVVeTh3R9eymqq3w75Wgl0oxDnkvaSgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nT7/Zp93a0O2epKTTRYZmEWpsXzK/hZnfR6cy9GQGhCQwGNfWtbeHKC/fDTAsjBd7 yqBbzAQjRqLlcW0+1jE2MA5eOGTtvRgdepbMV1BN/Ubxy9TNvoBma9PDFQWS3ZZhhV K7pyFU5sEPwliU2Q7DyIoFsHC7t7HIacinTtbqDg= From: Kieran Bingham To: libcamera devel Date: Wed, 23 Sep 2020 15:39:47 +0100 Message-Id: <20200923143949.310439-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> References: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/4] libcamera: Move Header generation utilities to utils 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Move the GPL2 utilities which handle generation of controls, formats and the top level libcamera header to the utils subtree. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- include/libcamera/meson.build | 6 ------ src/libcamera/meson.build | 2 -- {src/libcamera => utils}/gen-controls.py | 0 {include/libcamera => utils}/gen-formats.py | 0 {include/libcamera => utils}/gen-header.sh | 0 utils/meson.build | 5 +++++ 6 files changed, 5 insertions(+), 8 deletions(-) rename {src/libcamera => utils}/gen-controls.py (100%) rename {include/libcamera => utils}/gen-formats.py (100%) rename {include/libcamera => utils}/gen-header.sh (100%) diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index cdb8e0372e77..692931a5a639 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -34,8 +34,6 @@ install_headers(libcamera_public_headers, # # control_ids.h and property_ids.h -gen_controls = files('../../src/libcamera/gen-controls.py') - control_source_files = [ 'control_ids', 'property_ids', @@ -57,8 +55,6 @@ endforeach libcamera_public_headers += control_headers # formats.h -gen_formats = files('gen-formats.py') - formats_h = custom_target('formats_h', input : files( '../../src/libcamera/formats.yaml', @@ -72,8 +68,6 @@ formats_h = custom_target('formats_h', libcamera_public_headers += formats_h # libcamera.h -gen_header = files('gen-header.sh') - libcamera_h = custom_target('gen-header', input : 'meson.build', output : 'libcamera.h', diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 0e6ecf5060a4..d63dacd55cc7 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -77,8 +77,6 @@ if libudev.found() ]) endif -gen_controls = files('gen-controls.py') - control_sources = [] foreach source : control_source_files diff --git a/src/libcamera/gen-controls.py b/utils/gen-controls.py similarity index 100% rename from src/libcamera/gen-controls.py rename to utils/gen-controls.py diff --git a/include/libcamera/gen-formats.py b/utils/gen-formats.py similarity index 100% rename from include/libcamera/gen-formats.py rename to utils/gen-formats.py diff --git a/include/libcamera/gen-header.sh b/utils/gen-header.sh similarity index 100% rename from include/libcamera/gen-header.sh rename to utils/gen-header.sh diff --git a/utils/meson.build b/utils/meson.build index c3cd9d69f887..ef5507b1c5ca 100644 --- a/utils/meson.build +++ b/utils/meson.build @@ -1,3 +1,8 @@ # SPDX-License-Identifier: CC0-1.0 subdir('ipu3') + +## Code generation +gen_controls = files('gen-controls.py') +gen_formats = files('gen-formats.py') +gen_header = files('gen-header.sh') From patchwork Wed Sep 23 14:39:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9749 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 6E4F9C3B5B for ; Wed, 23 Sep 2020 14:39:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3FCCB62FE8; Wed, 23 Sep 2020 16:39:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JKROxbS3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B449462FD2 for ; Wed, 23 Sep 2020 16:39:54 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 550361226; Wed, 23 Sep 2020 16:39:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600871994; bh=iaSn0JTQEPGQJT6H8/8ycnRAvBQ4KHNISSigJ5cQyUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JKROxbS3ssj+37VPGMCcfCBlgctf8twsow3dE+uXgGjjRHt1owT3xI1byhSIv3qtE XrFCwRgNCIifpZ2xNe3nYWeY1lzUKN5wxyvVIhtzpbrpGRmpIq15RBp+S4RvjuChba vCiF/+E9mUtaX0aHBm7f7Si/G95gj0IBvNL9JaSw= From: Kieran Bingham To: libcamera devel Date: Wed, 23 Sep 2020 15:39:48 +0100 Message-Id: <20200923143949.310439-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> References: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/4] src: meson: Rename ipa_gen_priv_key to gen_ipa_priv_key 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Refactor the naming of the custom command variable to match the style used in the other custom target generators, and the name of the script. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- I've chosen to keep this as a separate patch to keep the rename and move distinct. --- src/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index 0c5b64d68c15..db155e68e848 100644 --- a/src/meson.build +++ b/src/meson.build @@ -4,10 +4,10 @@ subdir('android') openssl = find_program('openssl', required : true) if openssl.found() - ipa_gen_priv_key = files('ipa/gen-ipa-priv-key.sh') + gen_ipa_priv_key = files('ipa/gen-ipa-priv-key.sh') ipa_priv_key = custom_target('ipa-priv-key', output : [ 'ipa-priv-key.pem' ], - command : [ ipa_gen_priv_key, '@OUTPUT@' ]) + command : [ gen_ipa_priv_key, '@OUTPUT@' ]) config_h.set('HAVE_IPA_PUBKEY', 1) ipa_sign_module = true else From patchwork Wed Sep 23 14:39:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 9750 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 D5F38C3B5B for ; Wed, 23 Sep 2020 14:39:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A1B6360576; Wed, 23 Sep 2020 16:39:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="D3ybd8ea"; dkim-atps=neutral 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 1907962FD2 for ; Wed, 23 Sep 2020 16:39:55 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A124C1243; Wed, 23 Sep 2020 16:39:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600871994; bh=2qopBN6t9zjfnRYk78W8H/eApeiVo7i3/d03ZRJhrcM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3ybd8eaDA56JBla9/ywCdVNnuySb8EkPpg0ysau5cT7lg895sOuoWRHJKV+/f88O psm087iXkRs10jVLTXCVjBrh7R/GdAjZcntaWTNRJKGfGRjOUIoT8rQ/ZB+ofuvX1O bQxRs+FP8jhyb5bdKX4p9RyCvYt6Xx318uL8RNFU= From: Kieran Bingham To: libcamera devel Date: Wed, 23 Sep 2020 15:39:49 +0100 Message-Id: <20200923143949.310439-5-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> References: <20200923143949.310439-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 4/4] libcamera: ipa: Move key generation to utils 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Move the GPLv2 utilities used for generating public and private keys to the utilities subtree. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- The ipa-sign and installation scripts are more complex to move and can be handled separately if this series is deemed worthwhile. --- src/libcamera/meson.build | 1 - src/meson.build | 1 - {src/ipa => utils}/gen-ipa-priv-key.sh | 0 {src/libcamera => utils}/gen-ipa-pub-key.py | 0 utils/meson.build | 4 ++++ 5 files changed, 4 insertions(+), 2 deletions(-) rename {src/ipa => utils}/gen-ipa-priv-key.sh (100%) rename {src/libcamera => utils}/gen-ipa-pub-key.py (100%) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index d63dacd55cc7..18ea3261bc15 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -100,7 +100,6 @@ version_cpp = vcs_tag(command : [gen_version, meson.build_root()], libcamera_sources += version_cpp if ipa_sign_module - gen_ipa_pub_key = files('gen-ipa-pub-key.py') ipa_pub_key_cpp = custom_target('ipa_pub_key_cpp', input : [ ipa_priv_key, 'ipa_pub_key.cpp.in' ], output : 'ipa_pub_key.cpp', diff --git a/src/meson.build b/src/meson.build index db155e68e848..b9c7e7599d61 100644 --- a/src/meson.build +++ b/src/meson.build @@ -4,7 +4,6 @@ subdir('android') openssl = find_program('openssl', required : true) if openssl.found() - gen_ipa_priv_key = files('ipa/gen-ipa-priv-key.sh') ipa_priv_key = custom_target('ipa-priv-key', output : [ 'ipa-priv-key.pem' ], command : [ gen_ipa_priv_key, '@OUTPUT@' ]) diff --git a/src/ipa/gen-ipa-priv-key.sh b/utils/gen-ipa-priv-key.sh similarity index 100% rename from src/ipa/gen-ipa-priv-key.sh rename to utils/gen-ipa-priv-key.sh diff --git a/src/libcamera/gen-ipa-pub-key.py b/utils/gen-ipa-pub-key.py similarity index 100% rename from src/libcamera/gen-ipa-pub-key.py rename to utils/gen-ipa-pub-key.py diff --git a/utils/meson.build b/utils/meson.build index ef5507b1c5ca..456bf7f89f82 100644 --- a/utils/meson.build +++ b/utils/meson.build @@ -6,3 +6,7 @@ subdir('ipu3') gen_controls = files('gen-controls.py') gen_formats = files('gen-formats.py') gen_header = files('gen-header.sh') + +## Module signing +gen_ipa_priv_key = files('gen-ipa-priv-key.sh') +gen_ipa_pub_key = files('gen-ipa-pub-key.py')