From 68586118c83264bbcae3d2bfbd72f9d2f0298e7662f4144b3b59319b8eb96532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Wed, 29 Jan 2020 07:46:20 +0000 Subject: [PATCH] - Fix build errors on old distributions * kexec-tools-video-capability.patch * kexec-tools-SYS_getrandom.patch OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=119 --- kexec-tools-SYS_getrandom.patch | 25 +++++++++++++++++++++++++ kexec-tools-video-capability.patch | 25 +++++++++++++++++++++++++ kexec-tools.changes | 7 +++++++ kexec-tools.spec | 4 ++++ 4 files changed, 61 insertions(+) create mode 100644 kexec-tools-SYS_getrandom.patch create mode 100644 kexec-tools-video-capability.patch diff --git a/kexec-tools-SYS_getrandom.patch b/kexec-tools-SYS_getrandom.patch new file mode 100644 index 0000000..e302f7f --- /dev/null +++ b/kexec-tools-SYS_getrandom.patch @@ -0,0 +1,25 @@ +From: Petr Tesarik +Subject: Define SYS_getrandom if needed +Upstream: never, build fix for SLE12 + +SLE12 did not provide a definition for SYS_getrandom. + +Signed-off-by: Petr Tesarik +--- + kexec/arch/arm64/kexec-arm64.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/kexec/arch/arm64/kexec-arm64.c ++++ b/kexec/arch/arm64/kexec-arm64.c +@@ -34,6 +34,11 @@ + #include "mem_regions.h" + #include "arch/options.h" + ++#ifndef __NR_getrandom ++#define __NR_getrandom 278 ++__SYSCALL(__NR_getrandom, sys_getrandom) ++#endif ++ + #define ROOT_NODE_ADDR_CELLS_DEFAULT 1 + #define ROOT_NODE_SIZE_CELLS_DEFAULT 1 + diff --git a/kexec-tools-video-capability.patch b/kexec-tools-video-capability.patch new file mode 100644 index 0000000..bcf090d --- /dev/null +++ b/kexec-tools-video-capability.patch @@ -0,0 +1,25 @@ +From: Petr Tesarik +Subject: Make sure VIDEO_CAPABILITY_64BIT_BASE is defined +Upstream: never, build fix for SLE12 + +SLE12 did not provide a definition for VIDEO_CAPABILITY_64BIT_BASE +in . + +Signed-off-by: Petr Tesarik +--- + kexec/arch/i386/x86-linux-setup.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/kexec/arch/i386/x86-linux-setup.c ++++ b/kexec/arch/i386/x86-linux-setup.c +@@ -37,6 +37,10 @@ + #include "x86-linux-setup.h" + #include "../../kexec/kexec-syscall.h" + ++#ifndef VIDEO_CAPABILITY_64BIT_BASE ++#define VIDEO_CAPABILITY_64BIT_BASE (1 << 1) /* Frame buffer base is 64-bit */ ++#endif ++ + void init_linux_parameters(struct x86_linux_param_header *real_mode) + { + /* Fill in the values that are usually provided by the kernel. */ diff --git a/kexec-tools.changes b/kexec-tools.changes index 0514208..8a17ebf 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 29 07:35:18 UTC 2020 - Petr Tesařík + +- Fix build errors on old distributions + * kexec-tools-video-capability.patch + * kexec-tools-SYS_getrandom.patch + ------------------------------------------------------------------- Fri Jan 10 06:02:42 UTC 2020 - Chester Lin diff --git a/kexec-tools.spec b/kexec-tools.spec index ddeab57..54849cd 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -34,6 +34,8 @@ Patch5: %{name}-add-variant-helper-functions.patch Patch6: %{name}-arm64-kexec-allocate-memory-space-avoiding-reserved-regions.patch Patch7: %{name}-arm64-kdump-deal-with-resource-entries-in-proc-iomem.patch Patch8: %{name}-build-multiboot2-for-i386.patch +Patch9: %{name}-video-capability.patch +Patch10: %{name}-SYS_getrandom.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: systemd-rpm-macros @@ -64,6 +66,8 @@ the loaded kernel after it panics. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 %build autoreconf -fvi