From patchwork Wed May 3 12:20:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18588 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 8E1B6C0DA4 for ; Wed, 3 May 2023 12:20:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D6703633C1; Wed, 3 May 2023 14:20:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1683116441; bh=OQkgtB49bpC6kjk1eXz96Ne0yWH0cZ1scVF85P9/Cr8=; 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=QstfLeJ3ykl1tds9uO0B+enUzyhxnFxojd/GPNmOJLDS4sWMkJ2153va9CjhPF+q5 apwrfJ9pxpsG1xGvAOAmpkko8531QgUAixulztM1cBnUoUVaO3FO5Bo4YF4REpEsT2 RuXnUbIlzPXA8n3aoxS4hNHCCydA0b/JKWbJAQ/UcM6z3Nr0feCSvtNpJwVQwmnX+U lfzOOjuLkwwMBESMh5pmjqoYwi+2rRF3GfB1Nkt+QvtC1+9wb2vxaWwm1xUpIBAqhD oiHFHpdJ5SjPpOAQ3GzB4NwHzJ9BdLrODK/jdpq2Km4P9PjhTONIDWlnjrmpPqz1vR lwISuDFvPjcdg== Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B0FD0627DE for ; Wed, 3 May 2023 14:20:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Z6j5h2uu"; dkim-atps=neutral Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f315712406so21887755e9.0 for ; Wed, 03 May 2023 05:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1683116439; x=1685708439; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TOZtiZNotGvI/TxVa/2UVHk+I4BBJa641a7L6mP14W4=; b=Z6j5h2uuAiljXv2I8LMRQe5xn7ldYDpFSjeuEZkBa4KVTtx14PhXYKJgG7ql2euXmK ulc/cQI20CcYKaSmFGwFoUEJfEPWiD2OJQoPa1gHz6jqHGkwAiTjtDluEivx+n0pQYoX sO7yoqlYdAcDP4wI1UgRradhvOShF1xORYgI4ksCcXHY3IG3pkH1gJTNyZYqCBTin5at xj9TnTXhpUpe3lcuQrjgna9zQ57eeCBTDlr/W0PtcevN1sUtdtQin5JbS6TOD8GKN2fF z30hYW8GM0ZFeD82LaNGNA9dUE+MTLXqULAqTSqKPwbkI5tNi8BUshn5iuuDBh4kHxwi bYfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683116439; x=1685708439; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TOZtiZNotGvI/TxVa/2UVHk+I4BBJa641a7L6mP14W4=; b=jYBy+nQzHmKe9aDQ/w+ggy/PszCt2ay7K8hOgYRKgtZ7Im60gVUHNIjcJI1gbnwLz9 FNfi94JgCc39AGBR2tddKShzZiIB/rctYyB00wpLOEpncJaaz3v6m8KsXU3cJXfodG8/ aqr+uSX3zljPi3zXaYIqa/e74RgH/r0rQA6fdvxJUHJEuAPiMjnlVIukK9B4dC9k0mGO 0F9h+tkPr13DA4PvqzhL6f6fJNEF0rHgVe4IHY4U5fWH4m42btQFVUq4hH7sp9P5Z/sK g0cY/w5qNxJ+gK/ViP9cbSUW/JrxvONvyHccrM99kZarMVK8uxIbjIkV/BYsAYolSgCw AU5A== X-Gm-Message-State: AC+VfDzk+eMKc8AhB0vD3BsyCI7SWdULJVz6OUhROFk4nRKRmGAC589F qYzv9cGNUv+lfDQlbGAqImzhj2x0nR4PsOBjawhN4g== X-Google-Smtp-Source: ACHHUZ6Bu8JzsfClOfy67XL2ZFiAcyhBPS2IJrPIhpGYBq+ApbDwFTA7AzhXwK+H5jDyzDfuW54rSw== X-Received: by 2002:a05:600c:4585:b0:3f1:80d0:906b with SMTP id r5-20020a05600c458500b003f180d0906bmr1469339wmo.4.1683116439060; Wed, 03 May 2023 05:20:39 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id f23-20020a7bcd17000000b003ee443bf0c7sm1736785wmj.16.2023.05.03.05.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 05:20:38 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 3 May 2023 13:20:25 +0100 Message-Id: <20230503122035.32026-4-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230503122035.32026-1-naush@raspberrypi.com> References: <20230503122035.32026-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 03/13] ipa: meson: Allow nested IPA directory structures 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: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The current IPA build files require a flat directory struture for the IPAs. Modify the build files to remove this restriction and allow a directory structure such as: src/ipa |- raspberrypi |- common |- cam_helpers |- controller |- vc4 |- rkisp1 |- ipu3 where each subdir (e.g. raspberrypi/common, raspberrypi/cam_helper) has its own meson.build file. Such a directory structure will be introduced for the Raspberry Pi IPA in a future commit. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- meson.build | 2 +- src/ipa/ipu3/meson.build | 2 ++ src/ipa/meson.build | 26 +++++++++++++++++++++----- src/ipa/raspberrypi/meson.build | 2 ++ src/ipa/rkisp1/meson.build | 2 ++ 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index d3289181b7b9..2d99029bf5b7 100644 --- a/meson.build +++ b/meson.build @@ -262,7 +262,7 @@ py_mod.find_installation('python3', modules: py_modules) ## Summarise Configurations summary({ 'Enabled pipelines': pipelines, - 'Enabled IPA modules': enabled_ipa_modules, + 'Enabled IPA modules': enabled_ipa_names, 'Tracing support': tracing_enabled, 'Android support': android_enabled, 'GStreamer support': gst_enabled, diff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build index 658e7c9bc366..66c398432d43 100644 --- a/src/ipa/ipu3/meson.build +++ b/src/ipa/ipu3/meson.build @@ -29,3 +29,5 @@ if ipa_sign_module install : false, build_by_default : true) endif + +ipa_names += ipa_name diff --git a/src/ipa/meson.build b/src/ipa/meson.build index 76ad5b445601..fac92f32fdb9 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -36,16 +36,32 @@ if get_option('test') and 'vimc' not in ipa_modules endif enabled_ipa_modules = [] +enabled_ipa_names = [] +ipa_names = [] # The ipa-sign-install.sh script which uses the ipa_names variable will itself # prepend MESON_INSTALL_DESTDIR_PREFIX to each ipa module name, therefore we # must not include the prefix string here. + +subdirs = [] foreach pipeline : pipelines - if ipa_modules.contains(pipeline) - subdir(pipeline) - ipa_names += ipa_install_dir / ipa_name + '.so' - enabled_ipa_modules += pipeline + if not ipa_modules.contains(pipeline) + continue + endif + enabled_ipa_names += pipeline + + # Allow multi-level directory structuring for the IPAs if needed. + pipeline = pipeline.split('/')[0] + if pipeline in subdirs + continue endif + + subdir(pipeline) + subdirs += [pipeline] +endforeach + +foreach ipa_name : ipa_names + enabled_ipa_modules += ipa_install_dir / ipa_name + '.so' endforeach if ipa_sign_module @@ -54,5 +70,5 @@ if ipa_sign_module # install time, which invalidates the signatures. meson.add_install_script('ipa-sign-install.sh', ipa_priv_key.full_path(), - ipa_names) + enabled_ipa_modules) endif diff --git a/src/ipa/raspberrypi/meson.build b/src/ipa/raspberrypi/meson.build index de78cbd80f9c..95437cbcc962 100644 --- a/src/ipa/raspberrypi/meson.build +++ b/src/ipa/raspberrypi/meson.build @@ -64,3 +64,5 @@ if ipa_sign_module endif subdir('data') + +ipa_names += ipa_name diff --git a/src/ipa/rkisp1/meson.build b/src/ipa/rkisp1/meson.build index ccb84b27525b..e813da53ae9b 100644 --- a/src/ipa/rkisp1/meson.build +++ b/src/ipa/rkisp1/meson.build @@ -29,3 +29,5 @@ if ipa_sign_module install : false, build_by_default : true) endif + +ipa_names += ipa_name