This commit is contained in:
parent
2c54c70459
commit
95eef6b291
30
kexec-tools-proc-iomem-xen.diff
Normal file
30
kexec-tools-proc-iomem-xen.diff
Normal file
@ -0,0 +1,30 @@
|
||||
From: Bernhard Walle <bwalle@suse.de>
|
||||
Subject: [PATCH] Don't use /sys/firmware/memmap with Xen
|
||||
|
||||
On Xen (Dom0) kernels, the /sys/firmware/memmap is wrong. Just use the old
|
||||
/proc/iomem there.
|
||||
|
||||
|
||||
Signed-off-by: Bernhard Walle <bwalle@suse.de>
|
||||
|
||||
---
|
||||
kexec/arch/i386/kexec-x86-common.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/kexec/arch/i386/kexec-x86-common.c
|
||||
+++ b/kexec/arch/i386/kexec-x86-common.c
|
||||
@@ -147,7 +147,13 @@ int get_memory_ranges(struct memory_rang
|
||||
{
|
||||
int ret, i;
|
||||
|
||||
- if (have_sys_firmware_memmap())
|
||||
+ /*
|
||||
+ * When using Xen, /sys/firmware/memmap (i.e., the E820 map) is
|
||||
+ * wrong, it just provides one large memory are and that cannot
|
||||
+ * be used for Kdump. Use always the /proc/iomem interface there
|
||||
+ * even if we have /sys/firmware/memmap.
|
||||
+ */
|
||||
+ if (!xen_present() && have_sys_firmware_memmap())
|
||||
ret = get_memory_ranges_sysfs(range, ranges);
|
||||
else
|
||||
ret = get_memory_ranges_proc_iomem(range, ranges);
|
25
kexec-tools-xen-static.diff
Normal file
25
kexec-tools-xen-static.diff
Normal file
@ -0,0 +1,25 @@
|
||||
From: Bernhard Walle <bwalle@suse.de>
|
||||
Subject: [PATCH] Link xenctrl statically
|
||||
|
||||
This patch just links the xenctrl library statically. That allows
|
||||
to use Xen support without a runtime dependency to the Xen package.
|
||||
|
||||
|
||||
Signed-off-by: Bernhard Walle <bwalle@suse.de>
|
||||
|
||||
---
|
||||
configure.ac | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -128,7 +128,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"]],
|
||||
AC_MSG_NOTICE([Xen support disabled])))
|
||||
fi
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 24 23:00:59 CET 2008 - bwalle@suse.de
|
||||
|
||||
- Read memory map from /proc/iomem instead of /sys/firmware/memmap
|
||||
when running under Xen.
|
||||
- Build against libxenctl on i386 and x86-64 but link statically
|
||||
to avoid runtime dependencies that would exist even on non-Xen
|
||||
systems.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 14 10:54:01 CET 2008 - bwalle@suse.de
|
||||
|
||||
|
@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq
|
||||
AutoReqProv: on
|
||||
Summary: Tools for fast kernel loading
|
||||
Version: 2.0.0
|
||||
Release: 45
|
||||
Release: 46
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: kexec-bootloader
|
||||
Source2: kexec-bootloader.8.txt
|
||||
@ -48,12 +48,17 @@ Patch9: %{name}-device-tree-return.diff
|
||||
Patch10: %{name}-ppc-check-flags.diff
|
||||
Patch11: %{name}-no-vga-output.diff
|
||||
Patch12: %{name}-spell.diff
|
||||
Patch13: %{name}-xen-static.diff
|
||||
Patch14: %{name}-proc-iomem-xen.diff
|
||||
Url: http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: zlib-devel
|
||||
%if 0%{?suse_version} >= 1110
|
||||
BuildRequires: asciidoc
|
||||
%endif
|
||||
%ifarch %ix86 x86_64
|
||||
BuildRequires: xen-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
Kexec is a user space utility for loading another kernel and asking the
|
||||
@ -87,12 +92,15 @@ Authors:
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
|
||||
%build
|
||||
%{?suse_update_config -f}
|
||||
%ifarch ia64
|
||||
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-fstack-protector//')
|
||||
%endif
|
||||
autoreconf -f
|
||||
CFLAGS=$RPM_OPT_FLAGS BUILD_CFLAGS=$RPM_OPT_FLAGS \
|
||||
./configure \
|
||||
--prefix=/ \
|
||||
@ -153,6 +161,12 @@ install -m 0755 kexec.init ${RPM_BUILD_ROOT}/etc/init.d/kexec
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 24 2008 bwalle@suse.de
|
||||
- Read memory map from /proc/iomem instead of /sys/firmware/memmap
|
||||
when running under Xen.
|
||||
- Build against libxenctl on i386 and x86-64 but link statically
|
||||
to avoid runtime dependencies that would exist even on non-Xen
|
||||
systems.
|
||||
* Fri Nov 14 2008 bwalle@suse.de
|
||||
- Fix spell error in help output (bnc#444714).
|
||||
* Sat Nov 01 2008 bwalle@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user