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} \ |
| 21 | " |
Brad Bishop | 0f291cc | 2019-09-01 15:16:57 -0400 | [diff] [blame] | 22 | |
| 23 | SECURITY_CFLAGS = "" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | |
| 25 | do_configure[depends] += "virtual/kernel:do_shared_workdir" |
| 26 | |
Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 27 | COMPATIBLE_HOST = "(x86_64|aarch64).*-linux" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | COMPATIBLE_HOST:libc-musl = 'null' |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 29 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | do_compile() { |
| 31 | oe_runmake |
| 32 | } |
| 33 | |
| 34 | do_install() { |
| 35 | oe_runmake DESTDIR=${D} install |
| 36 | } |
| 37 | |
| 38 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | python do_package:prepend() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 41 | d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | B = "${WORKDIR}/${BPN}-${PV}" |