meta-arm.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to runfvp environment
@ 2023-01-23 13:52 Peter Hoyes
  2023-01-23 13:52 ` [PATCH 2/4][langdale] classes: Define FVP_ENV_PASSTHROUGH variable dependencies Peter Hoyes
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peter Hoyes @ 2023-01-23 13:52 UTC (permalink / raw)
  To: meta-arm; +Cc: Peter Hoyes

From: Peter Hoyes <Peter.Hoyes@arm.com>

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 <Peter.Hoyes@arm.com>
---
 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]
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4][langdale] classes: Define FVP_ENV_PASSTHROUGH variable dependencies
  2023-01-23 13:52 [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to runfvp environment Peter Hoyes
@ 2023-01-23 13:52 ` Peter Hoyes
  2023-01-23 13:52 ` [PATCH 3/4][langdale] classes: Prevent passing None to the runfvp environment Peter Hoyes
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Hoyes @ 2023-01-23 13:52 UTC (permalink / raw)
  To: meta-arm; +Cc: Peter Hoyes

From: Peter Hoyes <Peter.Hoyes@arm.com>

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 <Peter.Hoyes@arm.com>
---
 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"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4][langdale] classes: Prevent passing None to the runfvp environment
  2023-01-23 13:52 [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to runfvp environment Peter Hoyes
  2023-01-23 13:52 ` [PATCH 2/4][langdale] classes: Define FVP_ENV_PASSTHROUGH variable dependencies Peter Hoyes
@ 2023-01-23 13:52 ` Peter Hoyes
  2023-01-23 13:52 ` [PATCH 4/4][langdale] classes: Set ARMLMD_LICENSE_FILE in " Peter Hoyes
  2023-01-24  2:10 ` [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to " Jon Mason
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Hoyes @ 2023-01-23 13:52 UTC (permalink / raw)
  To: meta-arm; +Cc: Peter Hoyes

From: Peter Hoyes <Peter.Hoyes@arm.com>

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 <Peter.Hoyes@arm.com>
---
 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:
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4][langdale] classes: Set ARMLMD_LICENSE_FILE in the runfvp environment
  2023-01-23 13:52 [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to runfvp environment Peter Hoyes
  2023-01-23 13:52 ` [PATCH 2/4][langdale] classes: Define FVP_ENV_PASSTHROUGH variable dependencies Peter Hoyes
  2023-01-23 13:52 ` [PATCH 3/4][langdale] classes: Prevent passing None to the runfvp environment Peter Hoyes
@ 2023-01-23 13:52 ` Peter Hoyes
  2023-01-24  2:10 ` [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to " Jon Mason
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Hoyes @ 2023-01-23 13:52 UTC (permalink / raw)
  To: meta-arm; +Cc: Peter Hoyes

From: Peter Hoyes <Peter.Hoyes@arm.com>

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 <Peter.Hoyes@arm.com>
---
 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"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to runfvp environment
  2023-01-23 13:52 [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to runfvp environment Peter Hoyes
                   ` (2 preceding siblings ...)
  2023-01-23 13:52 ` [PATCH 4/4][langdale] classes: Set ARMLMD_LICENSE_FILE in " Peter Hoyes
@ 2023-01-24  2:10 ` Jon Mason
  3 siblings, 0 replies; 5+ messages in thread
From: Jon Mason @ 2023-01-24  2:10 UTC (permalink / raw)
  To: meta-arm, Peter Hoyes; +Cc: Peter Hoyes

On Mon, 23 Jan 2023 13:52:36 +0000, Peter Hoyes wrote:
> 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.

Applied, thanks!

[1/4] arm/lib: Add XAUTHORITY to runfvp environment
      commit: 65c36dc6c38e10bc51f485f8d5db991bba50fab2
[2/4] classes: Define FVP_ENV_PASSTHROUGH variable dependencies
      commit: 9d980336fd7facb5003143b6053d141007668565
[3/4] classes: Prevent passing None to the runfvp environment
      commit: 7090a9bb8ebfe5b9b06276e495594e72bc88dfbb
[4/4] classes: Set ARMLMD_LICENSE_FILE in the runfvp environment
      commit: a590d6e1b88638f570ba5af7811c3b27f73e7cc2

Best regards,
-- 
Jon Mason <jon.mason@arm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-24  2:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 13:52 [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to runfvp environment Peter Hoyes
2023-01-23 13:52 ` [PATCH 2/4][langdale] classes: Define FVP_ENV_PASSTHROUGH variable dependencies Peter Hoyes
2023-01-23 13:52 ` [PATCH 3/4][langdale] classes: Prevent passing None to the runfvp environment Peter Hoyes
2023-01-23 13:52 ` [PATCH 4/4][langdale] classes: Set ARMLMD_LICENSE_FILE in " Peter Hoyes
2023-01-24  2:10 ` [PATCH 1/4][langdale] arm/lib: Add XAUTHORITY to " Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).