- removed obsolete binutils-2.34 patch
- disable runqslower bpf utility for now (requires kernel image to generate vmlinux.h file)
+++ /dev/null
---- linux-5.5/tools/perf/util/srcline.c~ 2020-01-27 01:23:03.000000000 +0100
-+++ linux-5.5/tools/perf/util/srcline.c 2020-03-24 22:05:05.941464830 +0100
-@@ -197,12 +197,12 @@
- if (a2l->found)
- return;
-
-- if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)
-+ if ((bfd_section_flags(section) & SEC_ALLOC) == 0)
- return;
-
- pc = a2l->addr;
-- vma = bfd_get_section_vma(abfd, section);
-- size = bfd_get_section_size(section);
-+ vma = bfd_section_vma(section);
-+ size = bfd_section_size(section);
-
- if (pc < vma || pc >= vma + size)
- return;
# - add -n python-perf?
# - add bcond to disable building docs (perf docs)
# - install of perf links perf binary again
# - add -n python-perf?
# - add bcond to disable building docs (perf docs)
# - install of perf links perf binary again
+# - build runqslower (needs vmlinux with BPF section)
+#
# Conditional build:
%bcond_without verbose # verbose build (V=1)
%bcond_without cpupower # cpupower tools
# Conditional build:
%bcond_without verbose # verbose build (V=1)
%bcond_without cpupower # cpupower tools
%bcond_without gtk # GTK+ 2.x perf support
%bcond_without libunwind # libunwind perf support
%bcond_without multilib # multilib perf support
%bcond_without gtk # GTK+ 2.x perf support
%bcond_without libunwind # libunwind perf support
%bcond_without multilib # multilib perf support
+%bcond_with runqslower # runqslower bpf tool
%bcond_without usbip # usbip utils
%ifnarch %{x8664}
%undefine with_multilib
%endif
%bcond_without usbip # usbip utils
%ifnarch %{x8664}
%undefine with_multilib
%endif
-%define basever 5.5
-%define postver .11
+%define basever 5.6
+%define postver .5
Summary: Assortment of tools for the Linux kernel
Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
Name: kernel-tools
Summary: Assortment of tools for the Linux kernel
Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
Name: kernel-tools
License: GPL v2
Group: Applications/System
Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
License: GPL v2
Group: Applications/System
Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
-# Source0-md5: 0a78b1dc48dc032fe505b170c1b92339
+# Source0-md5: 7b9199ec5fa563ece9ed585ffb17798f
Source1: cpupower.service
Source2: cpupower.config
%if "%{postver}" != ".0"
Patch0: https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
Source1: cpupower.service
Source2: cpupower.config
%if "%{postver}" != ".0"
Patch0: https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
-# Patch0-md5: bbff86f46032a3af00b2755e974df0d3
+# Patch0-md5: 7055ff82e7e6a557c04831a191ed14b3
%endif
Patch1: x32.patch
Patch2: regex.patch
Patch3: %{name}-perf-update.patch
Patch4: %{name}-perf-gtk2.patch
%endif
Patch1: x32.patch
Patch2: regex.patch
Patch3: %{name}-perf-update.patch
Patch4: %{name}-perf-gtk2.patch
-Patch5: binutils-2.34.patch
URL: https://www.kernel.org/
BuildRequires: bison
BuildRequires: docutils
URL: https://www.kernel.org/
BuildRequires: bison
BuildRequires: docutils
BuildRequires: gcc-multilib-32
BuildRequires: gcc-multilib-x32
%endif
BuildRequires: gcc-multilib-32
BuildRequires: gcc-multilib-x32
%endif
+# for `btftool btf dump file ... format c` - requires vmlinux with BPF section
+%{?with_runqslower:BuildRequires: kernel-vmlinux >= 5.?}
%{?with_libunwind:BuildRequires: libunwind-devel >= 0.99}
BuildRequires: numactl-devel
BuildRequires: openssl-devel
%{?with_libunwind:BuildRequires: libunwind-devel >= 0.99}
BuildRequires: numactl-devel
BuildRequires: openssl-devel
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
%{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile
%{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
%{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile
# don't rebuild on make install
%{__sed} -i -e '/^\$(LIBBPF): FORCE/ s/FORCE$//' tools/bpf/bpftool/Makefile
# don't rebuild on make install
%{__sed} -i -e '/^\$(LIBBPF): FORCE/ s/FORCE$//' tools/bpf/bpftool/Makefile
+%if %{without runqslower}
+%{__sed} -i -e '/^all: / s/ runqslower//' \
+ -e '/^install: / s/ runqslower_install//' \
+ tools/bpf/Makefile
+%endif
+
%build
Wstringop=""
Waddressof=""
%build
Wstringop=""
Waddressof=""
%{__make} -C tools/bpf \
CC="%{__cc}" \
EXTRA_CFLAGS="%{rpmcflags}" \
%{__make} -C tools/bpf \
CC="%{__cc}" \
EXTRA_CFLAGS="%{rpmcflags}" \
+ %{?with_runqslower:VMLINUX_BTF=$(rpm -ql kernel-vmlinux | head -n 1)} \
%{?with_verbose:V=1}
# perf
%{?with_verbose:V=1}
# perf