blob: 317ec19266fe2d03f26927421ef3581dc99482bb [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Inspect and manipulate eBPF programs and maps"
2DESCRIPTION = "bpftool is a kernel tool for inspection and simple manipulation \
3of eBPF programs and maps."
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "GPL-2.0-only"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005DEPENDS = "binutils elfutils"
6PROVIDES = "virtual/bpftool"
7
8inherit bash-completion kernelsrc kernel-arch
9
Patrick Williamse760df82023-05-26 11:10:49 -050010do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011
Andrew Geissler32b11992021-03-31 13:37:05 -050012EXTRA_OEMAKE = "\
13 V=1 \
14 -C ${S}/tools/bpf/bpftool \
15 O=${B} \
16 CROSS=${TARGET_PREFIX} \
17 CC="${CC} ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}" \
18 LD="${LD}" \
19 AR=${AR} \
20 ARCH=${ARCH} \
Andrew Geissler5082cc72023-09-11 08:41:39 -040021 bash_compdir=${prefix}/share/bash-completion \
Andrew Geissler32b11992021-03-31 13:37:05 -050022"
Brad Bishop0f291cc2019-09-01 15:16:57 -040023
24SECURITY_CFLAGS = ""
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025
26do_configure[depends] += "virtual/kernel:do_shared_workdir"
27
Patrick Williams8dd68482022-10-04 07:57:18 -050028COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
Patrick Williams213cb262021-08-07 19:21:33 -050029COMPATIBLE_HOST:libc-musl = 'null'
Andrew Geissler1548c072019-02-22 16:03:50 -060030
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031do_compile() {
32 oe_runmake
33}
34
35do_install() {
36 oe_runmake DESTDIR=${D} install
37}
38
39PACKAGE_ARCH = "${MACHINE_ARCH}"
40
Patrick Williams213cb262021-08-07 19:21:33 -050041python do_package:prepend() {
Brad Bishop19323692019-04-05 15:28:33 -040042 d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043}
44
45B = "${WORKDIR}/${BPN}-${PV}"
Andrew Geissler5082cc72023-09-11 08:41:39 -040046
47FILES:${PN} += "${exec_prefix}/sbin/*"
48
49BBCLASSEXTEND = "native nativesdk"