Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Inspect and manipulate eBPF programs and maps" |
| 2 | DESCRIPTION = "bpftool is a kernel tool for inspection and simple manipulation \ |
| 3 | of eBPF programs and maps." |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-only" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | DEPENDS = "binutils elfutils" |
| 6 | PROVIDES = "virtual/bpftool" |
| 7 | |
| 8 | inherit bash-completion kernelsrc kernel-arch |
| 9 | |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 10 | do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 12 | EXTRA_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 Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 21 | bash_compdir=${prefix}/share/bash-completion \ |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 22 | " |
Brad Bishop | 0f291cc | 2019-09-01 15:16:57 -0400 | [diff] [blame] | 23 | |
| 24 | SECURITY_CFLAGS = "" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 25 | |
| 26 | do_configure[depends] += "virtual/kernel:do_shared_workdir" |
| 27 | |
Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 28 | COMPATIBLE_HOST = "(x86_64|aarch64).*-linux" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | COMPATIBLE_HOST:libc-musl = 'null' |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 30 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | do_compile() { |
| 32 | oe_runmake |
| 33 | } |
| 34 | |
| 35 | do_install() { |
| 36 | oe_runmake DESTDIR=${D} install |
| 37 | } |
| 38 | |
| 39 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 40 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | python do_package:prepend() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 42 | d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | B = "${WORKDIR}/${BPN}-${PV}" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 46 | |
| 47 | FILES:${PN} += "${exec_prefix}/sbin/*" |
| 48 | |
| 49 | BBCLASSEXTEND = "native nativesdk" |