xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Inspect and manipulate eBPF programs and maps"
2DESCRIPTION = "bpftool is a kernel tool for inspection and simple manipulation \
3of eBPF programs and maps."
4LICENSE = "GPL-2.0-only"
5DEPENDS = "binutils elfutils"
6PROVIDES = "virtual/bpftool"
7
8inherit bash-completion kernelsrc kernel-arch
9
10do_populate_lic[depends] += "virtual/kernel:do_patch"
11
12EXTRA_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"
22
23SECURITY_CFLAGS = ""
24
25do_configure[depends] += "virtual/kernel:do_shared_workdir"
26
27COMPATIBLE_HOST = "(x86_64).*-linux"
28COMPATIBLE_HOST:libc-musl = 'null'
29
30do_compile() {
31    oe_runmake
32}
33
34do_install() {
35    oe_runmake DESTDIR=${D} install
36}
37
38PACKAGE_ARCH = "${MACHINE_ARCH}"
39
40python do_package:prepend() {
41    d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
42}
43
44B = "${WORKDIR}/${BPN}-${PV}"
45