diff options
Diffstat (limited to 'scripts/wic')
-rwxr-xr-x | scripts/wic | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/wic b/scripts/wic index a741aed364..c0bc0e6fe8 100755 --- a/scripts/wic +++ b/scripts/wic | |||
@@ -22,9 +22,9 @@ import sys | |||
22 | import argparse | 22 | import argparse |
23 | import logging | 23 | import logging |
24 | import subprocess | 24 | import subprocess |
25 | import shutil | ||
25 | 26 | ||
26 | from collections import namedtuple | 27 | from collections import namedtuple |
27 | from distutils import spawn | ||
28 | 28 | ||
29 | # External modules | 29 | # External modules |
30 | scripts_path = os.path.dirname(os.path.realpath(__file__)) | 30 | scripts_path = os.path.dirname(os.path.realpath(__file__)) |
@@ -47,7 +47,7 @@ if os.environ.get('SDKTARGETSYSROOT'): | |||
47 | break | 47 | break |
48 | sdkroot = os.path.dirname(sdkroot) | 48 | sdkroot = os.path.dirname(sdkroot) |
49 | 49 | ||
50 | bitbake_exe = spawn.find_executable('bitbake') | 50 | bitbake_exe = shutil.which('bitbake') |
51 | if bitbake_exe: | 51 | if bitbake_exe: |
52 | bitbake_path = scriptpath.add_bitbake_lib_path() | 52 | bitbake_path = scriptpath.add_bitbake_lib_path() |
53 | import bb | 53 | import bb |
@@ -159,6 +159,9 @@ def wic_create_subcommand(options, usage_str): | |||
159 | "(Use -e/--image-name to specify it)") | 159 | "(Use -e/--image-name to specify it)") |
160 | native_sysroot = options.native_sysroot | 160 | native_sysroot = options.native_sysroot |
161 | 161 | ||
162 | if options.kernel_dir: | ||
163 | kernel_dir = options.kernel_dir | ||
164 | |||
162 | if not options.vars_dir and (not native_sysroot or not os.path.isdir(native_sysroot)): | 165 | if not options.vars_dir and (not native_sysroot or not os.path.isdir(native_sysroot)): |
163 | logger.info("Building wic-tools...\n") | 166 | logger.info("Building wic-tools...\n") |
164 | subprocess.check_call(["bitbake", "wic-tools"]) | 167 | subprocess.check_call(["bitbake", "wic-tools"]) |