summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-07-27 12:11:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-02 11:29:59 +0100
commit195ea43f8f7276b652a27d9c4591f05c4553d304 (patch)
treed071acc94171bf41d8e82d5533f38f004e536685 /scripts
parent2ef7affa31b4496eb295d20c63a24ebaf992a0e3 (diff)
downloadpoky-195ea43f8f7276b652a27d9c4591f05c4553d304.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. (From OE-Core rev: c523549141e5c31edc75281f581d97867b7d251d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/misc.py7
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=""):
141 cmd_and_args = pseudo + cmd_and_args 141 cmd_and_args = pseudo + cmd_and_args
142 142
143 hosttools_dir = get_bitbake_var("HOSTTOOLS_DIR") 143 hosttools_dir = get_bitbake_var("HOSTTOOLS_DIR")
144 target_sys = get_bitbake_var("TARGET_SYS")
144 145
145 native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/bin:%s" % \ 146 native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/usr/bin/%s:%s/bin:%s" % \
146 (native_sysroot, native_sysroot, 147 (native_sysroot, native_sysroot,
147 native_sysroot, native_sysroot, 148 native_sysroot, native_sysroot, target_sys,
148 hosttools_dir) 149 native_sysroot, hosttools_dir)
149 150
150 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \ 151 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
151 (native_paths, cmd_and_args) 152 (native_paths, cmd_and_args)