- added lguest-update,perf-update patches (adjust lguest and perf/libunwind to current headers)
--- /dev/null
+--- linux-4.12/tools/lguest/lguest.c.orig 2017-07-03 01:07:02.000000000 +0200
++++ linux-4.12/tools/lguest/lguest.c 2017-07-13 17:27:08.446483634 +0200
+@@ -77,6 +77,7 @@
+ #include <linux/virtio_ring.h>
+ #include "../../include/uapi/linux/virtio_pci.h"
+ #include <asm/bootparam.h>
++#include <asm/e820.h>
+ #include "../../include/linux/lguest_launcher.h"
+
+ #define BRIDGE_PFX "bridge:"
+@@ -3339,7 +3340,7 @@
+ * simple, single region.
+ */
+ boot->e820_entries = 1;
+- boot->e820_table[0] = ((struct e820_entry) { 0, mem, E820_TYPE_RAM });
++ boot->e820_table[0] = ((struct boot_e820_entry) { 0, mem, E820_RAM });
+ /*
+ * The boot header contains a command line pointer: we put the command
+ * line after the boot header.
--- /dev/null
+--- linux-4.12/tools/perf/util/libunwind/x86_32.c.orig 2017-07-03 01:07:02.000000000 +0200
++++ linux-4.12/tools/perf/util/libunwind/x86_32.c 2017-07-13 18:03:18.986458842 +0200
+@@ -25,6 +25,7 @@
+ #include "libunwind-x86.h"
+ #include <../../../../arch/x86/include/uapi/asm/perf_regs.h>
+
++#define EINVAL 22
+ /* HAVE_ARCH_X86_64_SUPPORT is used in'arch/x86/util/unwind-libunwind.c'
+ * for x86_32, we undef it to compile code for x86_32 only.
+ */
%undefine with_multilib
%endif
-%define basever 4.11
-%define postver .2
+%define basever 4.12
+%define postver .1
Summary: Assortment of tools for the Linux kernel
Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa
Name: kernel-tools
Version: %{basever}%{postver}
-Release: 4
+Release: 1
License: GPL v2
Group: Applications/System
Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
-# Source0-md5: 251a5deee0fa6daf3f356b1bbda9eab8
+# Source0-md5: fc454157e2d024d401a60905d6481c6b
Source1: cpupower.service
Source2: cpupower.config
%if "%{postver}" != ".0"
Patch0: https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5: e0aae229c24dbc16021617de6955f8b8
+# Patch0-md5: fab3dcd3b5a99d959bde7cde2e5cedb8
%endif
Patch1: x32.patch
+Patch2: %{name}-lguest-update.patch
+Patch3: %{name}-perf-update.patch
URL: http://www.kernel.org/
BuildRequires: bison
BuildRequires: flex
%endif
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
%{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile