Release 2.0.5-1

Rebase kexec-tools-2.0.5

Signed-off-by: WANG Chao <chaowang@redhat.com>
This commit is contained in:
WANG Chao 2014-02-07 15:58:19 +08:00
parent ad6faec56b
commit 3b9a0140cb
10 changed files with 78 additions and 562 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ makedumpfile-1.3.5.tar.gz
/makedumpfile-1.5.4.tar.gz
/kexec-tools-po-20131224.tgz
/makedumpfile-1.5.5.tar.gz
/kexec-tools-2.0.5.tar.xz

View File

@ -1,102 +0,0 @@
From 1a4e90ba221684e563bf1baf06f3547cd95e60b0 Mon Sep 17 00:00:00 2001
Message-Id: <1a4e90ba221684e563bf1baf06f3547cd95e60b0.1380267809.git.bhe@redhat.com>
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Date: Sun, 31 Mar 2013 11:12:53 +0800
Subject: [PATCH] Revert "kexec: include reserved e820 sections in crash
kernel"
This reverts commit e35aa29fb40b37bf86d980b2e19af5e01c2d2549.
This patch is based on the commit 49320340f705694e387d794f7f19d407ad9baefa
"kexec: lengthen the kernel command line image"
Since the latter commit has been reverted due to its useless, this
patch should be reverted too.
Besides, This patch also changed a kernel restriction of max segments
from 16 to 70. Though kexec-tools could have more segments, more than 16,
the kexec_load syscall will still fail for the kernel side has a restriction
of 16.
Cc: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Baoquan He <bhe@redhat.com>
---
kexec/arch/i386/crashdump-x86.c | 31 ++-----------------------------
kexec/kexec-syscall.h | 2 +-
2 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 4167e5e..e44fceb 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -247,8 +247,6 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
type = RANGE_ACPI;
} else if(memcmp(str,"ACPI Non-volatile Storage\n",26) == 0 ) {
type = RANGE_ACPI_NVS;
- } else if(memcmp(str,"reserved\n", 9) == 0 ) {
- type = RANGE_RESERVED;
} else if (memcmp(str, "GART\n", 5) == 0) {
gart_start = start;
gart_end = end;
@@ -908,27 +906,6 @@ static void get_backup_area(struct kexec_info *info,
info->backup_src_size = BACKUP_SRC_END - BACKUP_SRC_START + 1;
}
-/* Appends memmap=X$Y commandline for reserved memory to command line*/
-static int cmdline_add_memmap_reserved(char *cmdline, unsigned long start,
- unsigned long end)
-{
- int align = 1024;
- unsigned long startk, endk;
-
- if (!(end - start))
- return 0;
-
- startk = start/1024;
- endk = (end + align - 1)/1024;
- cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_RESERVED);
-
-#ifdef DEBUG
- printf("Command line after adding reserved memmap\n");
- printf("%s\n", cmdline);
-#endif
- return 0;
-}
-
/* Loads additional segments in case of a panic kernel is being loaded.
* One segment for backup region, another segment for storing elf headers
* for crash memory image.
@@ -1076,15 +1053,11 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) {
unsigned long start, end;
if ( !( mem_range[i].type == RANGE_ACPI
- || mem_range[i].type == RANGE_ACPI_NVS
- || mem_range[i].type == RANGE_RESERVED) )
+ || mem_range[i].type == RANGE_ACPI_NVS) )
continue;
start = mem_range[i].start;
end = mem_range[i].end;
- if (mem_range[i].type == RANGE_RESERVED)
- cmdline_add_memmap_reserved(mod_cmdline, start, end);
- else
- cmdline_add_memmap_acpi(mod_cmdline, start, end);
+ cmdline_add_memmap_acpi(mod_cmdline, start, end);
}
return 0;
}
diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
index f5ee992..b56cb00 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
@@ -78,7 +78,7 @@ static inline long kexec_load(void *entry, unsigned long nr_segments,
#define KEXEC_ARCH_MIPS ( 8 << 16)
#define KEXEC_ARCH_CRIS (76 << 16)
-#define KEXEC_MAX_SEGMENTS 70
+#define KEXEC_MAX_SEGMENTS 16
#ifdef __i386__
#define KEXEC_ARCH_NATIVE KEXEC_ARCH_386
--
1.8.3.1

View File

@ -1,35 +0,0 @@
From 827491661670e3d7f8edf08cce2ed0f423d710eb Mon Sep 17 00:00:00 2001
Message-Id: <827491661670e3d7f8edf08cce2ed0f423d710eb.1380270065.git.bhe@redhat.com>
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Date: Wed, 27 Mar 2013 20:42:28 +0800
Subject: [PATCH] Revert: "kexec: lengthen the kernel command line image"
This reverts commit 49320340f705694e387d794f7f19d407ad9baefa. The change
of COMMAND_LINE_SIZE cannot solve Cliff's problem since the kernel side
has the restriction, so it is useless. Let's recover the original value
defined by kernel side.
Cc: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Baoquan He <bhe@redhat.com>
---
include/x86/x86-linux.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
index 6681f9e..0949dc2 100644
--- a/include/x86/x86-linux.h
+++ b/include/x86/x86-linux.h
@@ -197,7 +197,7 @@ struct x86_linux_param_header {
uint8_t _pad8[48]; /* 0xcd0 */
struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */
/* 0xeec */
-#define COMMAND_LINE_SIZE (64*1024)
+#define COMMAND_LINE_SIZE 2048
};
struct x86_linux_faked_param_header {
--
1.8.3.1

View File

@ -1,230 +0,0 @@
From e25e6e7593cae350ecaa3fcd6d20c7de87f4c309 Mon Sep 17 00:00:00 2001
From: Yinghai Lu <yinghai@kernel.org>
Date: Fri, 22 Mar 2013 13:54:06 -0700
Subject: [PATCH] kdump, x86: Process multiple Crash kernel in /proc/iomem
Vivek found specical handling crashkernel low in not good.
We should extend kexec-tools to handle multiple Crash kernel instead.
Extend crash_reserved_mem to array instead and use
kexec_iomem_for_each_line directly. After that we can drop
crashkernel low.
-v2: fix left over calling of parse_iomem_single() found by Vivek.
Suggested-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
kexec/arch/i386/crashdump-x86.c | 107 +++++++++++++++++++++----------------
kexec/arch/i386/kexec-x86-common.c | 4 +-
kexec/kexec.h | 1 +
3 files changed, 65 insertions(+), 47 deletions(-)
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 9ab648b..4167e5e 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -188,9 +188,9 @@ static int exclude_region(int *nr_ranges, uint64_t start, uint64_t end);
static struct memory_range crash_memory_range[CRASH_MAX_MEMORY_RANGES];
/* Memory region reserved for storing panic kernel and other data. */
-static struct memory_range crash_reserved_mem;
-/* under 4G parts */
-static struct memory_range crash_reserved_low_mem;
+#define CRASH_RESERVED_MEM_NR 8
+static struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
+static int crash_reserved_mem_nr;
/* Reads the appropriate file and retrieves the SYSTEM RAM regions for whom to
* create Elf headers. Keeping it separate from get_memory_ranges() as
@@ -207,7 +207,7 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
int kexec_flags, unsigned long lowmem_limit)
{
const char *iomem = proc_iomem();
- int memory_ranges = 0, gart = 0;
+ int memory_ranges = 0, gart = 0, i;
char line[MAX_LINE];
FILE *fp;
unsigned long long start, end;
@@ -268,29 +268,28 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
}
fclose(fp);
if (kexec_flags & KEXEC_PRESERVE_CONTEXT) {
- int i;
for (i = 0; i < memory_ranges; i++) {
if (crash_memory_range[i].end > 0x0009ffff) {
- crash_reserved_mem.start = \
+ crash_reserved_mem[0].start = \
crash_memory_range[i].start;
break;
}
}
- if (crash_reserved_mem.start >= mem_max) {
+ if (crash_reserved_mem[0].start >= mem_max) {
fprintf(stderr, "Too small mem_max: 0x%llx.\n",
mem_max);
return -1;
}
- crash_reserved_mem.end = mem_max;
- crash_reserved_mem.type = RANGE_RAM;
+ crash_reserved_mem[0].end = mem_max;
+ crash_reserved_mem[0].type = RANGE_RAM;
+ crash_reserved_mem_nr = 1;
}
- if (exclude_region(&memory_ranges, crash_reserved_mem.start,
- crash_reserved_mem.end) < 0)
- return -1;
- if (crash_reserved_low_mem.start &&
- exclude_region(&memory_ranges, crash_reserved_low_mem.start,
- crash_reserved_low_mem.end) < 0)
- return -1;
+
+ for (i = 0; i < crash_reserved_mem_nr; i++)
+ if (exclude_region(&memory_ranges, crash_reserved_mem[i].start,
+ crash_reserved_mem[i].end) < 0)
+ return -1;
+
if (gart) {
/* exclude GART region if the system has one */
if (exclude_region(&memory_ranges, gart_start, gart_end) < 0)
@@ -351,9 +350,10 @@ static int get_crash_memory_ranges_xen(struct memory_range **range,
qsort(*range, *ranges, sizeof(struct memory_range), compare_ranges);
- if (exclude_region(ranges, crash_reserved_mem.start,
- crash_reserved_mem.end) < 0)
- goto err;
+ for (i = 0; i < crash_reserved_mem_nr; i++)
+ if (exclude_region(ranges, crash_reserved_mem[i].start,
+ crash_reserved_mem[i].end) < 0)
+ goto err;
ret = 0;
@@ -434,9 +434,10 @@ static int get_crash_memory_ranges_xen(struct memory_range **range,
qsort(*range, *ranges, sizeof(struct memory_range), compare_ranges);
- if (exclude_region(ranges, crash_reserved_mem.start,
- crash_reserved_mem.end) < 0)
- goto err;
+ for (i = 0; i < crash_reserved_mem_nr; i++)
+ if (exclude_region(ranges, crash_reserved_mem[i].start,
+ crash_reserved_mem[i].end) < 0)
+ goto err;
ret = 0;
@@ -1014,15 +1015,10 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
memmap_p = xmalloc(sz);
memset(memmap_p, 0, sz);
add_memmap(memmap_p, info->backup_src_start, info->backup_src_size);
- sz = crash_reserved_mem.end - crash_reserved_mem.start +1;
- if (add_memmap(memmap_p, crash_reserved_mem.start, sz) < 0) {
- return ENOCRASHKERNEL;
- }
-
- if (crash_reserved_low_mem.start) {
- sz = crash_reserved_low_mem.end - crash_reserved_low_mem.start
- +1;
- add_memmap(memmap_p, crash_reserved_low_mem.start, sz);
+ for (i = 0; i < crash_reserved_mem_nr; i++) {
+ sz = crash_reserved_mem[i].end - crash_reserved_mem[i].start +1;
+ if (add_memmap(memmap_p, crash_reserved_mem[i].start, sz) < 0)
+ return ENOCRASHKERNEL;
}
/* Create a backup region segment to store backup data*/
@@ -1093,25 +1089,46 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
return 0;
}
-int is_crashkernel_mem_reserved(void)
+int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end)
{
- uint64_t start, end;
+ int i, idx = -1;
+ unsigned long sz_max = 0, sz;
- if (parse_iomem_single("Crash kernel\n", &start, &end) || start == end)
- return 0;
+ if (!crash_reserved_mem_nr)
+ return -1;
- crash_reserved_mem.start = start;
- crash_reserved_mem.end = end;
- crash_reserved_mem.type = RANGE_RAM;
+ for (i = crash_reserved_mem_nr - 1; i >= 0; i--) {
+ sz = crash_reserved_mem[i].end - crash_reserved_mem[i].start +1;
+ if (sz <= sz_max)
+ continue;
+ sz_max = sz;
+ idx = i;
+ }
+
+ *start = crash_reserved_mem[idx].start;
+ *end = crash_reserved_mem[idx].end;
+
+ return 0;
+}
- /* If there is no Crash low kernel, still can go on */
- if (parse_iomem_single("Crash kernel low\n", &start, &end) ||
- start == end)
+static int crashkernel_mem_callback(void *UNUSED(data), int nr,
+ char *UNUSED(str),
+ unsigned long base,
+ unsigned long length)
+{
+ if (nr >= CRASH_RESERVED_MEM_NR)
return 1;
- crash_reserved_low_mem.start = start;
- crash_reserved_low_mem.end = end;
- crash_reserved_low_mem.type = RANGE_RAM;
+ crash_reserved_mem[nr].start = base;
+ crash_reserved_mem[nr].end = base + length - 1;
+ crash_reserved_mem[nr].type = RANGE_RAM;
+ return 0;
+}
+
+int is_crashkernel_mem_reserved(void)
+{
+ crash_reserved_mem_nr = kexec_iomem_for_each_line("Crash kernel\n",
+ crashkernel_mem_callback, NULL);
- return 1;
+ return !!crash_reserved_mem_nr;
}
diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
index 234823c..ed6c950 100644
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -465,9 +465,9 @@ int get_memory_ranges(struct memory_range **range, int *ranges,
!(kexec_flags & KEXEC_PRESERVE_CONTEXT)) {
uint64_t start, end;
- ret = parse_iomem_single("Crash kernel\n", &start, &end);
+ ret = get_max_crash_kernel_limit(&start, &end);
if (ret != 0) {
- fprintf(stderr, "parse_iomem_single failed.\n");
+ fprintf(stderr, "get_max_crash_kernel_limit failed.\n");
return -1;
}
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 916a24b..5ded390 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -272,6 +272,7 @@ int arch_process_options(int argc, char **argv);
int arch_compat_trampoline(struct kexec_info *info);
void arch_update_purgatory(struct kexec_info *info);
int is_crashkernel_mem_reserved(void);
+int get_max_crash_kernel_limit(uint64_t *start, uint64_t *end);
char *get_command_line(void);
int kexec_iomem_for_each_line(char *match,
--
1.8.3.1

View File

@ -1,150 +0,0 @@
From dc607e4d43308140b4cee6c4503ee71f32b827ad Mon Sep 17 00:00:00 2001
Message-Id: <dc607e4d43308140b4cee6c4503ee71f32b827ad.1380269355.git.bhe@redhat.com>
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Date: Thu, 28 Mar 2013 21:09:59 +0800
Subject: [PATCH] kexec: i386: Add cmdline_add_memmap_internal() to reduce the
code duplication
Functions:
- cmdline_add_memmap()
- cmdline_add_memmap_acpi()
- cmdline_add_memmap_reserved()
is kind of similar, So add a new function cmdline_add_memmap_internal() to
hold the common codes, reducing the duplication.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Baoquan He <bhe@redhat.com>
---
kexec/arch/i386/crashdump-x86.c | 74 ++++++++++++++++++-----------------------
1 file changed, 33 insertions(+), 41 deletions(-)
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 5462f8b..9ab648b 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -685,13 +685,40 @@ static void ultoa(unsigned long i, char *str)
}
}
+static void cmdline_add_memmap_internal(char *cmdline, unsigned long startk,
+ unsigned long endk, int type)
+{
+ int cmdlen, len;
+ char str_mmap[256], str_tmp[20];
+
+ strcpy (str_mmap, " memmap=");
+ ultoa((endk-startk), str_tmp);
+ strcat (str_mmap, str_tmp);
+
+ if (type == RANGE_RAM)
+ strcat (str_mmap, "K@");
+ else if (type == RANGE_RESERVED)
+ strcat (str_mmap, "K$");
+ else if (type == RANGE_ACPI || type == RANGE_ACPI_NVS)
+ strcat (str_mmap, "K#");
+
+ ultoa(startk, str_tmp);
+ strcat (str_mmap, str_tmp);
+ strcat (str_mmap, "K");
+ len = strlen(str_mmap);
+ cmdlen = strlen(cmdline) + len;
+ if (cmdlen > (COMMAND_LINE_SIZE - 1))
+ die("Command line overflow\n");
+ strcat(cmdline, str_mmap);
+}
+
/* Adds the appropriate memmap= options to command line, indicating the
* memory regions the new kernel can use to boot into. */
static int cmdline_add_memmap(char *cmdline, struct memory_range *memmap_p)
{
int i, cmdlen, len;
unsigned long min_sizek = 100;
- char str_mmap[256], str_tmp[20];
+ char str_mmap[256];
/* Exact map */
strcpy(str_mmap, " memmap=exactmap");
@@ -713,18 +740,7 @@ static int cmdline_add_memmap(char *cmdline, struct memory_range *memmap_p)
* up precious command line length. */
if ((endk - startk) < min_sizek)
continue;
- strcpy (str_mmap, " memmap=");
- ultoa((endk-startk), str_tmp);
- strcat (str_mmap, str_tmp);
- strcat (str_mmap, "K@");
- ultoa(startk, str_tmp);
- strcat (str_mmap, str_tmp);
- strcat (str_mmap, "K");
- len = strlen(str_mmap);
- cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
- die("Command line overflow\n");
- strcat(cmdline, str_mmap);
+ cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_RAM);
}
dbgprintf("Command line after adding memmap\n");
@@ -817,27 +833,15 @@ static enum coretype get_core_type(struct crash_elf_info *elf_info,
static int cmdline_add_memmap_acpi(char *cmdline, unsigned long start,
unsigned long end)
{
- int cmdlen, len, align = 1024;
+ int align = 1024;
unsigned long startk, endk;
- char str_mmap[256], str_tmp[20];
if (!(end - start))
return 0;
startk = start/1024;
endk = (end + align - 1)/1024;
- strcpy (str_mmap, " memmap=");
- ultoa((endk - startk), str_tmp);
- strcat (str_mmap, str_tmp);
- strcat (str_mmap, "K#");
- ultoa(startk, str_tmp);
- strcat (str_mmap, str_tmp);
- strcat (str_mmap, "K");
- len = strlen(str_mmap);
- cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
- die("Command line overflow\n");
- strcat(cmdline, str_mmap);
+ cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_ACPI);
dbgprintf("Command line after adding acpi memmap\n");
dbgprintf("%s\n", cmdline);
@@ -907,27 +911,15 @@ static void get_backup_area(struct kexec_info *info,
static int cmdline_add_memmap_reserved(char *cmdline, unsigned long start,
unsigned long end)
{
- int cmdlen, len, align = 1024;
+ int align = 1024;
unsigned long startk, endk;
- char str_mmap[256], str_tmp[20];
if (!(end - start))
return 0;
startk = start/1024;
endk = (end + align - 1)/1024;
- strcpy (str_mmap, " memmap=");
- ultoa((endk - startk), str_tmp);
- strcat (str_mmap, str_tmp);
- strcat (str_mmap, "K$");
- ultoa(startk, str_tmp);
- strcat (str_mmap, str_tmp);
- strcat (str_mmap, "K");
- len = strlen(str_mmap);
- cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
- die("Command line overflow\n");
- strcat(cmdline, str_mmap);
+ cmdline_add_memmap_internal(cmdline, startk, endk, RANGE_RESERVED);
#ifdef DEBUG
printf("Command line after adding reserved memmap\n");
--
1.8.3.1

View File

@ -1,31 +0,0 @@
From 158d7638f1669a8d34def55ab81f10993e68e76a Mon Sep 17 00:00:00 2001
From: WANG Chao <chaowang@redhat.com>
Date: Tue, 7 Jan 2014 01:37:34 +0800
Subject: [PATCH] vmcore-dmesg: struct_val_u64() not casting u64 to u32
It seems gcc doesn't check return type from inline function.
struct_val_u64() should return u64 otherwise upper 32bit is lost.
Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
vmcore-dmesg/vmcore-dmesg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0f477c0..df14c89 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -529,7 +529,7 @@ static inline uint32_t struct_val_u32(char *ptr, unsigned int offset)
return(file32_to_cpu(*(uint32_t *)(ptr + offset)));
}
-static inline uint32_t struct_val_u64(char *ptr, unsigned int offset)
+static inline uint64_t struct_val_u64(char *ptr, unsigned int offset)
{
return(file64_to_cpu(*(uint64_t *)(ptr + offset)));
}
--
1.8.4.2

View File

@ -0,0 +1,29 @@
From 9bcefc97bc6c03b6acc8c25f6b1d4e796521ea4c Mon Sep 17 00:00:00 2001
From: Tony Jones <tonyj@suse.de>
Date: Wed, 5 Feb 2014 14:32:18 -0800
Subject: [PATCH 1/2] i386: fix build failure (bzImage_support_efi_boot)
Commit 9c200a85de2245a850546fded96a1977b84ad24d referenced
'bzImage_support_efi_boot' without matching 32-bit definition.
Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
kexec/arch/i386/kexec-bzImage.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c
index fc1a54f..e7bc1d6 100644
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -40,6 +40,7 @@
#include <arch/options.h>
static const int probe_debug = 0;
+int bzImage_support_efi_boot = 0;
int bzImage_probe(const char *buf, off_t len)
{
--
1.8.5.3

View File

@ -0,0 +1,36 @@
From 941fa1f6e31bc7cb1b014277de36b80425da7010 Mon Sep 17 00:00:00 2001
From: Tony Jones <tonyj@suse.com>
Date: Wed, 5 Feb 2014 14:38:07 -0800
Subject: [PATCH 2/2] i386: fix redefinition error for e820entry
At least on our systems, xenctrl.h defines (unguarded) struct e820entry
Move the (guarded) definition in include/x86/x86-linux.h to below.
Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
kexec/arch/i386/crashdump-x86.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 53bd077..979c2bd 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -41,12 +41,13 @@
#include "../../crashdump.h"
#include "kexec-x86.h"
#include "crashdump-x86.h"
-#include "x86-linux-setup.h"
#ifdef HAVE_LIBXENCTRL
#include <xenctrl.h>
#endif /* HAVE_LIBXENCTRL */
+#include "x86-linux-setup.h"
+
#include <x86/x86-linux.h>
extern struct arch_options_t arch_options;
--
1.8.5.3

View File

@ -1,10 +1,10 @@
Name: kexec-tools
Version: 2.0.4
Release: 25%{?dist}
Version: 2.0.5
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
Summary: The kexec/kdump userspace component
Source0: http://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
Source0: http://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
Source1: kdumpctl
Source2: kdump.sysconfig
Source3: kdump.sysconfig.x86_64
@ -53,14 +53,12 @@ Obsoletes: diskdumputils netdump
#
# Patches 0 through 100 are meant for x86 kexec-tools enablement
#
Patch001: kexec-tools-2.0.4-Revert-kexec-lengthen-the-kernel-command-line-image.patch
Patch002: kexec-tools-2.0.4-kexec-i386-Add-cmdline_add_memmap_internal-to-reduce.patch
Patch003: kexec-tools-2.0.4-Revert-kexec-include-reserved-e820-sections-in-crash.patch
Patch000: kexec-tools-2.0.5-i386-fix-build-failure-bzImage_support_efi_boot.patch
Patch001: kexec-tools-2.0.5-i386-fix-redefinition-error-for-e820entry.patch
#
# Patches 101 through 200 are meant for x86_64 kexec-tools enablement
#
Patch101: kexec-tools-2.0.4-kdump-x86-Process-multiple-Crash-kernel-in-proc-iome.patch
#
# Patches 201 through 300 are meant for ia64 kexec-tools enablement
@ -82,7 +80,6 @@ Patch101: kexec-tools-2.0.4-kdump-x86-Process-multiple-Crash-kernel-in-proc-iome
#
Patch601: kexec-tools-2.0.3-disable-kexec-test.patch
Patch604: kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch
Patch617: kexec-tools-2.0.4-vmcore-dmesg-struct_val_u64-not-casting-u64-to-u32.patch
Patch618: kexec-tools-2.0.4-makedumpfile-memset-in-cyclic-bitmap-initialization-introdu.patch
%description
@ -112,14 +109,11 @@ tar -z -x -v -f %{SOURCE9}
tar -z -x -v -f %{SOURCE19}
%patch101 -p1
%patch601 -p1
%patch604 -p1
%patch001 -p1
%patch002 -p1
%patch003 -p1
%patch617 -p1
%patch618 -p1
%patch000 -p1
%patch001 -p1
tar -z -x -v -f %{SOURCE13}
@ -339,6 +333,10 @@ done
%endif
%changelog
* Tue Mar 04 2014 WANG Chao <chaowang@redhat.com> - 2.0.5-1
- Rebase kexec-tools-2.0.5
- backport several patches from upstream for i386 build
* Mon Mar 03 2014 WANG Chao <chaowang@redhat.com> - 2.0.4-25
- Pass disable_cpu_apicid to kexec of capture kernel
- Relax restriction of dumping on encrypted target

View File

@ -1,4 +1,4 @@
b48eb2726d602c1aa3abfd3739441f54 eppic_030413.tar.gz
05992bc8c0673fc55be7b6d27e48a8db kexec-tools-2.0.4.tar.bz2
ba3710c36b287b6a61b2867b4c9b6478 kexec-tools-po-20131224.tgz
70ff343bbe6657b69beb23458e3e0b98 makedumpfile-1.5.5.tar.gz
e476990aa00e27a799a89b3c8f63e82b kexec-tools-2.0.5.tar.xz