Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
| 2 | # |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 3 | # Copyright OpenEmbedded Contributors |
| 4 | # |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 5 | # SPDX-License-Identifier: MIT |
| 6 | # |
| 7 | |
| 8 | import os |
| 9 | import sys |
| 10 | scripts_path = os.path.dirname(os.path.realpath(__file__)) |
| 11 | lib_path = scripts_path + "/lib" |
| 12 | sys.path.insert(0, lib_path) |
| 13 | import scriptpath |
| 14 | scriptpath.add_bitbake_lib_path() |
| 15 | |
| 16 | import bb.tinfoil |
| 17 | import subprocess |
| 18 | |
| 19 | if __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 Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 25 | 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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf") |