summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 32c7a2aab3..c28980e616 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1714,9 +1714,6 @@ to your build configuration.
1714 self.cleaned = True 1714 self.cleaned = True
1715 1715
1716 def run_bitbake_env(self, mach=None, target=''): 1716 def run_bitbake_env(self, mach=None, target=''):
1717 bitbake = shutil.which('bitbake')
1718 if not bitbake:
1719 return
1720 1717
1721 if not mach: 1718 if not mach:
1722 mach = self.get('MACHINE') 1719 mach = self.get('MACHINE')
@@ -1733,6 +1730,10 @@ to your build configuration.
1733 else: 1730 else:
1734 cmd = 'bitbake -e %s %s' % (multiconfig, target) 1731 cmd = 'bitbake -e %s %s' % (multiconfig, target)
1735 1732
1733 bitbake = shutil.which('bitbake')
1734 if not bitbake:
1735 raise OEPathError("Bitbake is needed to run '%s', but it is not found in PATH. Please source the bitbake build environment." % cmd.strip())
1736
1736 logger.info('Running %s...' % cmd) 1737 logger.info('Running %s...' % cmd)
1737 try: 1738 try:
1738 return subprocess.check_output(cmd, shell=True).decode('utf-8') 1739 return subprocess.check_output(cmd, shell=True).decode('utf-8')