summaryrefslogtreecommitdiff
path: root/poky/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'poky/scripts')
-rwxr-xr-xpoky/scripts/install-buildtools47
-rwxr-xr-xpoky/scripts/lib/devtool/ide_sdk.py63
-rw-r--r--poky/scripts/lib/devtool/standard.py3
-rwxr-xr-xpoky/scripts/lib/resulttool/manualexecution.py2
-rw-r--r--poky/scripts/lib/resulttool/report.py2
-rw-r--r--poky/scripts/lib/resulttool/resultutils.py76
-rw-r--r--poky/scripts/lib/resulttool/store.py26
-rw-r--r--poky/scripts/lib/wic/engine.py2
-rw-r--r--poky/scripts/lib/wic/plugins/source/bootimg-efi.py6
-rwxr-xr-xpoky/scripts/oe-debuginfod17
-rwxr-xr-xpoky/scripts/runqemu35
11 files changed, 174 insertions, 105 deletions
diff --git a/poky/scripts/install-buildtools b/poky/scripts/install-buildtools
index 2218f3ffac..a449e45cff 100755
--- a/poky/scripts/install-buildtools
+++ b/poky/scripts/install-buildtools
@@ -56,9 +56,9 @@ PROGNAME = 'install-buildtools'
logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)
DEFAULT_INSTALL_DIR = os.path.join(os.path.split(scripts_path)[0],'buildtools')
-DEFAULT_BASE_URL = 'http://downloads.yoctoproject.org/releases/yocto'
-DEFAULT_RELEASE = 'yocto-4.1'
-DEFAULT_INSTALLER_VERSION = '4.1'
+DEFAULT_BASE_URL = 'https://downloads.yoctoproject.org/releases/yocto'
+DEFAULT_RELEASE = 'yocto-5.0.12'
+DEFAULT_INSTALLER_VERSION = '5.0.12'
DEFAULT_BUILDDATE = '202110XX'
# Python version sanity check
@@ -102,6 +102,16 @@ def sha256_file(filename):
import hashlib
return _hasher(hashlib.sha256(), filename)
+def remove_quotes(var):
+ """
+ If a variable starts and ends with double quotes, remove them.
+ Assumption: if a variable starts with double quotes, it must also
+ end with them.
+ """
+ if var[0] == '"':
+ var = var[1:-1]
+ return var
+
def main():
global DEFAULT_INSTALL_DIR
@@ -238,19 +248,15 @@ def main():
# Verify checksum
if args.check:
logger.info("Fetching buildtools installer checksum")
- checksum_type = ""
- for checksum_type in ["md5sum", "sha256sum"]:
- check_url = "{}.{}".format(buildtools_url, checksum_type)
- checksum_filename = "{}.{}".format(filename, checksum_type)
- tmpbuildtools_checksum = os.path.join(tmpsdk_dir, checksum_filename)
- ret = subprocess.call("wget -q -O %s %s" %
- (tmpbuildtools_checksum, check_url), shell=True)
- if ret == 0:
- break
- else:
- if ret != 0:
- logger.error("Could not download file from %s" % check_url)
- return ret
+ checksum_type = "sha256sum"
+ check_url = "{}.{}".format(buildtools_url, checksum_type)
+ checksum_filename = "{}.{}".format(filename, checksum_type)
+ tmpbuildtools_checksum = os.path.join(tmpsdk_dir, checksum_filename)
+ ret = subprocess.call("wget -q -O %s %s" %
+ (tmpbuildtools_checksum, check_url), shell=True)
+ if ret != 0:
+ logger.error("Could not download file from %s" % check_url)
+ return ret
regex = re.compile(r"^(?P<checksum>[0-9a-f]+)\s+(?P<path>.*/)?(?P<filename>.*)$")
with open(tmpbuildtools_checksum, 'rb') as f:
original = f.read()
@@ -263,10 +269,7 @@ def main():
logger.error("Filename does not match name in checksum")
return 1
checksum = m.group('checksum')
- if checksum_type == "md5sum":
- checksum_value = md5_file(tmpbuildtools)
- else:
- checksum_value = sha256_file(tmpbuildtools)
+ checksum_value = sha256_file(tmpbuildtools)
if checksum == checksum_value:
logger.info("Checksum success")
else:
@@ -280,7 +283,7 @@ def main():
os.chmod(tmpbuildtools, st.st_mode | stat.S_IEXEC)
logger.debug(os.stat(tmpbuildtools))
if args.directory:
- install_dir = args.directory
+ install_dir = os.path.abspath(args.directory)
ret = subprocess.call("%s -d %s -y" %
(tmpbuildtools, install_dir), shell=True)
else:
@@ -301,7 +304,7 @@ def main():
if match:
env_var = match.group('env_var')
logger.debug("env_var: %s" % env_var)
- env_val = match.group('env_val')
+ env_val = remove_quotes(match.group('env_val'))
logger.debug("env_val: %s" % env_val)
os.environ[env_var] = env_val
diff --git a/poky/scripts/lib/devtool/ide_sdk.py b/poky/scripts/lib/devtool/ide_sdk.py
index 65873b088d..0b50165a12 100755
--- a/poky/scripts/lib/devtool/ide_sdk.py
+++ b/poky/scripts/lib/devtool/ide_sdk.py
@@ -288,6 +288,7 @@ class RecipeModified:
self.bblayers = None
self.bpn = None
self.d = None
+ self.debug_build = None
self.fakerootcmd = None
self.fakerootenv = None
self.libdir = None
@@ -348,6 +349,7 @@ class RecipeModified:
self.bpn = recipe_d.getVar('BPN')
self.cxx = recipe_d.getVar('CXX')
self.d = recipe_d.getVar('D')
+ self.debug_build = recipe_d.getVar('DEBUG_BUILD')
self.fakerootcmd = recipe_d.getVar('FAKEROOTCMD')
self.fakerootenv = recipe_d.getVar('FAKEROOTENV')
self.libdir = recipe_d.getVar('libdir')
@@ -389,17 +391,6 @@ class RecipeModified:
self.recipe_id = self.bpn + "-" + self.package_arch
self.recipe_id_pretty = self.bpn + ": " + self.package_arch
- def append_to_bbappend(self, append_text):
- with open(self.bbappend, 'a') as bbap:
- bbap.write(append_text)
-
- def remove_from_bbappend(self, append_text):
- with open(self.bbappend, 'r') as bbap:
- text = bbap.read()
- new_text = text.replace(append_text, '')
- with open(self.bbappend, 'w') as bbap:
- bbap.write(new_text)
-
@staticmethod
def is_valid_shell_variable(var):
"""Skip strange shell variables like systemd
@@ -412,34 +403,6 @@ class RecipeModified:
return True
return False
- def debug_build_config(self, args):
- """Explicitely set for example CMAKE_BUILD_TYPE to Debug if not defined otherwise"""
- if self.build_tool is BuildTool.CMAKE:
- append_text = os.linesep + \
- 'OECMAKE_ARGS:append = " -DCMAKE_BUILD_TYPE:STRING=Debug"' + os.linesep
- if args.debug_build_config and not 'CMAKE_BUILD_TYPE' in self.cmake_cache_vars:
- self.cmake_cache_vars['CMAKE_BUILD_TYPE'] = {
- "type": "STRING",
- "value": "Debug",
- }
- self.append_to_bbappend(append_text)
- elif 'CMAKE_BUILD_TYPE' in self.cmake_cache_vars:
- del self.cmake_cache_vars['CMAKE_BUILD_TYPE']
- self.remove_from_bbappend(append_text)
- elif self.build_tool is BuildTool.MESON:
- append_text = os.linesep + 'MESON_BUILDTYPE = "debug"' + os.linesep
- if args.debug_build_config and self.meson_buildtype != "debug":
- self.mesonopts.replace(
- '--buildtype ' + self.meson_buildtype, '--buildtype debug')
- self.append_to_bbappend(append_text)
- elif self.meson_buildtype == "debug":
- self.mesonopts.replace(
- '--buildtype debug', '--buildtype plain')
- self.remove_from_bbappend(append_text)
- elif args.debug_build_config:
- logger.warn(
- "--debug-build-config is not implemented for this build tool yet.")
-
def solib_search_path(self, image):
"""Search for debug symbols in the rootfs and rootfs-dbg
@@ -493,7 +456,7 @@ class RecipeModified:
vars = (key for key in d.keys() if not key.startswith(
"__") and not d.getVarFlag(key, "func", False))
- for var in vars:
+ for var in sorted(vars):
func = d.getVarFlag(var, "func", False)
if d.getVarFlag(var, 'python', False) and func:
continue
@@ -545,7 +508,7 @@ class RecipeModified:
cache_vars = {}
oecmake_args = d.getVar('OECMAKE_ARGS').split()
extra_oecmake = d.getVar('EXTRA_OECMAKE').split()
- for param in oecmake_args + extra_oecmake:
+ for param in sorted(oecmake_args + extra_oecmake):
d_pref = "-D"
if param.startswith(d_pref):
param = param[len(d_pref):]
@@ -988,6 +951,13 @@ def ide_setup(args, config, basepath, workspace):
recipe_modified.gen_meson_wrapper()
ide.setup_modified_recipe(
args, recipe_image, recipe_modified)
+
+ if recipe_modified.debug_build != '1':
+ logger.warn(
+ 'Recipe %s is compiled with release build configuration. '
+ 'You might want to add DEBUG_BUILD = "1" to %s. '
+ 'Note that devtool modify --debug-build can do this automatically.',
+ recipe_modified.name, recipe_modified.bbappend)
else:
raise DevtoolError("Must not end up here.")
@@ -995,6 +965,15 @@ def ide_setup(args, config, basepath, workspace):
def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin"""
+ # The ide-sdk command bootstraps the SDK from the bitbake environment before the IDE
+ # configuration is generated. In the case of the eSDK, the bootstrapping is performed
+ # during the installation of the eSDK installer. Running the ide-sdk plugin from an
+ # eSDK installer-based setup would require skipping the bootstrapping and probably
+ # taking some other differences into account when generating the IDE configurations.
+ # This would be possible. But it is not implemented.
+ if context.fixed_setup:
+ return
+
global ide_plugins
# Search for IDE plugins in all sub-folders named ide_plugins where devtool seraches for plugins.
@@ -1065,6 +1044,4 @@ def register_commands(subparsers, context):
'-p', '--no-preserve', help='Do not preserve existing files', action='store_true')
parser_ide_sdk.add_argument(
'--no-check-space', help='Do not check for available space before deploying', action='store_true')
- parser_ide_sdk.add_argument(
- '--debug-build-config', help='Use debug build flags, for example set CMAKE_BUILD_TYPE=Debug', action='store_true')
parser_ide_sdk.set_defaults(func=ide_setup)
diff --git a/poky/scripts/lib/devtool/standard.py b/poky/scripts/lib/devtool/standard.py
index 05161942b7..908869cc4f 100644
--- a/poky/scripts/lib/devtool/standard.py
+++ b/poky/scripts/lib/devtool/standard.py
@@ -1031,6 +1031,8 @@ def modify(args, config, basepath, workspace):
if branch == args.branch:
continue
f.write('# patches_%s: %s\n' % (branch, ','.join(branch_patches[branch])))
+ if args.debug_build:
+ f.write('\nDEBUG_BUILD = "1"\n')
update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn])
@@ -2396,6 +2398,7 @@ def register_commands(subparsers, context):
parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")')
parser_modify.add_argument('--no-overrides', '-O', action="store_true", help='Do not create branches for other override configurations')
parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true")
+ parser_modify.add_argument('--debug-build', action="store_true", help='Add DEBUG_BUILD = "1" to the modified recipe')
parser_modify.set_defaults(func=modify, fixed_setup=context.fixed_setup)
parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe',
diff --git a/poky/scripts/lib/resulttool/manualexecution.py b/poky/scripts/lib/resulttool/manualexecution.py
index ecb27c5933..ae0861ac6b 100755
--- a/poky/scripts/lib/resulttool/manualexecution.py
+++ b/poky/scripts/lib/resulttool/manualexecution.py
@@ -22,7 +22,7 @@ def load_json_file(f):
def write_json_file(f, json_data):
os.makedirs(os.path.dirname(f), exist_ok=True)
with open(f, 'w') as filedata:
- filedata.write(json.dumps(json_data, sort_keys=True, indent=4))
+ filedata.write(json.dumps(json_data, sort_keys=True, indent=1))
class ManualTestRunner(object):
diff --git a/poky/scripts/lib/resulttool/report.py b/poky/scripts/lib/resulttool/report.py
index a349510ab8..1c100b00ab 100644
--- a/poky/scripts/lib/resulttool/report.py
+++ b/poky/scripts/lib/resulttool/report.py
@@ -256,7 +256,7 @@ class ResultsTextReport(object):
if selected_test_case_only:
print_selected_testcase_result(raw_results, selected_test_case_only)
else:
- print(json.dumps(raw_results, sort_keys=True, indent=4))
+ print(json.dumps(raw_results, sort_keys=True, indent=1))
else:
print('Could not find raw test result for %s' % raw_test)
return 0
diff --git a/poky/scripts/lib/resulttool/resultutils.py b/poky/scripts/lib/resulttool/resultutils.py
index c5521d81bd..b8fc79a6ac 100644
--- a/poky/scripts/lib/resulttool/resultutils.py
+++ b/poky/scripts/lib/resulttool/resultutils.py
@@ -14,8 +14,11 @@ import scriptpath
import copy
import urllib.request
import posixpath
+import logging
scriptpath.add_oe_lib_path()
+logger = logging.getLogger('resulttool')
+
flatten_map = {
"oeselftest": [],
"runtime": [],
@@ -31,13 +34,19 @@ regression_map = {
"manual": ['TEST_TYPE', 'TEST_MODULE', 'IMAGE_BASENAME', 'MACHINE']
}
store_map = {
- "oeselftest": ['TEST_TYPE'],
+ "oeselftest": ['TEST_TYPE', 'TESTSERIES', 'MACHINE'],
"runtime": ['TEST_TYPE', 'DISTRO', 'MACHINE', 'IMAGE_BASENAME'],
"sdk": ['TEST_TYPE', 'MACHINE', 'SDKMACHINE', 'IMAGE_BASENAME'],
"sdkext": ['TEST_TYPE', 'MACHINE', 'SDKMACHINE', 'IMAGE_BASENAME'],
"manual": ['TEST_TYPE', 'TEST_MODULE', 'MACHINE', 'IMAGE_BASENAME']
}
+rawlog_sections = {
+ "ptestresult.rawlogs": "ptest",
+ "ltpresult.rawlogs": "ltp",
+ "ltpposixresult.rawlogs": "ltpposix"
+}
+
def is_url(p):
"""
Helper for determining if the given path is a URL
@@ -108,21 +117,57 @@ def filter_resultsdata(results, resultid):
newresults[r][i] = results[r][i]
return newresults
-def strip_ptestresults(results):
+def strip_logs(results):
newresults = copy.deepcopy(results)
- #for a in newresults2:
- # newresults = newresults2[a]
for res in newresults:
if 'result' not in newresults[res]:
continue
- if 'ptestresult.rawlogs' in newresults[res]['result']:
- del newresults[res]['result']['ptestresult.rawlogs']
+ for logtype in rawlog_sections:
+ if logtype in newresults[res]['result']:
+ del newresults[res]['result'][logtype]
if 'ptestresult.sections' in newresults[res]['result']:
for i in newresults[res]['result']['ptestresult.sections']:
if 'log' in newresults[res]['result']['ptestresult.sections'][i]:
del newresults[res]['result']['ptestresult.sections'][i]['log']
return newresults
+# For timing numbers, crazy amounts of precision don't make sense and just confuse
+# the logs. For numbers over 1, trim to 3 decimal places, for numbers less than 1,
+# trim to 4 significant digits
+def trim_durations(results):
+ for res in results:
+ if 'result' not in results[res]:
+ continue
+ for entry in results[res]['result']:
+ if 'duration' in results[res]['result'][entry]:
+ duration = results[res]['result'][entry]['duration']
+ if duration > 1:
+ results[res]['result'][entry]['duration'] = float("%.3f" % duration)
+ elif duration < 1:
+ results[res]['result'][entry]['duration'] = float("%.4g" % duration)
+ return results
+
+def handle_cleanups(results):
+ # Remove pointless path duplication from old format reproducibility results
+ for res2 in results:
+ try:
+ section = results[res2]['result']['reproducible']['files']
+ for pkgtype in section:
+ for filelist in section[pkgtype].copy():
+ if section[pkgtype][filelist] and type(section[pkgtype][filelist][0]) == dict:
+ newlist = []
+ for entry in section[pkgtype][filelist]:
+ newlist.append(entry["reference"].split("/./")[1])
+ section[pkgtype][filelist] = newlist
+
+ except KeyError:
+ pass
+ # Remove pointless duplicate rawlogs data
+ try:
+ del results[res2]['result']['reproducible.rawlogs']
+ except KeyError:
+ pass
+
def decode_log(logdata):
if isinstance(logdata, str):
return logdata
@@ -155,9 +200,6 @@ def generic_get_rawlogs(sectname, results):
return None
return decode_log(results[sectname]['log'])
-def ptestresult_get_rawlogs(results):
- return generic_get_rawlogs('ptestresult.rawlogs', results)
-
def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, ptestlogs=False):
for res in results:
if res:
@@ -167,16 +209,20 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p
os.makedirs(os.path.dirname(dst), exist_ok=True)
resultsout = results[res]
if not ptestjson:
- resultsout = strip_ptestresults(results[res])
+ resultsout = strip_logs(results[res])
+ trim_durations(resultsout)
+ handle_cleanups(resultsout)
with open(dst, 'w') as f:
- f.write(json.dumps(resultsout, sort_keys=True, indent=4))
+ f.write(json.dumps(resultsout, sort_keys=True, indent=1))
for res2 in results[res]:
if ptestlogs and 'result' in results[res][res2]:
seriesresults = results[res][res2]['result']
- rawlogs = ptestresult_get_rawlogs(seriesresults)
- if rawlogs is not None:
- with open(dst.replace(fn, "ptest-raw.log"), "w+") as f:
- f.write(rawlogs)
+ for logtype in rawlog_sections:
+ logdata = generic_get_rawlogs(logtype, seriesresults)
+ if logdata is not None:
+ logger.info("Extracting " + rawlog_sections[logtype] + "-raw.log")
+ with open(dst.replace(fn, rawlog_sections[logtype] + "-raw.log"), "w+") as f:
+ f.write(logdata)
if 'ptestresult.sections' in seriesresults:
for i in seriesresults['ptestresult.sections']:
sectionlog = ptestresult_get_log(seriesresults, i)
diff --git a/poky/scripts/lib/resulttool/store.py b/poky/scripts/lib/resulttool/store.py
index e0951f0a8f..578910d234 100644
--- a/poky/scripts/lib/resulttool/store.py
+++ b/poky/scripts/lib/resulttool/store.py
@@ -65,18 +65,34 @@ def store(args, logger):
for r in revisions:
results = revisions[r]
+ if args.revision and r[0] != args.revision:
+ logger.info('skipping %s as non-matching' % r[0])
+ continue
keywords = {'commit': r[0], 'branch': r[1], "commit_count": r[2]}
- subprocess.check_call(["find", tempdir, "!", "-path", "./.git/*", "-delete"])
+ subprocess.check_call(["find", tempdir, "-name", "testresults.json", "!", "-path", "./.git/*", "-delete"])
resultutils.save_resultsdata(results, tempdir, ptestlogs=True)
logger.info('Storing test result into git repository %s' % args.git_dir)
- gitarchive.gitarchive(tempdir, args.git_dir, False, False,
+ excludes = []
+ if args.logfile_archive:
+ excludes = ['*.log', "*.log.zst"]
+
+ tagname = gitarchive.gitarchive(tempdir, args.git_dir, False, False,
"Results of {branch}:{commit}", "branch: {branch}\ncommit: {commit}", "{branch}",
False, "{branch}/{commit_count}-g{commit}/{tag_number}",
'Test run #{tag_number} of {branch}:{commit}', '',
- [], [], False, keywords, logger)
+ excludes, [], False, keywords, logger)
+ if args.logfile_archive:
+ logdir = args.logfile_archive + "/" + tagname
+ shutil.copytree(tempdir, logdir)
+ for root, dirs, files in os.walk(logdir):
+ for name in files:
+ if not name.endswith(".log"):
+ continue
+ f = os.path.join(root, name)
+ subprocess.run(["zstd", f, "--rm"], check=True, capture_output=True)
finally:
subprocess.check_call(["rm", "-rf", tempdir])
@@ -102,3 +118,7 @@ def register_commands(subparsers):
help='add executed-by configuration to each result file')
parser_build.add_argument('-t', '--extra-test-env', default='',
help='add extra test environment data to each result file configuration')
+ parser_build.add_argument('-r', '--revision', default='',
+ help='only store data for the specified revision')
+ parser_build.add_argument('-l', '--logfile-archive', default='',
+ help='directory to separately archive log files along with a copy of the results')
diff --git a/poky/scripts/lib/wic/engine.py b/poky/scripts/lib/wic/engine.py
index 674ccfc244..ce7e6c5d75 100644
--- a/poky/scripts/lib/wic/engine.py
+++ b/poky/scripts/lib/wic/engine.py
@@ -359,7 +359,7 @@ class Disk:
Remove files/dirs and their contents from the partition.
This only applies to ext* partition.
"""
- abs_path = re.sub('\/\/+', '/', path)
+ abs_path = re.sub(r'\/\/+', '/', path)
cmd = "{} {} -wR 'rm \"{}\"'".format(self.debugfs,
self._get_part_image(pnum),
abs_path)
diff --git a/poky/scripts/lib/wic/plugins/source/bootimg-efi.py b/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
index 13a9cddf4e..37d07093f5 100644
--- a/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -245,7 +245,7 @@ class BootimgEFIPlugin(SourcePlugin):
# list of tuples (src_name, dst_name)
deploy_files = []
- for src_entry in re.findall(r'[\w;\-\./\*]+', boot_files):
+ for src_entry in re.findall(r'[\w;\-\.\+/\*]+', boot_files):
if ';' in src_entry:
dst_entry = tuple(src_entry.split(';'))
if not dst_entry[0] or not dst_entry[1]:
@@ -428,10 +428,10 @@ class BootimgEFIPlugin(SourcePlugin):
elif source_params['loader'] == 'uefi-kernel':
kernel = get_bitbake_var("KERNEL_IMAGETYPE")
if not kernel:
- raise WicError("Empty KERNEL_IMAGETYPE %s\n" % target)
+ raise WicError("Empty KERNEL_IMAGETYPE")
target = get_bitbake_var("TARGET_SYS")
if not target:
- raise WicError("Unknown arch (TARGET_SYS) %s\n" % target)
+ raise WicError("Empty TARGET_SYS")
if re.match("x86_64", target):
kernel_efi_image = "bootx64.efi"
diff --git a/poky/scripts/oe-debuginfod b/poky/scripts/oe-debuginfod
index b525310225..60e51addfd 100755
--- a/poky/scripts/oe-debuginfod
+++ b/poky/scripts/oe-debuginfod
@@ -15,14 +15,29 @@ scriptpath.add_bitbake_lib_path()
import bb.tinfoil
import subprocess
+import argparse
if __name__ == "__main__":
+ p = argparse.ArgumentParser()
+ p.add_argument("-d", action='store_true', \
+ help="store debuginfod files in project sub-directory")
+
+ args = p.parse_args()
+
with bb.tinfoil.Tinfoil() as tinfoil:
tinfoil.prepare(config_only=True)
package_classes_var = "DEPLOY_DIR_" + tinfoil.config_data.getVar("PACKAGE_CLASSES").split()[0].replace("package_", "").upper()
feed_dir = tinfoil.config_data.getVar(package_classes_var, expand=True)
+ opts = [ '--verbose', '-R', '-U', feed_dir ]
+
+ if args.d:
+ fdir = os.path.join(os.getcwd(), 'oedid-files')
+ os.makedirs(fdir, exist_ok=True)
+ opts += [ '-d', os.path.join(fdir, 'did.sqlite') ]
+
subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native'])
- subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', '-U', feed_dir])
+ subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod'] + opts)
+ # we should not get here
print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")
diff --git a/poky/scripts/runqemu b/poky/scripts/runqemu
index 69cd44864e..f189dbfb60 100755
--- a/poky/scripts/runqemu
+++ b/poky/scripts/runqemu
@@ -368,12 +368,13 @@ class BaseConfig(object):
- Check whether it is an NFS dir
- Check whether it is an OVMF flash file
"""
+ n = os.path.basename(p)
if p.endswith('.qemuboot.conf'):
self.qemuboot = p
self.qbconfload = True
- elif re.search('\\.bin$', p) or re.search('bzImage', p) or \
- re.search('zImage', p) or re.search('vmlinux', p) or \
- re.search('fitImage', p) or re.search('uImage', p):
+ elif re.search('\\.bin$', n) or re.search('bzImage', n) or \
+ re.search('zImage', n) or re.search('vmlinux', n) or \
+ re.search('fitImage', n) or re.search('uImage', n):
self.kernel = p
elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)):
self.rootfs = p
@@ -1195,16 +1196,20 @@ to your build configuration.
uid = os.getuid()
logger.info("Setting up tap interface under sudo")
cmd = ('sudo', self.qemuifup, str(gid))
- try:
- tap = subprocess.check_output(cmd).decode('utf-8').strip()
- except subprocess.CalledProcessError as e:
- logger.error('Setting up tap device failed:\n%s\nRun runqemu-gen-tapdevs to manually create one.' % str(e))
- sys.exit(1)
- lockfile = os.path.join(lockdir, tap)
- self.taplock = lockfile + '.lock'
- self.acquire_taplock()
- self.cleantap = True
- logger.debug('Created tap: %s' % tap)
+ for _ in range(5):
+ try:
+ tap = subprocess.check_output(cmd).decode('utf-8').strip()
+ except subprocess.CalledProcessError as e:
+ logger.error('Setting up tap device failed:\n%s\nRun runqemu-gen-tapdevs to manually create one.' % str(e))
+ sys.exit(1)
+ lockfile = os.path.join(lockdir, tap)
+ self.taplock = lockfile + '.lock'
+ if self.acquire_taplock():
+ self.cleantap = True
+ logger.debug('Created tap: %s' % tap)
+ break
+ else:
+ tap = None
if not tap:
logger.error("Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.")
@@ -1483,7 +1488,7 @@ to your build configuration.
# If no serial or serialtcp options were specified, only ttyS0 is created
# and sysvinit shows an error trying to enable ttyS1:
# INIT: Id "S1" respawning too fast: disabled for 5 minutes
- serial_num = len(re.findall("-serial", self.qemu_opt))
+ serial_num = len(re.findall("(^| )-serial ", self.qemu_opt))
# Assume if the user passed serial options, they know what they want
# and pad to two devices
@@ -1503,7 +1508,7 @@ to your build configuration.
self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT")
- serial_num = len(re.findall("-serial", self.qemu_opt))
+ serial_num = len(re.findall("(^| )-serial ", self.qemu_opt))
if serial_num < 2:
self.qemu_opt += " -serial null"