diff options
author | Khem Raj <raj.khem@gmail.com> | 2025-09-06 14:09:26 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-09-06 14:17:15 -0700 |
commit | 6d3a6503720b10b0edd6e70ee3595032e0aa975b (patch) | |
tree | ab31dc2d36d6bd5c947258dec72d83f0dcc75e3c | |
parent | bb2d5f9d4d6a01840eeaf1b072027369119c710c (diff) | |
download | meta-openembedded-6d3a6503720b10b0edd6e70ee3595032e0aa975b.tar.gz |
bpftool,bpftool-native: Separate out native recipe
build uses prepared sourcedir for kernel and relying
on target kernel recipe to prepare this is not the correct
thing for native package. Since the kernel will need target
dependencies cross-compiler etc. to build/prepare the kernel sourcedir
This issue is revealed when bpftool-native is built for riscv64
it ends up in build errors
ERROR: bpftool-native-1.0-r0 do_configure: The sstate manifest for task 'linux-libc-headers:populate_sysroot' (multilib variant '') could not be found.
The pkgarchs considered were: qemuriscv64, allarch, x86_64_x86_64-nativesdk.
But none of these manifests exists:
/mnt/b/yoe/master/sources/poky/build/tmp/sstate-control/manifest-qemuriscv64-linux-libc-headers.populate_sysroot
/mnt/b/yoe/master/sources/poky/build/tmp/sstate-control/manifest-allarch-linux-libc-headers.populate_sysroot
/mnt/b/yoe/master/sources/poky/build/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-linux-libc-headers.populate_sysroot
ERROR: Logfile of failure stored in: /mnt/b/yoe/master/sources/poky/build/tmp/work/x86_64-linux/bpftool-native/1.0/temp/log.do_configure.2509356
Therefore separate it out into independent recipe and use latest stable
kernel to build it.
Enable musl builds as well for bpftool, it works now.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb | 38 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/bpftool/bpftool.bb | 3 |
2 files changed, 39 insertions, 2 deletions
diff --git a/meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb b/meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb new file mode 100644 index 0000000000..bc7712ce4d --- /dev/null +++ b/meta-oe/recipes-kernel/bpftool/bpftool-native_6.16.bb | |||
@@ -0,0 +1,38 @@ | |||
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 = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
6 | UPSTREAM_CHECK_URI = "https://www.kernel.org/" | ||
7 | |||
8 | DEPENDS = "binutils-native elfutils-native" | ||
9 | |||
10 | inherit native bash-completion | ||
11 | |||
12 | SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v6.x/linux-${PV}.tar.xz" | ||
13 | SRC_URI[sha256sum] = "1a4be2fe6b5246aa4ac8987a8a4af34c42a8dd7d08b46ab48516bcc1befbcd83" | ||
14 | |||
15 | S = "${UNPACKDIR}/linux-${PV}" | ||
16 | |||
17 | EXTRA_OEMAKE = "\ | ||
18 | V=1 \ | ||
19 | -C ${S}/tools/bpf/bpftool \ | ||
20 | O=${B} \ | ||
21 | CROSS=${TARGET_PREFIX} \ | ||
22 | CC="${CC} ${DEBUG_PREFIX_MAP} -ffile-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} ${CFLAGS}" \ | ||
23 | HOSTCC="${BUILD_CC} ${BUILD_CFLAGS}" \ | ||
24 | LD="${LD}" \ | ||
25 | AR=${AR} \ | ||
26 | ARCH=${ARCH} \ | ||
27 | bash_compdir=${prefix}/share/bash-completion \ | ||
28 | " | ||
29 | |||
30 | do_compile() { | ||
31 | oe_runmake | ||
32 | } | ||
33 | |||
34 | do_install() { | ||
35 | oe_runmake DESTDIR=${D} install | ||
36 | } | ||
37 | |||
38 | FILES:${PN} += "${exec_prefix}/sbin/*" | ||
diff --git a/meta-oe/recipes-kernel/bpftool/bpftool.bb b/meta-oe/recipes-kernel/bpftool/bpftool.bb index d19746184c..4f4d4a8670 100644 --- a/meta-oe/recipes-kernel/bpftool/bpftool.bb +++ b/meta-oe/recipes-kernel/bpftool/bpftool.bb | |||
@@ -27,7 +27,6 @@ SECURITY_CFLAGS = "" | |||
27 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | 27 | do_configure[depends] += "virtual/kernel:do_shared_workdir" |
28 | 28 | ||
29 | COMPATIBLE_HOST = "(x86_64|aarch64|riscv64).*-linux" | 29 | COMPATIBLE_HOST = "(x86_64|aarch64|riscv64).*-linux" |
30 | COMPATIBLE_HOST:libc-musl = 'null' | ||
31 | 30 | ||
32 | do_compile() { | 31 | do_compile() { |
33 | oe_runmake | 32 | oe_runmake |
@@ -47,4 +46,4 @@ B = "${WORKDIR}/${BPN}-${PV}" | |||
47 | 46 | ||
48 | FILES:${PN} += "${exec_prefix}/sbin/*" | 47 | FILES:${PN} += "${exec_prefix}/sbin/*" |
49 | 48 | ||
50 | BBCLASSEXTEND = "native nativesdk" | 49 | BBCLASSEXTEND = "nativesdk" |