diff options
author | Ross Burton <ross.burton@arm.com> | 2022-07-27 12:11:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-02 11:29:57 +0100 |
commit | c523549141e5c31edc75281f581d97867b7d251d (patch) | |
tree | 2ed674e51a56265ebb80f111ad937efa5322b011 /scripts | |
parent | 9d2a661e46123a2292f7887658e6fa54923dbcc0 (diff) | |
download | openembedded-core-c523549141e5c31edc75281f581d97867b7d251d.tar.gz |
wic: add target tools to PATH when executing native commands
We might want to run a cross tool, such as objcopy, in wic. These are
in a TARGET_SYS/ subdirectory under /usr/bin, so add that directory to
the search path too.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/misc.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py index 3bc165fd7d..2b90821b30 100644 --- a/scripts/lib/wic/misc.py +++ b/scripts/lib/wic/misc.py @@ -141,11 +141,12 @@ def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""): cmd_and_args = pseudo + cmd_and_args hosttools_dir = get_bitbake_var("HOSTTOOLS_DIR") + target_sys = get_bitbake_var("TARGET_SYS") - native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin:%s" % \ + native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/usr/bin/%s:%s/bin:%s" % \ (native_sysroot, native_sysroot, - native_sysroot, native_sysroot, - hosttools_dir) + native_sysroot, native_sysroot, target_sys, + native_sysroot, hosttools_dir) native_cmd_and_args = "export PATH=%s:$PATH;%s" % \ (native_paths, cmd_and_args) |