Skip to content

Commit

Permalink
internal/sys: make generate-btf and regenerate types
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Lehner <dev@der-flo.net>
  • Loading branch information
florianl committed Aug 1, 2023
1 parent b4b25b3 commit cf8aadd
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ testdata/loader-%-eb.elf: testdata/loader.c
$(STRIP) -g $@

.PHONY: generate-btf
generate-btf: KERNEL_VERSION?=5.19
generate-btf: KERNEL_VERSION?=6.1.29
generate-btf:
$(eval TMP := $(shell mktemp -d))
curl -fL "$(CI_KERNEL_URL)/linux-$(KERNEL_VERSION).bz" -o "$(TMP)/bzImage"
Expand Down
Binary file modified btf/testdata/btf_testmod.btf
Binary file not shown.
Binary file modified btf/testdata/vmlinux.btf.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion internal/cmd/gentypes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ import (
replace(objName, "name"),
replace(pointer, "xlated_prog_insns"),
replace(pointer, "map_ids"),
replace(btfID, "btf_id"),
replace(btfID, "btf_id", "attach_btf_obj_id"),
replace(typeID, "attach_btf_id"),
},
},
{
Expand Down
40 changes: 26 additions & 14 deletions internal/sys/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf8aadd

Please sign in to comment.