ci: cover all libbpf Makefile tutorials (#213)

* ci: cover all libbpf Makefile tutorials

* ci: build modules against HWE headers

---------

Co-authored-by: LinuxDev9002 <i@littlefisher.me>
This commit is contained in:
云微
2026-07-14 05:25:47 -07:00
committed by GitHub
parent 37375ff87e
commit b1d81046d7
16 changed files with 104 additions and 39 deletions

View File

@@ -8,4 +8,4 @@ btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_NET_CLS_BPF=y|m,CONFIG_NET_SCHED=y
hardware=network-interface
root=required
test_status=not-in-ci
test_status=ci-build

View File

@@ -7,4 +7,4 @@ btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_JIT=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_DEBUG_INFO_BTF_MODULES=y,CONFIG_MODULES=y
hardware=none
root=required
test_status=not-in-ci
test_status=ci-build

View File

@@ -2,10 +2,11 @@ obj-m += hello.o # hello.o is the target
# Enable BTF generation
KBUILD_CFLAGS += -g -O2
KDIR ?= /lib/modules/$(shell uname -r)/build
all:
# Compile the module
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+$(MAKE) -C $(KDIR) M=$(CURDIR) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+$(MAKE) -C $(KDIR) M=$(CURDIR) clean