aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-04-03 08:57:44 -0700
committerJuro Bystricky <juro.bystricky@intel.com>2017-04-03 08:57:44 -0700
commit58f40114cc5f6c3fa541c00b4e999f294ecbfbb8 (patch)
tree5cb6c4473aca3fbb6aa13ea55ef1603668d93c3f
parent4f2f6233a8b95e814511c3ee3762d291a3cb4435 (diff)
downloadmeta-zephyr-58f40114cc5f6c3fa541c00b4e999f294ecbfbb8.tar.gz
meta-zephyr-58f40114cc5f6c3fa541c00b4e999f294ecbfbb8.tar.bz2
meta-zephyr-58f40114cc5f6c3fa541c00b4e999f294ecbfbb8.zip
zephyr-flash-dfu.bbclass: modified PATH handling
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-rw-r--r--classes/zephyr-flash-dfu.bbclass9
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/zephyr-flash-dfu.bbclass b/classes/zephyr-flash-dfu.bbclass
index 5f4a431..32f589a 100644
--- a/classes/zephyr-flash-dfu.bbclass
+++ b/classes/zephyr-flash-dfu.bbclass
@@ -1,9 +1,15 @@
python do_flash_usb() {
import subprocess
+
+ # Append the original PATH so we can find dfu-util...
+ origbbenv = d.getVar("BB_ORIGENV", False)
+ path = d.getVar('PATH') + ":" + origbbenv.getVar('PATH')
+ os.environ['PATH'] = path
+
return_code = subprocess.call("which dfu-util", shell=True)
if return_code != 0:
- bb.error("ERROR: dfu_util binary not in PATH")
+ bb.error("ERROR: dfu-util binary not in PATH")
sys.exit(1)
board = d.getVar('BOARD')
@@ -56,3 +62,4 @@ python do_flash_usb() {
addtask do_flash_usb
do_flash_usb[nostamp] = "1"
+do_flash_usb[vardepsexclude] = "BB_ORIGENV"