From patchwork Mon Jan 23 13:50:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 18512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD23C38142 for ; Mon, 23 Jan 2023 13:50:29 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.42759.1674481827084805775 for ; Mon, 23 Jan 2023 05:50:27 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5A0B9C14; Mon, 23 Jan 2023 05:51:08 -0800 (PST) Received: from e125920.arm.com (unknown [10.57.89.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D74F53F64C; Mon, 23 Jan 2023 05:50:25 -0800 (PST) From: Peter Hoyes To: meta-arm@lists.yoctoproject.org Cc: Peter Hoyes Subject: [PATCH 1/4] arm/lib: Add XAUTHORITY to runfvp environment Date: Mon, 23 Jan 2023 13:50:15 +0000 Message-Id: <20230123135018.3793393-1-peter.hoyes@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 23 Jan 2023 13:50:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4310 From: Peter Hoyes aa89fe3f ensured environment variables necessary for GUI applications are passed through to the model despite runfvp env var restrictions. Add XAUTHORITY to this list. This is useful when doing X-forwarding with Kas, which creates its own home directory. Signed-off-by: Peter Hoyes --- meta-arm/lib/fvp/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py index 4fd624ba..c52cdc1c 100644 --- a/meta-arm/lib/fvp/runner.py +++ b/meta-arm/lib/fvp/runner.py @@ -91,7 +91,7 @@ class FVPRunner: # Pass through environment variables needed for GUI applications, such # as xterm, to work. env = config['env'] - for name in ('DISPLAY', 'WAYLAND_DISPLAY'): + for name in ('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY'): if name in os.environ: env[name] = os.environ[name] From patchwork Mon Jan 23 13:50:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 18513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5626C38142 for ; Mon, 23 Jan 2023 13:50:39 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.42762.1674481834398361475 for ; Mon, 23 Jan 2023 05:50:34 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B5697C14; Mon, 23 Jan 2023 05:51:15 -0800 (PST) Received: from e125920.arm.com (unknown [10.57.89.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 64DFE3F64C; Mon, 23 Jan 2023 05:50:33 -0800 (PST) From: Peter Hoyes To: meta-arm@lists.yoctoproject.org Cc: Peter Hoyes Subject: [PATCH 2/4] classes: Define FVP_ENV_PASSTHROUGH variable dependencies Date: Mon, 23 Jan 2023 13:50:16 +0000 Message-Id: <20230123135018.3793393-2-peter.hoyes@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230123135018.3793393-1-peter.hoyes@arm.com> References: <20230123135018.3793393-1-peter.hoyes@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 23 Jan 2023 13:50:39 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4311 From: Peter Hoyes Define FVP_ENV_PASSTHROUGH's vardeps to equal itself, so that the fvpconf is regenerated if any of the defined variables change. Signed-off-by: Peter Hoyes --- meta-arm/classes/fvpboot.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-arm/classes/fvpboot.bbclass b/meta-arm/classes/fvpboot.bbclass index 508deb29..0c0f9d2d 100644 --- a/meta-arm/classes/fvpboot.bbclass +++ b/meta-arm/classes/fvpboot.bbclass @@ -25,6 +25,7 @@ FVP_CONSOLES[default] ?= "${FVP_CONSOLE}" FVP_EXTRA_ARGS ?= "" # Bitbake variables to pass to the FVP environment FVP_ENV_PASSTHROUGH ?= "FASTSIM_DISABLE_TA" +FVP_ENV_PASSTHROUGH[vardeps] = "${FVP_ENV_PASSTHROUGH}" # Disable timing annotation by default FASTSIM_DISABLE_TA ?= "1" From patchwork Mon Jan 23 13:50:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 18514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6C49C54E94 for ; Mon, 23 Jan 2023 13:50:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.42259.1674481840551551852 for ; Mon, 23 Jan 2023 05:50:40 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D838AC14; Mon, 23 Jan 2023 05:51:21 -0800 (PST) Received: from e125920.arm.com (unknown [10.57.89.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A10683F64C; Mon, 23 Jan 2023 05:50:39 -0800 (PST) From: Peter Hoyes To: meta-arm@lists.yoctoproject.org Cc: Peter Hoyes Subject: [PATCH 3/4] classes: Prevent passing None to the runfvp environment Date: Mon, 23 Jan 2023 13:50:17 +0000 Message-Id: <20230123135018.3793393-3-peter.hoyes@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230123135018.3793393-1-peter.hoyes@arm.com> References: <20230123135018.3793393-1-peter.hoyes@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 23 Jan 2023 13:50:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4312 From: Peter Hoyes FVP_ENV_PASSTHROUGH may contain variables that have not been set. d.getVar returns None in this case. Detect this and skip setting the variable in the model environment. Signed-off-by: Peter Hoyes --- meta-arm/classes/fvpboot.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-arm/classes/fvpboot.bbclass b/meta-arm/classes/fvpboot.bbclass index 0c0f9d2d..da0580b0 100644 --- a/meta-arm/classes/fvpboot.bbclass +++ b/meta-arm/classes/fvpboot.bbclass @@ -73,7 +73,8 @@ python do_write_fvpboot_conf() { data["env"] = {} for var in d.getVar("FVP_ENV_PASSTHROUGH").split(): - data["env"][var] = d.getVar(var) + if d.getVar(var) is not None: + data["env"][var] = d.getVar(var) os.makedirs(os.path.dirname(conffile), exist_ok=True) with open(conffile, "wt") as f: From patchwork Mon Jan 23 13:50:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 18515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF5FFC38142 for ; Mon, 23 Jan 2023 13:50:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.42769.1674481842048532936 for ; Mon, 23 Jan 2023 05:50:42 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 60354C14; Mon, 23 Jan 2023 05:51:23 -0800 (PST) Received: from e125920.arm.com (unknown [10.57.89.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2CE113F64C; Mon, 23 Jan 2023 05:50:41 -0800 (PST) From: Peter Hoyes To: meta-arm@lists.yoctoproject.org Cc: Peter Hoyes Subject: [PATCH 4/4] classes: Set ARMLMD_LICENSE_FILE in the runfvp environment Date: Mon, 23 Jan 2023 13:50:18 +0000 Message-Id: <20230123135018.3793393-4-peter.hoyes@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230123135018.3793393-1-peter.hoyes@arm.com> References: <20230123135018.3793393-1-peter.hoyes@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 23 Jan 2023 13:50:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4313 From: Peter Hoyes For models that require a license, ARMLMD_LICENSE_FILE is used to define the location of a license file or server. If the variable is not set in Bitbake it will not be set in the model environment. Signed-off-by: Peter Hoyes --- meta-arm/classes/fvpboot.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-arm/classes/fvpboot.bbclass b/meta-arm/classes/fvpboot.bbclass index da0580b0..3159cd43 100644 --- a/meta-arm/classes/fvpboot.bbclass +++ b/meta-arm/classes/fvpboot.bbclass @@ -24,7 +24,7 @@ FVP_CONSOLES[default] ?= "${FVP_CONSOLE}" # Arbitrary extra arguments FVP_EXTRA_ARGS ?= "" # Bitbake variables to pass to the FVP environment -FVP_ENV_PASSTHROUGH ?= "FASTSIM_DISABLE_TA" +FVP_ENV_PASSTHROUGH ?= "FASTSIM_DISABLE_TA ARMLMD_LICENSE_FILE" FVP_ENV_PASSTHROUGH[vardeps] = "${FVP_ENV_PASSTHROUGH}" # Disable timing annotation by default FASTSIM_DISABLE_TA ?= "1"