arm/lib: pass the PATH to fvp runner
PATCH 1/2 arm/lib: pass the PATH to fvp runner
When running an FVP machine the model executable need to be found in the PATH environement.
At the moment the script doesn't provide any PATH to the subprocess.
Add PATH to the allowed environement variable to be forwaded.
--- meta-arm/lib/fvp/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arm/lib/fvp/runner.py +1 -1
@@ -63,7 +63,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', 'PATH', 'WAYLAND_DISPLAY'): if name in os.environ: env[name] = os.environ[name]
Signature · 1 line
2.34.1
PATCH 2/2 scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
We access the dictionnary element that doesn't exist.
Use the get() method instead that will default the element to None if it doesn't exist.
--- scripts/runfvp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/runfvp +2 -2
@@ -55,8 +55,8 @@ async def start_fvp(args, config, extra_args): if args.console: fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}")) - expected_terminal = config["consoles"]["default"] - if not expected_terminal: + expected_terminal = config["consoles"].get("default") + if expected_terminal is None: logger.error("--console used but FVP_CONSOLE not set in machine configuration") return 1 telnet = await fvp.create_telnet(expected_terminal)
Signature · 1 line
2.34.1
Re: [meta-arm] [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
Quoted 6 lines · Clément Péron via lists.yoctoproject.org
We access the dictionnary element that doesn't exist.
Use the
get()method instead that will default the element to None if it doesn't exist.Signed-off-by Clément Péron <[email protected]>
Quoted 28 lines
--- scripts/runfvp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/runfvp +2
-3@@ -55,8 +55,8 @@ async def start_fvp(args, config, extra_args): if args.console: fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}")) - expected_terminal = config["consoles"]["default"] - if not expected_terminal: + expected_terminal = config["consoles"].get("default") + if expected_terminal is None: logger.error("--console used but FVP_CONSOLE not set in machine configuration") return 1 telnet = await fvp.create_telnet(expected_terminal) -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#4496): https://lists.yoctoproject.org/g/meta-arm/message/4496
Mute This Topic: https://lists.yoctoproject.org/mt/97926510/5715260
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 8 lines · Cl�ment P�ron
When running an FVP machine the model executable need to be found in the PATH environement.
At the moment the script doesn't provide any PATH to the subprocess.
Add PATH to the allowed environement variable to be forwaded.
Signed-off-by Cl�ment P�ron <[email protected]>
This patch doesn't apply cleanly to the master branch. I think it's as simple as appending to the list of variables passed to the environment, but I'll leave it to you to confirm and test.
Thanks,
Jon
Quoted 21 lines
--- meta-arm/lib/fvp/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-arm/lib/fvp/runner.py +1
-1@@ -63,7 +63,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', 'PATH', 'WAYLAND_DISPLAY'): if name in os.environ: env[name] = os.environ[name]Signature · 1 line
2.34.1
Quoted 6 lines · Jon Mason
Quoted 5 lines · Cl�ment P�ron
When running an FVP machine the model executable need to be found in the PATH environement.
At the moment the script doesn't provide any PATH to the subprocess.
Quoted 7 lines
Quoted 3 lines
Add PATH to the allowed environement variable to be forwaded.
Signed-off-by Cl�ment P�ron <[email protected]>This patch doesn't apply cleanly to the master branch. I think it's as simple as appending to the list of variables passed to the environment, but I'll leave it to you to confirm and test.
I attempted to update but it fails selftest
Anyway, it might be a starting point for you
https://gitlab.com/jonmason00/meta-arm/-/commits/master-next2
Quoted 26 lines
Thanks,
JonQuoted 21 lines
--- meta-arm/lib/fvp/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-arm/lib/fvp/runner.py +1
-1@@ -63,7 +63,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', 'PATH', 'WAYLAND_DISPLAY'): if name in os.environ: env[name] = os.environ[name]Signature · 1 line
2.34.1
Jon Mason
AppliedQuoted 6 lines · Clément Péron
When running an FVP machine the model executable need to be found in the PATH environement.
At the moment the script doesn't provide any PATH to the subprocess.
Add PATH to the allowed environement variable to be forwaded.
Applied, thanks!
[1/2] arm/lib: pass the PATH to fvp runner
commit: fa598021fb387e98bdb80861f245cc15acde4ca5
[2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
commit: 316e02c0f13b473e916cd779e59f0d55d48e4962Best regards,
Signature · 1 line
Jon Mason <[email protected]>