From 95eef6b2919fcbab61308aa8a6a5978b617e1cca3ad33337ae5cc089dae957fb Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 25 Nov 2008 14:46:57 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kexec-tools?expand=0&rev=64 --- kexec-tools-proc-iomem-xen.diff | 30 ++++++++++++++++++++++++++++++ kexec-tools-xen-static.diff | 25 +++++++++++++++++++++++++ kexec-tools.changes | 9 +++++++++ kexec-tools.spec | 16 +++++++++++++++- 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 kexec-tools-proc-iomem-xen.diff create mode 100644 kexec-tools-xen-static.diff diff --git a/kexec-tools-proc-iomem-xen.diff b/kexec-tools-proc-iomem-xen.diff new file mode 100644 index 0000000..a154117 --- /dev/null +++ b/kexec-tools-proc-iomem-xen.diff @@ -0,0 +1,30 @@ +From: Bernhard Walle +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 + +--- + 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); diff --git a/kexec-tools-xen-static.diff b/kexec-tools-xen-static.diff new file mode 100644 index 0000000..e59b420 --- /dev/null +++ b/kexec-tools-xen-static.diff @@ -0,0 +1,25 @@ +From: Bernhard Walle +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 + +--- + 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 + diff --git a/kexec-tools.changes b/kexec-tools.changes index 0f7393c..2aedd82 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -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 diff --git a/kexec-tools.spec b/kexec-tools.spec index 4e5fa1a..dbe38f4 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -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