blob: 6683eccf2dfc70405d891f1fa9537b8c4eed5e8c [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."
4LICENSE = "GPLv2"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005DEPENDS = "binutils elfutils"
6PROVIDES = "virtual/bpftool"
7
8inherit bash-completion kernelsrc kernel-arch
9
10do_populate_lic[depends] += "virtual/kernel:do_patch"
11
Brad Bishop0f291cc2019-09-01 15:16:57 -040012EXTRA_OEMAKE = "V=1 -C ${S}/tools/bpf/bpftool O=${B} CROSS=${TARGET_PREFIX} CC="${CC}" LD="${LD}" AR=${AR} ARCH=${ARCH}"
13
14SECURITY_CFLAGS = ""
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015
16do_configure[depends] += "virtual/kernel:do_shared_workdir"
17
Andrew Geissler1548c072019-02-22 16:03:50 -060018COMPATIBLE_HOST_libc-musl = 'null'
19
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020do_compile() {
21 oe_runmake
22}
23
24do_install() {
25 oe_runmake DESTDIR=${D} install
26}
27
28PACKAGE_ARCH = "${MACHINE_ARCH}"
29
30python do_package_prepend() {
Brad Bishop19323692019-04-05 15:28:33 -040031 d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032}
33
34B = "${WORKDIR}/${BPN}-${PV}"
Brad Bishopc1d34332019-09-09 14:56:00 -040035PNBLACKLIST[bpftool] = "Needs forward porting to kernel 5.2+"