]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpftool: Allow substituting custom vmlinux.h for the build
authorAndrii Nakryiko <andriin@fb.com>
Tue, 30 Jun 2020 00:47:58 +0000 (17:47 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 30 Jun 2020 22:50:11 +0000 (15:50 -0700)
commitec23eb705620234421fd48fc2382490fcfbafc37
tree1dd4b8decbb4f15cf7c723b77149b4b5cc4f0c78
parentafa12644c877d3f627281bb6493d7ca8f9976e3d
tools/bpftool: Allow substituting custom vmlinux.h for the build

In some build contexts (e.g., Travis CI build for outdated kernel), vmlinux.h,
generated from available kernel, doesn't contain all the types necessary for
BPF program compilation. For such set up, the most maintainable way to deal
with this problem is to keep pre-generated (almost up-to-date) vmlinux.h
checked in and use it for compilation purposes. bpftool after that can deal
with kernel missing some of the features in runtime with no problems.

To that effect, allow to specify path to custom vmlinux.h to bpftool's
Makefile with VMLINUX_H variable.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200630004759.521530-1-andriin@fb.com
tools/bpf/bpftool/Makefile