Accepting request 137920 from Kernel:kdump
(forwarded request 137919 from jones_tony) OBS-URL: https://build.opensuse.org/request/show/137920 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kexec-tools?expand=0&rev=90
This commit is contained in:
commit
421617d6f8
@ -1,35 +0,0 @@
|
||||
From 8880e5b8a295788dcae8f5cc038de92cd97b6807 Mon Sep 17 00:00:00 2001
|
||||
From: Simon Horman <horms@verge.net.au>
|
||||
Date: Wed, 30 Mar 2011 08:34:39 +0900
|
||||
Subject: build: Pass --no-undefined as a linker option
|
||||
Git-commit: 8880e5b8a295788dcae8f5cc038de92cd97b6807
|
||||
Patch-mainline: yes
|
||||
|
||||
gcc-4.6 does not accept --no-undefined as a compiler option
|
||||
|
||||
Reported-by: Civil <civil.over@gmail.com>
|
||||
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Signed-off-by: Simon Horman <horms@verge.net.au>
|
||||
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
||||
---
|
||||
purgatory/Makefile | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/purgatory/Makefile b/purgatory/Makefile
|
||||
index ea0c19a..ee1679c 100644
|
||||
--- a/purgatory/Makefile
|
||||
+++ b/purgatory/Makefile
|
||||
@@ -56,8 +56,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
|
||||
-I$(srcdir)/include \
|
||||
-I$(shell $(CC) -print-file-name=include)
|
||||
$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
|
||||
- --no-undefined -nostartfiles -nostdlib -nodefaultlibs \
|
||||
- -e purgatory_start -r
|
||||
+ -Wl,--no-undefined -nostartfiles -nostdlib \
|
||||
+ -nodefaultlibs -e purgatory_start -r
|
||||
|
||||
$(PURGATORY): $(PURGATORY_OBJS)
|
||||
$(MKDIR) -p $(@D)
|
||||
--
|
||||
1.7.4.2
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9acb94dcf4cee2a04da18112a6e5732cdcbe98f893039a93582d88307e0103f
|
||||
size 305961
|
3
kexec-tools-2.0.3.tar.bz2
Normal file
3
kexec-tools-2.0.3.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:936c89c7229928fe165571c81a13c2837a73d8747779331ef11606bb1f8c8d55
|
||||
size 300199
|
26
kexec-tools-disable-test.patch
Normal file
26
kexec-tools-disable-test.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From: Tony Jones <tonyj@suse.de>
|
||||
Subject: Disable kexec_test
|
||||
|
||||
Disable kexec_test. It is not required in released product (matching latest
|
||||
Fedora). Also one less file for usr_merge
|
||||
|
||||
---
|
||||
Makefile.in | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -176,8 +176,11 @@ PSRCS:=$(foreach s, $(SRCS), $(PACKAGE_N
|
||||
PGSRCS:=$(foreach s, $(GENERATED_SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s))
|
||||
|
||||
MAN_PAGES:=$(KEXEC_MANPAGE) $(KDUMP_MANPAGE) $(VMCORE_DMESG_MANPAGE)
|
||||
-BINARIES_i386:=$(KEXEC_TEST)
|
||||
-BINARIES_x86_64:=$(KEXEC_TEST)
|
||||
+# Dont' build kexec_test
|
||||
+#BINARIES_i386:=$(KEXEC_TEST)
|
||||
+#BINARIES_x86_64:=$(KEXEC_TEST)
|
||||
+BINARIES_i386:=
|
||||
+BINARIES_x86_64:=
|
||||
BINARIES:=$(KEXEC) $(KDUMP) $(VMCORE_DMESG) $(BINARIES_$(ARCH))
|
||||
|
||||
TARGETS:=$(BINARIES) $(MAN_PAGES)
|
18
kexec-tools-fix-makefile-binaries.patch
Normal file
18
kexec-tools-fix-makefile-binaries.patch
Normal file
@ -0,0 +1,18 @@
|
||||
From: Tony Jones
|
||||
Date: Tue Oct 9 17:35:14 2012
|
||||
Subject: kexec: fix Makefile.in binaries_arch
|
||||
Git-commit: aaedd5321b239a919a080da84ed5c96fb4481ed2
|
||||
|
||||
--- a/Makefile.in 2011-10-03 00:56:38.000000000 +0200
|
||||
+++ b/Makefile.in 2012-09-26 18:36:44.232086000 +0200
|
||||
@@ -176,8 +176,8 @@
|
||||
PGSRCS:=$(foreach s, $(GENERATED_SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s))
|
||||
|
||||
MAN_PAGES:=$(KEXEC_MANPAGE) $(KDUMP_MANPAGE) $(VMCORE_DMESG_MANPAGE)
|
||||
-BINARIES_i386:=$(KEXEC_TEST) $(KEXEC_TEST)
|
||||
-BINARIES_x86_64:=$(KEXEC) $(KDUMP) $(BINARIES_$(ARCH))
|
||||
+BINARIES_i386:=$(KEXEC_TEST)
|
||||
+BINARIES_x86_64:=$(KEXEC_TEST)
|
||||
BINARIES:=$(KEXEC) $(KDUMP) $(VMCORE_DMESG) $(BINARIES_$(ARCH))
|
||||
|
||||
TARGETS:=$(BINARIES) $(MAN_PAGES)
|
@ -1,133 +0,0 @@
|
||||
From: Olaf Hering <ohering@novell.com>
|
||||
References: bnc#658413, bnc#694863
|
||||
Subject: xen_present() should be named is_xen_pv() (includes also dom0).
|
||||
|
||||
A hvm guest is like physical hardware and should not need special handling.
|
||||
Use code from xen-detect.c instead of stat() to distinguish hvm from pv because
|
||||
xenfs in a pv_ops kernel generates /proc/xen/capabilities unconditionally.
|
||||
|
||||
---
|
||||
kexec/crashdump-xen.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 95 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: kexec-tools-2.0.2/kexec/crashdump-xen.c
|
||||
===================================================================
|
||||
--- kexec-tools-2.0.2.orig/kexec/crashdump-xen.c
|
||||
+++ kexec-tools-2.0.2/kexec/crashdump-xen.c
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
+#include <setjmp.h>
|
||||
+#include <signal.h>
|
||||
#include "kexec.h"
|
||||
#include "crashdump.h"
|
||||
#include "kexec-syscall.h"
|
||||
@@ -25,14 +27,102 @@ struct crash_note_info {
|
||||
unsigned long length;
|
||||
};
|
||||
|
||||
-int xen_phys_cpus = 0;
|
||||
-struct crash_note_info *xen_phys_notes;
|
||||
+static int xen_phys_cpus;
|
||||
+static struct crash_note_info *xen_phys_notes;
|
||||
|
||||
-int xen_present(void)
|
||||
+/* based on code from xen-detect.c */
|
||||
+static int is_dom0;
|
||||
+#if defined(__i386__) || defined(__x86_64__)
|
||||
+static jmp_buf xen_sigill_jmp;
|
||||
+void xen_sigill_handler(int sig)
|
||||
+{
|
||||
+ longjmp(xen_sigill_jmp, 1);
|
||||
+}
|
||||
+
|
||||
+static void xen_cpuid(uint32_t idx, uint32_t *regs, int pv_context)
|
||||
+{
|
||||
+#ifdef __i386__
|
||||
+ /* Use the stack to avoid reg constraint failures with some gcc flags */
|
||||
+ asm volatile (
|
||||
+ "push %%eax; push %%ebx; push %%ecx; push %%edx\n\t"
|
||||
+ "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid\n\t"
|
||||
+ "mov %%eax,(%2); mov %%ebx,4(%2)\n\t"
|
||||
+ "mov %%ecx,8(%2); mov %%edx,12(%2)\n\t"
|
||||
+ "pop %%edx; pop %%ecx; pop %%ebx; pop %%eax\n\t"
|
||||
+ : : "a" (idx), "c" (pv_context), "S" (regs) : "memory" );
|
||||
+#else
|
||||
+ asm volatile (
|
||||
+ "test %5,%5 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid\n\t"
|
||||
+ : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
|
||||
+ : "0" (idx), "1" (pv_context), "2" (0) );
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static int check_for_xen(int pv_context)
|
||||
{
|
||||
- struct stat buf;
|
||||
+ uint32_t regs[4];
|
||||
+ char signature[13];
|
||||
+ uint32_t base;
|
||||
+
|
||||
+ for (base = 0x40000000; base < 0x40010000; base += 0x100)
|
||||
+ {
|
||||
+ xen_cpuid(base, regs, pv_context);
|
||||
+
|
||||
+ *(uint32_t *)(signature + 0) = regs[1];
|
||||
+ *(uint32_t *)(signature + 4) = regs[2];
|
||||
+ *(uint32_t *)(signature + 8) = regs[3];
|
||||
+ signature[12] = '\0';
|
||||
+
|
||||
+ if (strcmp("XenVMMXenVMM", signature) == 0 && regs[0] >= (base + 2))
|
||||
+ goto found;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+found:
|
||||
+ xen_cpuid(base + 1, regs, pv_context);
|
||||
+ return regs[0];
|
||||
+}
|
||||
|
||||
- return stat("/proc/xen", &buf) == 0;
|
||||
+static int xen_detect_pv_guest(void)
|
||||
+{
|
||||
+ struct sigaction act, oldact;
|
||||
+ int is_pv = -1;
|
||||
+
|
||||
+ if (setjmp(xen_sigill_jmp))
|
||||
+ return is_pv;
|
||||
+
|
||||
+ memset(&act, 0, sizeof(act));
|
||||
+ act.sa_handler = xen_sigill_handler;
|
||||
+ sigemptyset (&act.sa_mask);
|
||||
+ if (sigaction(SIGILL, &act, &oldact))
|
||||
+ return is_pv;
|
||||
+ if (check_for_xen(1))
|
||||
+ is_pv = 1;
|
||||
+ sigaction(SIGILL, &oldact, NULL);
|
||||
+ return is_pv;
|
||||
+}
|
||||
+#else
|
||||
+static int xen_detect_pv_guest(void)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * Return 1 if its a PV guest.
|
||||
+ * This includes dom0, which is the only PV guest where kexec/kdump works.
|
||||
+ * HVM guests have to be handled as native hardware.
|
||||
+ */
|
||||
+int xen_present(void)
|
||||
+{
|
||||
+ if (!is_dom0) {
|
||||
+ if (access("/proc/xen", F_OK) == 0)
|
||||
+ is_dom0 = xen_detect_pv_guest();
|
||||
+ else
|
||||
+ is_dom0 = -1;
|
||||
+ }
|
||||
+ return is_dom0 > 0;
|
||||
}
|
||||
|
||||
unsigned long xen_architecture(struct crash_elf_info *elf_info)
|
@ -8,17 +8,19 @@ to use Xen support without a runtime dependency to the Xen package.
|
||||
Signed-off-by: Bernhard Walle <bwalle@suse.de>
|
||||
|
||||
================================================================================
|
||||
Index: kexec-tools-2.0.2/configure.ac
|
||||
===================================================================
|
||||
--- kexec-tools-2.0.2.orig/configure.ac
|
||||
+++ kexec-tools-2.0.2/configure.ac
|
||||
@@ -155,7 +155,8 @@ fi
|
||||
---
|
||||
configure.ac | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -160,7 +160,8 @@ fi
|
||||
dnl find Xen control stack libraries
|
||||
if test "$with_xen" = yes ; then
|
||||
AC_CHECK_HEADER(xenctrl.h,
|
||||
- AC_CHECK_LIB(xenctrl, xc_version, ,
|
||||
+ AC_CHECK_LIB(xenctrl, xc_version,
|
||||
+ [[LIBS="$LIBS -Wl,-Bstatic -lxenctrl -Wl,-Bdynamic"]],
|
||||
+ [[LIBS="$LIBS -Wl,-Bstatic -lxenctrl -Wl,-Bdynamic"]]
|
||||
AC_MSG_NOTICE([Xen support disabled])))
|
||||
fi
|
||||
|
||||
if test "$ac_cv_lib_xenctrl_xc_version" = yes ; then
|
||||
AC_CHECK_FUNCS(xc_get_machine_memory_map)
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 11 23:10:42 UTC 2012 - tonyj@suse.com
|
||||
|
||||
- Update to kexec 2.0.3. Drop unneeded patches.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 14 16:23:58 CEST 2012 - ohering@suse.de
|
||||
|
||||
|
@ -26,19 +26,19 @@ PreReq: %insserv_prereq %fillup_prereq
|
||||
Summary: Tools for fast kernel loading
|
||||
License: GPL-2.0+
|
||||
Group: System/Kernel
|
||||
Version: 2.0.2
|
||||
Version: 2.0.3
|
||||
Release: 0
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: kexec-bootloader
|
||||
Source2: kexec-bootloader.8.txt
|
||||
Source3: kexec.init
|
||||
Source4: %{name}-%{version}-rpmlintrc
|
||||
Patch0: %{name}-no-vga-output.diff
|
||||
Patch1: %{name}-xen-static.diff
|
||||
Patch2: gcc-no-undefined-flag-fix.patch
|
||||
Patch3: kexec-fix-strncat.patch
|
||||
Patch4: kexec-tools-xen-present.diff
|
||||
Patch5: kexec-tools-xen-balloon-up.patch
|
||||
Patch0: %{name}-no-vga-output.patch
|
||||
Patch1: %{name}-xen-static.patch
|
||||
Patch2: %{name}-fix-strncat.patch
|
||||
Patch3: %{name}-xen-balloon-up.patch
|
||||
Patch4: %{name}-fix-makefile-binaries.patch
|
||||
Patch5: %{name}-disable-test.patch
|
||||
Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#!BuildIgnore: fop
|
||||
@ -116,10 +116,6 @@ install -m 0755 kexec.init ${RPM_BUILD_ROOT}/etc/init.d/kexec
|
||||
%endif
|
||||
#UsrMerge
|
||||
mkdir -p $RPM_BUILD_ROOT/sbin
|
||||
%ifarch %ix86 x86_64
|
||||
mkdir -p $RPM_BUILD_ROOT/%_lib
|
||||
ln -s %{_libdir}/kexec-tools $RPM_BUILD_ROOT/%_lib
|
||||
%endif
|
||||
ln -s %{_sbindir}/kdump $RPM_BUILD_ROOT/sbin
|
||||
ln -s %{_sbindir}/kexec $RPM_BUILD_ROOT/sbin
|
||||
#EndUsrMerge
|
||||
@ -128,13 +124,6 @@ ln -s %{_sbindir}/kexec $RPM_BUILD_ROOT/sbin
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
%if 0%{?suse_version} >= 1110
|
||||
|
||||
#UsrMerge
|
||||
%pre
|
||||
if [ -d /%_lib/kexec-tools ];then
|
||||
rm -rf /%_lib/kexec-tools
|
||||
fi
|
||||
#EndUsrMerge
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv -n kexec kexec}
|
||||
%endif
|
||||
@ -152,9 +141,6 @@ fi
|
||||
%doc %{_mandir}/man*/*
|
||||
#UsrMerge
|
||||
/sbin/*
|
||||
%ifarch %ix86 x86_64
|
||||
/%_lib/kexec-tools*
|
||||
%endif
|
||||
#EndUsrMerge
|
||||
%{_sbindir}
|
||||
%if 0%{?suse_version} >= 1110
|
||||
@ -162,8 +148,5 @@ fi
|
||||
/etc/init.d/kexec
|
||||
%config /etc/init.d/kexec
|
||||
%endif
|
||||
%ifarch %ix86 x86_64
|
||||
%{_libdir}/kexec-tools*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user