blob: b5253102253e910c580f43671d9f3eefe9da413c [file] [log] [blame]
Andrew Geissler90fd73c2021-03-05 15:25:55 -06001#!/usr/bin/env python3
2#
Patrick Williams92b42cb2022-09-03 06:53:57 -05003# Copyright OpenEmbedded Contributors
4#
Andrew Geissler90fd73c2021-03-05 15:25:55 -06005# SPDX-License-Identifier: MIT
6#
7
8import os
9import sys
10scripts_path = os.path.dirname(os.path.realpath(__file__))
11lib_path = scripts_path + "/lib"
12sys.path.insert(0, lib_path)
13import scriptpath
14scriptpath.add_bitbake_lib_path()
15
16import bb.tinfoil
17import subprocess
18
19if __name__ == "__main__":
20 with bb.tinfoil.Tinfoil() as tinfoil:
21 tinfoil.prepare(config_only=True)
22 package_classes_var = "DEPLOY_DIR_" + tinfoil.config_data.getVar("PACKAGE_CLASSES").split()[0].replace("package_", "").upper()
23 feed_dir = tinfoil.config_data.getVar(package_classes_var, expand=True)
24
Andrew Geisslerc926e172021-05-07 16:11:35 -050025 subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native'])
26
27 subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', '-U', feed_dir])
Patrick Williams213cb262021-08-07 19:21:33 -050028 print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")