Skip to content

Commit

Permalink
Makefile: require user to provide extract-vmlinux
Browse files Browse the repository at this point in the history
extract-vmlinux is GPL licensed code which makes it harder for
cilium to graduate in the CNCF. Remove the vendored copy and require
the user to provide the binary instead.

Use the full path in /lib/modules which seems to be fairly portable
across Ubuntu, Arch and Fedora.

Signed-off-by: Lorenz Bauer <[email protected]>
  • Loading branch information
lmb committed Jul 4, 2023
1 parent 8fa4c90 commit 0f74f86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 65 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ generate-btf: KERNEL_VERSION?=5.19
generate-btf:
$(eval TMP := $(shell mktemp -d))
curl -fL "$(CI_KERNEL_URL)/linux-$(KERNEL_VERSION).bz" -o "$(TMP)/bzImage"
./testdata/extract-vmlinux "$(TMP)/bzImage" > "$(TMP)/vmlinux"
/lib/modules/$(uname -r)/build/scripts/extract-vmlinux "$(TMP)/bzImage" > "$(TMP)/vmlinux"
$(OBJCOPY) --dump-section .BTF=/dev/stdout "$(TMP)/vmlinux" /dev/null | gzip > "btf/testdata/vmlinux.btf.gz"
curl -fL "$(CI_KERNEL_URL)/linux-$(KERNEL_VERSION)-selftests-bpf.tgz" -o "$(TMP)/selftests.tgz"
tar -xf "$(TMP)/selftests.tgz" --to-stdout tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.ko | \
Expand Down
64 changes: 0 additions & 64 deletions testdata/extract-vmlinux

This file was deleted.

0 comments on commit 0f74f86

Please sign in to comment.