Browse Source

bpftool changes

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2 years ago
parent
commit
39b2f2248f
  1. 10
      SPECS/kernel-6.1.spec

10
SPECS/kernel-6.1.spec

@ -577,8 +577,12 @@ BuildKernel @@ -577,8 +577,12 @@ BuildKernel
%endif

%if %{with_bpftool}
# Generate a vmlinux.h file.
bpftool btf dump file vmlinux format c > tools/bpf/bpftool/vmlinux.h
if [ -f tools/bpf/bpftool/vmlinux.h ]; then
mv tools/bpf/bpftool/vmlinux.h $RPM_BUILD_ROOT/usr/src/kernels/%{KVERREL}/
else
# Generate a vmlinux.h file.
bpftool btf dump file vmlinux format c > tools/bpf/bpftool/vmlinux.h
fi
RPM_VMLINUX_H=vmlinux.h
%endif

@ -734,7 +738,7 @@ popd > /dev/null @@ -734,7 +738,7 @@ popd > /dev/null

%if %{with_bpftool}
pushd tools/bpf/bpftool > /dev/null
%{bpftool_make} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install
%{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT VMLINUX_H="${RPM_VMLINUX_H}" prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install
popd > /dev/null
%endif


Loading…
Cancel
Save