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." |
| 4 | LICENSE = "GPLv2" |
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 | |
| 10 | do_populate_lic[depends] += "virtual/kernel:do_patch" |
| 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 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 27 | COMPATIBLE_HOST = "(x86_64).*-linux" |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 28 | COMPATIBLE_HOST_libc-musl = 'null' |
| 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 | |
| 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}" |