summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 55b8c05217..2be7a0f286 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1692,9 +1692,6 @@ to your build configuration.
1692 self.cleaned = True 1692 self.cleaned = True
1693 1693
1694 def run_bitbake_env(self, mach=None, target=''): 1694 def run_bitbake_env(self, mach=None, target=''):
1695 bitbake = shutil.which('bitbake')
1696 if not bitbake:
1697 return
1698 1695
1699 if not mach: 1696 if not mach:
1700 mach = self.get('MACHINE') 1697 mach = self.get('MACHINE')
@@ -1711,6 +1708,10 @@ to your build configuration.
1711 else: 1708 else:
1712 cmd = 'bitbake -e %s %s' % (multiconfig, target) 1709 cmd = 'bitbake -e %s %s' % (multiconfig, target)
1713 1710
1711 bitbake = shutil.which('bitbake')
1712 if not bitbake:
1713 raise OEPathError("Bitbake is needed to run '%s', but it is not found in PATH. Please source the bitbake build environment." % cmd.strip())
1714
1714 logger.info('Running %s...' % cmd) 1715 logger.info('Running %s...' % cmd)
1715 try: 1716 try:
1716 return subprocess.check_output(cmd, shell=True).decode('utf-8') 1717 return subprocess.check_output(cmd, shell=True).decode('utf-8')