Hello community,
here is the log from the commit of package kexec-tools
checked in at Mon Feb 5 15:39:32 CET 2007.
--------
--- kexec-tools/kexec-tools.changes 2007-01-29 15:42:19.000000000 +0100
+++ /mounts/work_src_done/STABLE/kexec-tools/kexec-tools.changes 2007-02-05 12:47:10.671863000 +0100
@@ -1,0 +2,14 @@
+Mon Feb 5 12:38:11 CET 2007 - tiwai@suse.de
+
+- updated to kexec-tools 2007.02.05:
+ * including last fixes
+ * fix for ppc64 dynamic memory range allocation (#242075)
+
+-------------------------------------------------------------------
+Fri Feb 2 16:46:35 CET 2007 - bwalle@suse.de
+
+- fixes overflow on large IA64 systems (#241544)
+- added KDUMP_COMMANDLINE_APPEND variable (#241607)
+- increase the command line size (#236828)
+
+-------------------------------------------------------------------
Old:
----
kexec-tools-ppc64-range-fix.diff
kexec-tools-testing-20061219.tar.bz2
New:
----
kexec-longer-cmdline.diff
kexec-tools-testing-20070205.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kexec-tools.spec ++++++
--- /var/tmp/diff_new_pack.W13491/_old 2007-02-05 15:39:24.000000000 +0100
+++ /var/tmp/diff_new_pack.W13491/_new 2007-02-05 15:39:24.000000000 +0100
@@ -12,14 +12,14 @@
Name: kexec-tools
%define helperversion 0.1.0
-%define package_version testing-20061219
+%define package_version testing-20070205
License: GNU General Public License (GPL)
Group: System/Kernel
Requires: %insserv_prereq %fillup_prereq
Autoreqprov: on
Summary: Tools for fast kernel loading
Version: 1.101
-Release: 67
+Release: 68
Source: %{name}-%{package_version}.tar.bz2
Source1: kdump
Source2: sysconfig.kdump
@@ -27,7 +27,7 @@
Source4: gdb-kdump
Source5: README.SUSE
Source6: kdump-helper-%{helperversion}.tar.bz2
-Patch: kexec-tools-ppc64-range-fix.diff
+Patch1: kexec-longer-cmdline.diff
URL: http://www.xmission.com/~ebiederm/files/kexec/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libelf
@@ -52,7 +52,7 @@
%prep
%setup -b 6 -q -n kdump-helper-%{helperversion}
%setup -q -n kexec-tools
-%patch -p1
+%patch1 -p1
%{?suse_update_config -f}
cp %{SOURCE5} .
@@ -120,6 +120,14 @@
%{_sbindir}/kdump-helper
%changelog -n kexec-tools
+* Mon Feb 05 2007 - tiwai@suse.de
+- updated to kexec-tools 2007.02.05:
+ * including last fixes
+ * fix for ppc64 dynamic memory range allocation (#242075)
+* Fri Feb 02 2007 - bwalle@suse.de
+- fixes overflow on large IA64 systems (#241544)
+- added KDUMP_COMMANDLINE_APPEND variable (#241607)
+- increase the command line size (#236828)
* Mon Jan 29 2007 - olh@suse.de
- do not unload kdump kernel during runlevel changes (#238733)
* Thu Jan 25 2007 - bwalle@suse.de
++++++ kdump ++++++
--- kexec-tools/kdump 2007-01-29 15:32:06.000000000 +0100
+++ /mounts/work_src_done/STABLE/kexec-tools/kdump 2007-02-05 12:47:10.355084000 +0100
@@ -160,20 +160,25 @@
fi
if [ -z "$KDUMP_COMMANDLINE" ]; then
- KDUMP_COMMANDLINE=`cat /proc/cmdline`
- KDUMP_COMMANDLINE=`echo $KDUMP_COMMANDLINE | \
- sed -e 's/crashkernel=[0-9]\+[mM]\(@[0-9]\+[Mm]\)\?//g' \
- -e 's/ *splash=[^ ]* / /g' \
+ KDUMP_COMMANDLINE=`cat /proc/cmdline | \
+ sed -e 's/crashkernel=[0-9]\+[mM]\(@[0-9]\+[Mm]\?\)\?//g' \
+ -e 's/ *splash=[^ ]*/ /g' \
+ -e 's/ *BOOT_IMAGE=[^ ]* / /g' \
-e 's/ *showopts/ /g'`
# Use deadline for saving the memory footprint
KDUMP_COMMANDLINE="$KDUMP_COMMANDLINE elevator=deadline sysrq=1"
case `uname -i` in
- i?86|x86_64)
+ i?86|x86_64|ia64)
KDUMP_COMMANDLINE="$KDUMP_COMMANDLINE irqpoll"
;;
esac
fi
KDUMP_COMMANDLINE="CRASH=1 $KDUMP_COMMANDLINE"
+
+ if [ -n "$KDUMP_COMMANDLINE_APPEND" ] ; then
+ KDUMP_COMMANDLINE="$KDUMP_COMMANDLINE $KDUMP_COMMANDLINE_APPEND"
+ fi
+
if [ -n "$KDUMP_RUNLEVEL" ]; then
case "$KDUMP_RUNLEVEL" in
[1-5s])
@@ -283,14 +288,14 @@
;;
stop)
if [ ! -f /proc/vmcore ]; then
- if [ "$RUNLEVEL" != "" ]; then
- echo -n "Not unloading kdump during runlevel changes"
- rc_status -s
- else
- echo -n "Unloading kdump"
- $KEXEC -p -u
- rc_status -v
- fi
+ if [ "$RUNLEVEL" != "" ]; then
+ echo -n "Not unloading kdump during runlevel changes"
+ rc_status -s
+ else
+ echo -n "Unloading kdump"
+ $KEXEC -p -u
+ rc_status -v
+ fi
fi
;;
status)
++++++ kexec-longer-cmdline.diff ++++++
This patch increases the kernel command line size for x86_64 and i386
to 2048 characters. This is necessary because with kernel 2.6.20-rc6-mm
and newer, the kernel command line size has increased and kexec needs
lot of command line space, so this solves some "command line overflow"
problems.
To be able to warn users running older kernels that the command line
is too long (and don't wait that the kernel truncates it), the
patch tries to get the kernel command line length from the kernel
image that is loaded if possible by checking the length of the
static array that holds the kernel command line when booting.
If this is not possible or the command line is not in the range
[256; 2048], the default value is used (2048).
Signed-off-by: Bernhard Walle
---
include/x86/x86-linux.h | 8 ++-----
kexec/arch/i386/crashdump-x86.c | 36 ++++++++++++++++++++++++++++++++---
kexec/arch/i386/crashdump-x86.h | 5 ++++
kexec/arch/i386/kexec-bzImage.c | 8 +++----
kexec/arch/i386/kexec-elf-x86.c | 8 +++----
kexec/arch/i386/x86-linux-setup.c | 6 +++--
kexec/arch/x86_64/crashdump-x86_64.c | 35 +++++++++++++++++++++++++++++++---
kexec/arch/x86_64/crashdump-x86_64.h | 3 ++
kexec/arch/x86_64/kexec-elf-x86_64.c | 11 ++++++----
9 files changed, 95 insertions(+), 25 deletions(-)
Index: b/include/x86/x86-linux.h
===================================================================
--- a/include/x86/x86-linux.h
+++ b/include/x86/x86-linux.h
@@ -148,14 +148,12 @@ struct x86_linux_param_header {
#endif
struct e820entry e820_map[E820MAX]; /* 0x2d0 */
/* 0x550 */
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE 2048
};
struct x86_linux_faked_param_header {
- struct x86_linux_param_header hdr; /* 0x00 */
- uint8_t reserved16[688]; /* 0x550 */
- uint8_t command_line[COMMAND_LINE_SIZE]; /* 0x800 */
- uint8_t reserved17[1792]; /* 0x900 - 0x1000 */
+ struct x86_linux_param_header hdr;
+ uint8_t command_line[COMMAND_LINE_SIZE];
};
struct x86_linux_header {
Index: b/kexec/arch/i386/crashdump-x86.c
===================================================================
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -46,6 +46,36 @@ static struct memory_range crash_memory_
/* Memory region reserved for storing panic kernel and other data. */
static struct memory_range crash_reserved_mem;
+/* real length of the command line from the kernel image, needed because
+ * command line size on x86-64 was increased recently in -mm tree */
+int real_command_line_size = COMMAND_LINE_SIZE;
+
+
+/* Tries to read the kernel command line size from the symbol table
+ * of the ELF kernel binary. */
+void set_command_line_size(struct mem_ehdr *ehdr)
+{
+ int ret;
+ struct mem_sym mem_sym;
+
+ /* > 2.6.20-rc6-mm */
+ ret = elf_rel_find_symbol(ehdr, "saved_command_line", &mem_sym);
+ if (ret != 0) {
+ /* older kernel */
+ ret = elf_rel_find_symbol(ehdr, "boot_command_line", &mem_sym);
+ if (ret != 0) {
+ return;
+ }
+ }
+
+ /* current -mm kernel */
+ if (mem_sym.st_size >= 256 && mem_sym.st_size < COMMAND_LINE_SIZE) {
+ real_command_line_size = mem_sym.st_size;
+ return;
+ }
+}
+
+
/* Reads the appropriate file and retrieves the SYSTEM RAM regions for whom to
* create Elf headers. Keeping it separate from get_memory_ranges() as
* requirements are different in the case of normal kexec and crashdumps.
@@ -363,7 +393,7 @@ static int cmdline_add_memmap(char *cmdl
strcpy(str_mmap, " memmap=exactmap");
len = strlen(str_mmap);
cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
+ if (cmdlen > (real_command_line_size - 1))
die("Command line overflow\n");
strcat(cmdline, str_mmap);
@@ -388,7 +418,7 @@ static int cmdline_add_memmap(char *cmdl
strcat (str_mmap, "K");
len = strlen(str_mmap);
cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
+ if (cmdlen > (real_command_line_size - 1))
die("Command line overflow\n");
strcat(cmdline, str_mmap);
}
@@ -418,7 +448,7 @@ static int cmdline_add_elfcorehdr(char *
strcat(str, "K");
len = strlen(str);
cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
+ if (cmdlen > (real_command_line_size - 1))
die("Command line overflow\n");
strcat(cmdline, str);
#if 0
Index: b/kexec/arch/i386/crashdump-x86.h
===================================================================
--- a/kexec/arch/i386/crashdump-x86.h
+++ b/kexec/arch/i386/crashdump-x86.h
@@ -2,8 +2,11 @@
#define CRASHDUMP_X86_H
struct kexec_info;
+struct mem_ehdr;
int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
unsigned long max_addr, unsigned long min_base);
+void set_command_line_size(struct mem_ehdr *ehdr);
+
#define PAGE_OFFSET 0xc0000000
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
@@ -19,4 +22,6 @@ int load_crashdump_segments(struct kexec
#define BACKUP_SRC_END 0x0009ffff
#define BACKUP_SRC_SIZE (BACKUP_SRC_END - BACKUP_SRC_START + 1)
+extern int real_command_line_size;
+
#endif /* CRASHDUMP_X86_H */
Index: b/kexec/arch/x86_64/crashdump-x86_64.c
===================================================================
--- a/kexec/arch/x86_64/crashdump-x86_64.c
+++ b/kexec/arch/x86_64/crashdump-x86_64.c
@@ -50,6 +50,35 @@ static struct crash_elf_info elf_info =
/* Forward Declaration. */
static int exclude_crash_reserve_region(int *nr_ranges);
+/* real length of the command line from the kernel image, needed because
+ * command line size on x86-64 was increased recently in -mm tree */
+int real_command_line_size = COMMAND_LINE_SIZE;
+
+
+/* Tries to read the kernel command line size from the symbol table
+ * of the ELF kernel binary. */
+void set_command_line_size(struct mem_ehdr *ehdr)
+{
+ int ret;
+ struct mem_sym mem_sym;
+
+ /* > 2.6.20-rc6-mm */
+ ret = elf_rel_find_symbol(ehdr, "saved_command_line", &mem_sym);
+ if (ret != 0) {
+ /* older kernel */
+ ret = elf_rel_find_symbol(ehdr, "boot_command_line", &mem_sym);
+ if (ret != 0) {
+ return;
+ }
+ }
+
+ /* current -mm kernel */
+ if (mem_sym.st_size >= 256 && mem_sym.st_size < COMMAND_LINE_SIZE) {
+ real_command_line_size = mem_sym.st_size;
+ return;
+ }
+}
+
#define KERN_VADDR_ALIGN 0x100000 /* 1MB */
/* Read kernel physical load addr from /proc/iomem (Kernel Code) and
@@ -494,7 +523,7 @@ static int cmdline_add_memmap(char *cmdl
strcat (str_mmap, "K");
len = strlen(str_mmap);
cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
+ if (cmdlen > (real_command_line_size - 1))
die("Command line overflow\n");
strcat(cmdline, str_mmap);
}
@@ -523,7 +552,7 @@ static int cmdline_add_elfcorehdr(char *
strcat(str, "K");
len = strlen(str);
cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
+ if (cmdlen > (real_command_line_size - 1))
die("Command line overflow\n");
strcat(cmdline, str);
#ifdef DEBUG
@@ -555,7 +584,7 @@ static int cmdline_add_memmap_acpi(char
strcat (str_mmap, "K");
len = strlen(str_mmap);
cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
+ if (cmdlen > (real_command_line_size - 1))
die("Command line overflow\n");
strcat(cmdline, str_mmap);
Index: b/kexec/arch/x86_64/crashdump-x86_64.h
===================================================================
--- a/kexec/arch/x86_64/crashdump-x86_64.h
+++ b/kexec/arch/x86_64/crashdump-x86_64.h
@@ -3,6 +3,7 @@
int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
unsigned long max_addr, unsigned long min_base);
+void set_command_line_size(struct mem_ehdr *ehdr);
#define __START_KERNEL_map 0xffffffff80000000UL
#define PAGE_OFFSET 0xffff810000000000UL
@@ -21,4 +22,6 @@ int load_crashdump_segments(struct kexec
#define BACKUP_SRC_END 0x0009ffff
#define BACKUP_SRC_SIZE (BACKUP_SRC_END - BACKUP_SRC_START + 1)
+extern int real_command_line_size;
+
#endif /* CRASHDUMP_X86_64_H */
Index: b/kexec/arch/x86_64/kexec-elf-x86_64.c
===================================================================
--- a/kexec/arch/x86_64/kexec-elf-x86_64.c
+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c
@@ -166,12 +166,12 @@ int elf_x86_64_load(int argc, char **arg
* taking crash dumps.
*/
if (info->kexec_flags & KEXEC_ON_CRASH) {
- modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
- memset((void *)modified_cmdline, 0, COMMAND_LINE_SIZE);
+ modified_cmdline = xmalloc(real_command_line_size);
+ memset((void *)modified_cmdline, 0, real_command_line_size);
if (command_line) {
strncpy(modified_cmdline, command_line,
- COMMAND_LINE_SIZE);
- modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
+ real_command_line_size);
+ modified_cmdline[real_command_line_size - 1] = '\0';
}
modified_cmdline_len = strlen(modified_cmdline);
}
@@ -182,6 +182,9 @@ int elf_x86_64_load(int argc, char **arg
entry = ehdr.e_entry;
max_addr = elf_max_addr(&ehdr);
+ /* try to set the command line size correctly */
+ set_command_line_size(&ehdr);
+
/* Do we want arguments? */
if (arg_style != ARG_STYLE_NONE) {
/* Load the setup code */
Index: b/kexec/arch/i386/kexec-bzImage.c
===================================================================
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -156,12 +156,12 @@ int do_bzImage_load(struct kexec_info *i
* taking crash dumps.
*/
if (info->kexec_flags & KEXEC_ON_CRASH) {
- modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
- memset((void *)modified_cmdline, 0, COMMAND_LINE_SIZE);
+ modified_cmdline = xmalloc(real_command_line_size);
+ memset((void *)modified_cmdline, 0, real_command_line_size);
if (command_line) {
strncpy(modified_cmdline, command_line,
- COMMAND_LINE_SIZE);
- modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
+ real_command_line_size);
+ modified_cmdline[real_command_line_size - 1] = '\0';
}
/* If panic kernel is being loaded, additional segments need
Index: b/kexec/arch/i386/kexec-elf-x86.c
===================================================================
--- a/kexec/arch/i386/kexec-elf-x86.c
+++ b/kexec/arch/i386/kexec-elf-x86.c
@@ -166,12 +166,12 @@ int elf_x86_load(int argc, char **argv,
* taking crash dumps.
*/
if (info->kexec_flags & KEXEC_ON_CRASH) {
- modified_cmdline = xmalloc(COMMAND_LINE_SIZE);
- memset((void *)modified_cmdline, 0, COMMAND_LINE_SIZE);
+ modified_cmdline = xmalloc(real_command_line_size);
+ memset((void *)modified_cmdline, 0, real_command_line_size);
if (command_line) {
strncpy(modified_cmdline, command_line,
- COMMAND_LINE_SIZE);
- modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
+ real_command_line_size);
+ modified_cmdline[real_command_line_size - 1] = '\0';
}
modified_cmdline_len = strlen(modified_cmdline);
}
Index: b/kexec/arch/i386/x86-linux-setup.c
===================================================================
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -32,6 +32,8 @@
#include "kexec-x86.h"
#include "x86-linux-setup.h"
+extern int real_command_line_size;
+
void init_linux_parameters(struct x86_linux_param_header *real_mode)
{
/* Fill in the values that are usually provided by the kernel. */
@@ -91,8 +93,8 @@ void setup_linux_bootloader_parameters(
}
/* Fill in the command line */
- if (cmdline_len > COMMAND_LINE_SIZE) {
- cmdline_len = COMMAND_LINE_SIZE;
+ if (cmdline_len > real_command_line_size) {
+ cmdline_len = real_command_line_size;
}
cmdline_ptr = ((char *)real_mode) + cmdline_offset;
memcpy(cmdline_ptr, cmdline, cmdline_len);
++++++ kexec-tools-testing-20061219.tar.bz2 -> kexec-tools-testing-20070205.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/AUTHORS new/kexec-tools/AUTHORS
--- old/kexec-tools/AUTHORS 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/AUTHORS 2007-02-03 04:23:31.000000000 +0100
@@ -3,4 +3,11 @@
Jesse Barnes
Khalid Aziz
Hariprasad Nellitheertha
-Tim Deegan
\ No newline at end of file
+Tim Deegan
+And others...
+
+Currently maintained by
+P: Simon Horman
+M: horms@verge.net.au
+L: fastboot@lists.osdl.org
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/configure.ac new/kexec-tools/configure.ac
--- old/kexec-tools/configure.ac 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/configure.ac 2007-02-03 04:23:31.000000000 +0100
@@ -31,12 +31,15 @@
s390x )
host_cpu="s390"
;;
+ sh4|sh3 )
+ host_cpu="sh"
+ ;;
* )
host_cpu="$host_cpu"
;;
esac
case $host_cpu in
- i386|ppc|x86_64|alpha|ppc64|ia64|s390)
+ i386|ppc|x86_64|alpha|ppc64|ia64|s390|sh)
;;
* )
AC_MSG_ERROR([ unsupported architecture $host_cpu])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/i386/kexec-bzImage.c new/kexec-tools/kexec/arch/i386/kexec-bzImage.c
--- old/kexec-tools/kexec/arch/i386/kexec-bzImage.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/i386/kexec-bzImage.c 2007-02-03 04:23:31.000000000 +0100
@@ -270,7 +270,7 @@
/*
* Initialize the 16bit start information.
*/
- regs16.cs = setup_base + 0x20;
+ regs16.cs = (setup_base>>4) + 0x20;
regs16.ip = 0;
regs16.ss = (elf_rel_get_addr(&info->rhdr, "stack_end") - 64*1024) >> 4;
regs16.esp = 0xFFFC;
@@ -278,7 +278,7 @@
printf("Starting the kernel in real mode\n");
regs32.eip = elf_rel_get_addr(&info->rhdr, "entry16");
}
- if (real_mode && debug) {
+ if (real_mode_entry && debug) {
unsigned long entry16_debug, pre32, first32;
uint32_t old_first32;
/* Find the location of the symbols */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ia64/crashdump-ia64.c new/kexec-tools/kexec/arch/ia64/crashdump-ia64.c
--- old/kexec-tools/kexec/arch/ia64/crashdump-ia64.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ia64/crashdump-ia64.c 2007-02-03 04:23:31.000000000 +0100
@@ -42,8 +42,10 @@
#define MAX_LINE 160
/* Stores a sorted list of RAM memory ranges for which to create elf headers.
- * A separate program header is created for backup region */
-static struct memory_range crash_memory_range[CRASH_MAX_MEMORY_RANGES];
+ * A separate program header is created for backup region.
+ * The number of entries in memory_range array is always smaller than
+ * the number of entries in /proc/iomem, stored in max_memory_ranges. */
+static struct memory_range *crash_memory_range;
/* Memory region reserved for storing panic kernel and other data. */
static struct memory_range crash_reserved_mem;
unsigned long elfcorehdr;
@@ -125,7 +127,7 @@
}
/* Insert split memory region, if any. */
if (tidx >= 0) {
- if (*nr_ranges == CRASH_MAX_MEMORY_RANGES) {
+ if (*nr_ranges == max_memory_ranges) {
/* No space to insert another element. */
fprintf(stderr, "Error: Number of crash memory ranges"
" excedeed the max limit\n");
@@ -148,6 +150,8 @@
FILE *fp;
unsigned long start, end;
+ crash_memory_range = xmalloc(sizeof(struct memory_range) *
+ max_memory_ranges);
fp = fopen(iomem, "r");
if (!fp) {
fprintf(stderr, "Cannot open %s: %s\n",
@@ -157,7 +161,7 @@
while(fgets(line, sizeof(line), fp) != 0) {
char *str;
int type, consumed, count;
- if (memory_ranges >= CRASH_MAX_MEMORY_RANGES)
+ if (memory_ranges >= max_memory_ranges)
break;
count = sscanf(line, "%lx-%lx : %n",
&start, &end, &consumed);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ia64/crashdump-ia64.h new/kexec-tools/kexec/arch/ia64/crashdump-ia64.h
--- old/kexec-tools/kexec/arch/ia64/crashdump-ia64.h 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ia64/crashdump-ia64.h 2007-02-03 04:23:31.000000000 +0100
@@ -8,6 +8,5 @@
unsigned long min_base, const char **cmdline);
#define CRASH_MAX_MEMMAP_NR (KEXEC_MAX_SEGMENTS + 1)
-#define CRASH_MAX_MEMORY_RANGES (MAX_MEMORY_RANGES + 2)
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ia64/kexec-elf-ia64.c new/kexec-tools/kexec/arch/ia64/kexec-elf-ia64.c
--- old/kexec-tools/kexec/arch/ia64/kexec-elf-ia64.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ia64/kexec-elf-ia64.c 2007-02-03 04:23:31.000000000 +0100
@@ -52,6 +52,7 @@
#define OPT_VMM (OPT_ARCH_MAX+3)
static const int probe_debug = 0;
+extern unsigned long saved_efi_memmap_size;
/*
* elf_ia64_probe - sanity check the elf image
@@ -236,8 +237,8 @@
elf_rel_set_symbol(&info->rhdr, "__boot_param_base",
&boot_param_base, sizeof(long));
- // reserve 8k for efi_memmap
- efi_memmap_size = 1UL<<14;
+ // reserve efi_memmap of actual size allocated in production kernel
+ efi_memmap_size = saved_efi_memmap_size;
efi_memmap_buf = xmalloc(efi_memmap_size);
efi_memmap_base = add_buffer(info, efi_memmap_buf,
efi_memmap_size, efi_memmap_size, 4096, 0,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ia64/kexec-ia64.c new/kexec-tools/kexec/arch/ia64/kexec-ia64.c
--- old/kexec-tools/kexec/arch/ia64/kexec-ia64.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ia64/kexec-ia64.c 2007-02-03 04:23:31.000000000 +0100
@@ -36,8 +36,12 @@
#include "kexec-ia64.h"
#include
-static struct memory_range memory_range[MAX_MEMORY_RANGES];
+/* The number of entries in memory_range array is always smaller than
+ the number of entries in /proc/iomem, stored in max_memory_ranges. */
+static struct memory_range *memory_range;
+int max_memory_ranges;
static int memory_ranges;
+unsigned long saved_efi_memmap_size;
/* Reserve range for EFI memmap and Boot parameter */
static int split_range(int range, unsigned long start, unsigned long end)
@@ -85,13 +89,21 @@
return -1;
}
+ /* allocate memory_range dynamically */
+ while(fgets(line, sizeof(line), fp) != 0) {
+ max_memory_ranges++;
+ }
+ memory_range = xmalloc(sizeof(struct memory_range) *
+ max_memory_ranges);
+ rewind(fp);
+
while(fgets(line, sizeof(line), fp) != 0) {
unsigned long start, end;
char *str;
int type;
int consumed;
int count;
- if (memory_ranges >= MAX_MEMORY_RANGES)
+ if (memory_ranges >= max_memory_ranges)
break;
count = sscanf(line, "%lx-%lx : %n",
&start, &end, &consumed);
@@ -124,6 +136,7 @@
continue;
} else if (memcmp(str, "EFI Memory Map\n", 14) == 0) {
memory_ranges = split_range(memory_ranges, start, end);
+ saved_efi_memmap_size = end - start;
continue;
} else
continue;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ia64/kexec-ia64.h new/kexec-tools/kexec/arch/ia64/kexec-ia64.h
--- old/kexec-tools/kexec/arch/ia64/kexec-ia64.h 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ia64/kexec-ia64.h 2007-02-03 04:23:31.000000000 +0100
@@ -1,8 +1,7 @@
#ifndef KEXEC_IA64_H
#define KEXEC_IA64_H
-#define MAX_MEMORY_RANGES 1024
-
+extern int max_memory_ranges;
int elf_ia64_probe(const char *buf, off_t len);
int elf_ia64_load(int argc, char **argv, const char *buf, off_t len,
struct kexec_info *info);
@@ -11,7 +10,6 @@
void move_loaded_segments(struct kexec_info *info, struct mem_ehdr *ehdr,
unsigned long addr);
-#define MAX_MEMORY_RANGES 1024
#define EFI_PAGE_SIZE (1UL<<12)
#define ELF_PAGE_SIZE (1UL<<16)
#endif /* KEXEC_IA64_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.c new/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.c
--- old/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.c 2007-02-03 04:23:31.000000000 +0100
@@ -105,21 +105,22 @@
DIR *dir, *dmem;
FILE *file;
struct dirent *dentry, *mentry;
- int i, n;
+ int i, n, crash_rng_len = 0;
unsigned long long start, end, cstart, cend;
crash_max_memory_ranges = max_memory_ranges + 6;
+ crash_rng_len = sizeof(struct memory_range) * crash_max_memory_ranges;
- crash_memory_range = (struct memory_range *) malloc(
- (sizeof(struct memory_range) * (crash_max_memory_ranges)));
+ crash_memory_range = (struct memory_range *) malloc(crash_rng_len);
if (!crash_memory_range) {
fprintf(stderr, "Allocation for crash memory range failed\n");
return -1;
}
+ memset(crash_memory_range, 0, crash_rng_len);
/* create a separate program header for the backup region */
crash_memory_range[0].start = BACKUP_SRC_START;
- crash_memory_range[0].end = BACKUP_SRC_END;
+ crash_memory_range[0].end = BACKUP_SRC_END + 1;
crash_memory_range[0].type = RANGE_RAM;
memory_ranges++;
@@ -154,7 +155,7 @@
closedir(dir);
goto err;
}
- if (memory_ranges >= max_memory_ranges) {
+ if (memory_ranges >= (max_memory_ranges + 1)) {
/* No space to insert another element. */
fprintf(stderr,
"Error: Number of crash memory ranges"
@@ -164,8 +165,8 @@
start = ((unsigned long long *)buf)[0];
end = start + ((unsigned long long *)buf)[1];
- if (start == 0 && end >= BACKUP_SRC_END)
- start = BACKUP_SRC_END;
+ if (start == 0 && end >= (BACKUP_SRC_END + 1))
+ start = BACKUP_SRC_END + 1;
cstart = crash_base;
cend = crash_base + crash_size;
@@ -231,11 +232,11 @@
*range = crash_memory_range;
*ranges = memory_ranges;
#if DEBUG
- int i;
+ int j;
printf("CRASH MEMORY RANGES\n");
- for(i = 0; i < *ranges; i++) {
- start = crash_memory_range[i].start;
- end = crash_memory_range[i].end;
+ for(j = 0; j < *ranges; j++) {
+ start = crash_memory_range[j].start;
+ end = crash_memory_range[j].end;
fprintf(stderr, "%016Lx-%016Lx\n", start, end);
}
#endif
@@ -308,7 +309,8 @@
{
void *tmp;
unsigned long sz, elfcorehdr;
- int nr_ranges, align = 1024;
+ int nr_ranges, align = 1024, i;
+ unsigned long long end;
struct memory_range *mem_range;
if (get_crash_memory_ranges(&mem_range, &nr_ranges) < 0)
@@ -322,6 +324,22 @@
0, max_addr, 1);
reserve(info->backup_start, sz);
+ /* On ppc64 memory ranges in device-tree is denoted as start
+ * and size rather than start and end, as is the case with
+ * other architectures like i386 . Because of this when loading
+ * the memory ranges in crashdump-elf.c the filesz calculation
+ * [ end - start + 1 ] goes for a toss.
+ *
+ * To be in sync with other archs adjust the end value for
+ * every crash memory range before calling the generic function
+ */
+
+ for (i = 0; i < nr_ranges; i++) {
+ end = crash_memory_range[i].end - 1;
+ crash_memory_range[i].end = end;
+ }
+
+
/* Create elf header segment and store crash image data. */
if (arch_options.core_header_type == CORE_TYPE_ELF64) {
if (crash_create_elf64_headers(info, &elf_info64,
@@ -383,7 +401,8 @@
usablemem_rgns.ranges[usablemem_rgns.size++].end = end;
#ifdef DEBUG
- fprintf(stderr, "usable memory rgns size:%d base:%lx size:%lx\n", usablemem_rgns.size, base, size);
+ fprintf(stderr, "usable memory rgns size:%u base:%llx size:%llx\n",
+ usablemem_rgns.size, base, size);
#endif
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.h new/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.h
--- old/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.h 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ppc64/crashdump-ppc64.h 2007-02-03 04:23:31.000000000 +0100
@@ -16,10 +16,10 @@
#define COMMAND_LINE_SIZE 512 /* from kernel */
/* Backup Region, First 64K of System RAM. */
#define BACKUP_SRC_START 0x0000
-#define BACKUP_SRC_END 0x10000
+#define BACKUP_SRC_END 0xffff
#define BACKUP_SRC_SIZE (BACKUP_SRC_END - BACKUP_SRC_START + 1)
-#define KDUMP_BACKUP_LIMIT BACKUP_SRC_END
+#define KDUMP_BACKUP_LIMIT BACKUP_SRC_SIZE
#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1)))
#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1)))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ppc64/kexec-elf-ppc64.c new/kexec-tools/kexec/arch/ppc64/kexec-elf-ppc64.c
--- old/kexec-tools/kexec/arch/ppc64/kexec-elf-ppc64.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ppc64/kexec-elf-ppc64.c 2007-02-03 04:23:31.000000000 +0100
@@ -322,13 +322,13 @@
sizeof(toc_addr));
fprintf(stderr, "info->entry is %p\n", info->entry);
- fprintf(stderr, "kernel is %Lx\n", my_kernel);
- fprintf(stderr, "dt_offset is %Lx\n", my_dt_offset);
+ fprintf(stderr, "kernel is %lx\n", my_kernel);
+ fprintf(stderr, "dt_offset is %lx\n", my_dt_offset);
fprintf(stderr, "panic_kernel is %x\n", my_panic_kernel);
- fprintf(stderr, "backup_start is %Lx\n", my_backup_start);
- fprintf(stderr, "stack is %Lx\n", my_stack);
- fprintf(stderr, "toc_addr is %Lx\n", toc_addr);
- fprintf(stderr, "purgatory size is %d\n", purgatory_size);
+ fprintf(stderr, "backup_start is %lx\n", my_backup_start);
+ fprintf(stderr, "stack is %lx\n", my_stack);
+ fprintf(stderr, "toc_addr is %lx\n", toc_addr);
+ fprintf(stderr, "purgatory size is %lu\n", purgatory_size);
#endif
for (i = 0; i < nr_segments; i++)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ppc64/kexec-ppc64.c new/kexec-tools/kexec/arch/ppc64/kexec-ppc64.c
--- old/kexec-tools/kexec/arch/ppc64/kexec-ppc64.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ppc64/kexec-ppc64.c 2007-02-03 04:23:31.000000000 +0100
@@ -35,7 +35,7 @@
#include "crashdump-ppc64.h"
#include
-static struct exclude_range *exclude_range = NULL;
+static struct memory_range *exclude_range = NULL;
static struct memory_range *memory_range = NULL;
static struct memory_range *base_memory_range = NULL;
static unsigned long long rmo_top;
@@ -66,26 +66,31 @@
*/
static int alloc_memory_ranges()
{
- memory_range = (struct memory_range *) malloc(
- (sizeof(struct memory_range) * max_memory_ranges));
+ int memory_range_len;
+
+ memory_range_len = sizeof(struct memory_range) * max_memory_ranges;
+
+ memory_range = (struct memory_range *) malloc(memory_range_len);
if (!memory_range)
- goto err1;
+ return -1;
- base_memory_range = (struct memory_range *) malloc(
- (sizeof(struct memory_range) * max_memory_ranges));
+ base_memory_range = (struct memory_range *) malloc(memory_range_len);
if (!base_memory_range)
goto err1;
- exclude_range = (struct exclude_range *) malloc(
- (sizeof(struct exclude_range) * max_memory_ranges));
+ exclude_range = (struct memory_range *) malloc(memory_range_len);
if (!exclude_range)
goto err1;
- usablemem_rgns.ranges = (struct exclude_range *) malloc(
- (sizeof(struct exclude_range) * max_memory_ranges));
+ usablemem_rgns.ranges = (struct memory_range *)
+ malloc(memory_range_len);
if (!(usablemem_rgns.ranges))
goto err1;
+ memset(memory_range, 0, memory_range_len);
+ memset(base_memory_range, 0, memory_range_len);
+ memset(exclude_range, 0, memory_range_len);
+ memset(usablemem_rgns.ranges, 0, memory_range_len);
return 0;
err1:
@@ -175,9 +180,10 @@
((unsigned long long *)buf)[1];
base_memory_range[local_memory_ranges].type = RANGE_RAM;
local_memory_ranges++;
-#ifdef DEBUG
- fprintf(stderr, "%016Lx-%016Lx : %x\n", memory_range[local_memory_ranges-1].start, memory_range[local_memory_ranges-1].end, memory_range[local_memory_ranges].type);
-#endif
+ dfprintf(stderr, "%016llx-%016llx : %x\n",
+ base_memory_range[local_memory_ranges-1].start,
+ base_memory_range[local_memory_ranges-1].end,
+ base_memory_range[local_memory_ranges-1].type);
fclose(file);
}
closedir(dmem);
@@ -509,7 +515,9 @@
#ifdef DEBUG
int k;
for (k = 0; k < i; k++)
- fprintf(stderr, "exclude_range sorted exclude_range[%d] start:%lx, end:%lx\n", k, exclude_range[k].start, exclude_range[k].end);
+ fprintf(stderr, "exclude_range sorted exclude_range[%d] "
+ "start:%llx, end:%llx\n", k, exclude_range[k].start,
+ exclude_range[k].end);
#endif
return 0;
}
@@ -586,7 +594,9 @@
#ifdef DEBUG
int k;
for (k = 0; k < j; k++)
- fprintf(stderr, "setup_memory_ranges memory_range[%d] start:%lx, end:%lx\n", k, memory_range[k].start, memory_range[k].end);
+ fprintf(stderr, "setup_memory_ranges memory_range[%d] "
+ "start:%llx, end:%llx\n", k, memory_range[k].start,
+ memory_range[k].end);
#endif
return 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/ppc64/kexec-ppc64.h new/kexec-tools/kexec/arch/ppc64/kexec-ppc64.h
--- old/kexec-tools/kexec/arch/ppc64/kexec-ppc64.h 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/arch/ppc64/kexec-ppc64.h 2007-02-03 04:23:31.000000000 +0100
@@ -33,13 +33,9 @@
int core_header_type;
};
-struct exclude_range {
- unsigned long long start, end;
-};
-
typedef struct mem_rgns {
unsigned int size;
- struct exclude_range *ranges;
+ struct memory_range *ranges;
} mem_rgns_t;
extern mem_rgns_t usablemem_rgns;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/include/arch/options.h new/kexec-tools/kexec/arch/sh/include/arch/options.h
--- old/kexec-tools/kexec/arch/sh/include/arch/options.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/include/arch/options.h 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,22 @@
+#ifndef KEXEC_ARCH_SH_OPTIONS_H
+#define KEXEC_ARCH_SH_OPTIONS_H
+
+#define OPT_ARCH_MAX (OPT_MAX+0)
+#define OPT_APPEND (OPT_ARCH_MAX+1)
+#define OPT_EMPTYZERO (OPT_ARCH_MAX+2)
+#define OPT_NBSD_HOWTO (OPT_ARCH_MAX+3)
+#define OPT_NBSD_MROOT (OPT_ARCH_MAX+4)
+
+
+#define KEXEC_ARCH_OPTIONS \
+ KEXEC_OPTIONS \
+ {"command-line", 1, 0, OPT_APPEND}, \
+ {"append", 1, 0, OPT_APPEND}, \
+ {"empty-zero", 1, 0, OPT_APPEND}, \
+ {"howto", 1, 0, OPT_NBSD_HOWTO}, \
+ {"miniroot", 1, 0, OPT_NBSD_MROOT}, \
+
+
+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
+
+#endif /* KEXEC_ARCH_SH_OPTIONS_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/kexec-elf-rel-sh.c new/kexec-tools/kexec/arch/sh/kexec-elf-rel-sh.c
--- old/kexec-tools/kexec/arch/sh/kexec-elf-rel-sh.c 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/kexec-elf-rel-sh.c 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,18 @@
+#include
+#include
+#include "../../kexec.h"
+#include "../../kexec-elf.h"
+
+int machine_verify_elf_rel(struct mem_ehdr *ehdr)
+{
+
+ die("machine_verify_elf_rel is not implemented\n");
+ return 0;
+}
+
+void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
+ void *location, unsigned long address, unsigned long value)
+{
+ die("Unknown rela relocation: %lu\n", r_type);
+ return;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/kexec-netbsd-sh.c new/kexec-tools/kexec/arch/sh/kexec-netbsd-sh.c
--- old/kexec-tools/kexec/arch/sh/kexec-netbsd-sh.c 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/kexec-netbsd-sh.c 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,153 @@
+/*
+ * kexec-netbsd-sh.c - kexec netbsd loader for the SH
+ * Copyright (C) 2005 kogiidena@eggplant.ddo.jp
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+
+#define _GNU_SOURCE
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "../../kexec.h"
+#include "../../kexec-elf.h"
+#include
+#include
+
+static const int probe_debug = 0;
+const extern unsigned char netbsd_booter[];
+
+#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
+
+/*
+ * netbsd_sh_probe - sanity check the elf image
+ *
+ * Make sure that the file image has a reasonable chance of working.
+ */
+int netbsd_sh_probe(const char *buf, off_t len)
+{
+ Elf32_Ehdr *ehdr;
+
+ ehdr = (Elf32_Ehdr *)buf;
+ if(memcmp(buf, ELFMAG, SELFMAG) != 0){
+ return -1;
+ }
+ if (ehdr->e_machine != EM_SH) {
+ return -1;
+ }
+ return 0;
+}
+
+void netbsd_sh_usage(void)
+{
+ printf(
+ " --howto=VALUE NetBSD kernel boot option.\n"
+ " --miniroot=FILE NetBSD miniroot ramdisk.\n\n");
+}
+
+int netbsd_sh_load(int argc, char **argv, const char *buf, off_t len,
+ struct kexec_info *info)
+{
+ const char *howto, *miniroot;
+ unsigned long entry, start, size;
+ char *miniroot_buf;
+ off_t miniroot_length;
+ unsigned int howto_value;
+ unsigned char *param;
+ unsigned long *paraml;
+ unsigned char *img;
+
+ int opt;
+
+ static const struct option options[] = {
+ KEXEC_ARCH_OPTIONS
+ {0, 0, 0, 0},
+ };
+
+ static const char short_options[] = KEXEC_ARCH_OPT_STR "";
+
+ howto = miniroot = 0;
+ while ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
+ switch (opt) {
+ default:
+ /* Ignore core options */
+ if (opt < OPT_ARCH_MAX) {
+ break;
+ }
+ case '?':
+ usage();
+ return -1;
+ case OPT_NBSD_HOWTO:
+ howto = optarg;
+ break;
+ case OPT_NBSD_MROOT:
+ miniroot = optarg;
+ break;
+ }
+ }
+
+ /* howto */
+ howto_value = 0;
+ if(howto){
+ howto_value = strtol(howto, NULL, 0);
+ }
+
+ /* Parse the Elf file */
+ {
+ Elf32_Ehdr *ehdr;
+ Elf32_Phdr *phdr;
+ unsigned long bbs;
+ ehdr = (Elf32_Ehdr *)buf;
+ phdr = (Elf32_Phdr *)&buf[ehdr->e_phoff];
+
+ entry = ehdr->e_entry;
+ img = (unsigned char *)&buf[phdr->p_offset];
+ start = (phdr->p_paddr) & 0x1fffffff;
+ bbs = phdr->p_filesz;
+ size = phdr->p_memsz;
+
+ if(size < bbs){
+ size = bbs;
+ }
+ size = PAGE_ALIGN(size);
+ memset(&img[bbs], 0, size-bbs);
+ add_segment(info, img, size, start, size);
+ start += size;
+ }
+
+ /* miniroot file */
+ miniroot_buf = 0;
+ if (miniroot) {
+ miniroot_buf = slurp_file(miniroot, &miniroot_length);
+ howto_value |= 0x200;
+ size = PAGE_ALIGN(miniroot_length);
+ add_segment(info, miniroot_buf, size, start, size);
+ start += size;
+ }
+
+ /* howto & bootinfo */
+ param = xmalloc(4096);
+ memset(param, 0, 4096);
+ paraml = (unsigned long *) ¶m[256];
+ memcpy(param, netbsd_booter, 256);
+ paraml[0] = entry;
+ paraml[1] = howto_value;
+ add_segment(info, param, 4096, start, 4096);
+
+ /* For now we don't have arguments to pass :( */
+ info->entry = (void *) (start | 0xa0000000);
+ return 0;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/kexec-sh.c new/kexec-tools/kexec/arch/sh/kexec-sh.c
--- old/kexec-tools/kexec/arch/sh/kexec-sh.c 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/kexec-sh.c 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,176 @@
+/*
+ * kexec-sh.c - kexec for the SH
+ * Copyright (C) 2004 kogiidena@eggplant.ddo.jp
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+
+#define _GNU_SOURCE
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "../../kexec.h"
+#include "../../kexec-syscall.h"
+#include "kexec-sh.h"
+#include
+
+#define MAX_MEMORY_RANGES 64
+#define MAX_LINE 160
+static struct memory_range memory_range[MAX_MEMORY_RANGES];
+
+/* Return a sorted list of available memory ranges. */
+int get_memory_ranges(struct memory_range **range, int *ranges,
+ unsigned long kexec_flags)
+{
+ int memory_ranges;
+
+ memory_ranges = 0;
+ memory_range[memory_ranges].start = 0x08000000;
+ memory_range[memory_ranges].end = 0x10000000;
+ memory_range[memory_ranges].type = RANGE_RAM;
+ memory_ranges++;
+ *range = memory_range;
+ *ranges = memory_ranges;
+ return 0;
+}
+
+/* Supported file types and callbacks */
+struct file_type file_type[] = {
+ {"zImage-sh", zImage_sh_probe, zImage_sh_load, zImage_sh_usage},
+ {"netbsd-sh", netbsd_sh_probe, netbsd_sh_load, netbsd_sh_usage},
+};
+int file_types = sizeof(file_type) / sizeof(file_type[0]);
+
+
+void arch_usage(void)
+{
+
+ printf(
+ " none\n\n"
+ "Default options:\n"
+ " --append=\"%s\"\n"
+ " --empty-zero=0x%08x\n\n"
+ " STRING of --appned is set form /proc/cmdline as default.\n"
+ " ADDRESS of --empty-zero can be set SHELL environment variable\n"
+ " KEXEC_EMPTY_ZERO as default.\n\n"
+ " ADDRESS can be get in the following method in your system. \n"
+ " 1) \"grep empty_zero /proc/kallsyms\". \n"
+ " 2) \"grep empty_zero System.map\". \n"
+ " 3) CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET in your kernel\n"
+ " config file.\n"
+ ,get_append(), (unsigned int) get_empty_zero(NULL));
+
+}
+
+static struct {
+} arch_options = {
+};
+int arch_process_options(int argc, char **argv)
+{
+ static const struct option options[] = {
+ KEXEC_ARCH_OPTIONS
+ { 0, 0, NULL, 0 },
+ };
+ static const char short_options[] = KEXEC_ARCH_OPT_STR;
+ int opt;
+
+ opterr = 0; /* Don't complain about unrecognized options here */
+ while((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
+ switch(opt) {
+ default:
+ /* Ignore core options */
+ if (opt < OPT_MAX) {
+ break;
+ }
+ case '?':
+ usage();
+ return -1;
+ case OPT_APPEND:
+ case OPT_NBSD_HOWTO:
+ case OPT_NBSD_MROOT:
+ ;
+ }
+ }
+ /* Reset getopt for the next pass; called in other source modules */
+ opterr = 1;
+ optind = 1;
+ return 0;
+}
+
+int arch_compat_trampoline(struct kexec_info *info)
+{
+ int result;
+ struct utsname utsname;
+ result = uname(&utsname);
+ if (result < 0) {
+ fprintf(stderr, "uname failed: %s\n",
+ strerror(errno));
+ return -1;
+ }
+ if ( (strcmp(utsname.machine, "sh3") == 0) ||
+ (strcmp(utsname.machine, "sh4") == 0))
+ {
+ /* For compatibility with older patches
+ * use KEXEC_ARCH_DEFAULT instead of KEXEC_ARCH_IA64 here.
+ */
+ info->kexec_flags |= KEXEC_ARCH_DEFAULT;
+ }
+ else {
+ fprintf(stderr, "Unsupported machine type: %s\n",
+ utsname.machine);
+ return -1;
+ }
+ return 0;
+}
+
+void arch_update_purgatory(struct kexec_info *info)
+{
+}
+
+
+unsigned long get_empty_zero(char *s)
+{
+ char *env;
+
+ env = getenv("KEXEC_EMPTY_ZERO");
+
+ if(s){
+ env = s;
+ }else if(!env){
+ env = "0x0c001000";
+ }
+ return 0x1fffffff & strtoul(env,(char **)NULL,0);
+}
+
+char append_buf[256];
+
+char *get_append(void)
+{
+ FILE *fp;
+ int len;
+ if((fp = fopen("/proc/cmdline", "r")) == NULL){
+ printf("/proc/cmdline file open error !!\n");
+ exit(1);
+ }
+ fgets(append_buf, 256, fp);
+ len = strlen(append_buf);
+ append_buf[len-1] = 0;
+ fclose(fp);
+ return append_buf;
+}
+
+
+int is_crashkernel_mem_reserved(void)
+{
+ uint64_t start, end;
+
+ return parse_iomem_single("Crash kernel\n", &start, &end) == 0 ?
+ (start != end) : 0;
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/kexec-sh.h new/kexec-tools/kexec/arch/sh/kexec-sh.h
--- old/kexec-tools/kexec/arch/sh/kexec-sh.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/kexec-sh.h 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,17 @@
+#ifndef KEXEC_SH_H
+#define KEXEC_SH_H
+
+int zImage_sh_probe(const char *buf, off_t len);
+int zImage_sh_load(int argc, char **argv, const char *buf, off_t len,
+ struct kexec_info *info);
+void zImage_sh_usage(void);
+
+int netbsd_sh_probe(const char *buf, off_t len);
+int netbsd_sh_load(int argc, char **argv, const char *buf, off_t len,
+ struct kexec_info *info);
+void netbsd_sh_usage(void);
+
+char *get_append(void);
+unsigned long get_empty_zero(char *s);
+
+#endif /* KEXEC_SH_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/kexec-zImage-sh.c new/kexec-tools/kexec/arch/sh/kexec-zImage-sh.c
--- old/kexec-tools/kexec/arch/sh/kexec-zImage-sh.c 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/kexec-zImage-sh.c 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,106 @@
+/*
+ * kexec-zImage-sh.c - kexec zImage loader for the SH
+ * Copyright (C) 2005 kogiidena@eggplant.ddo.jp
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+
+#define _GNU_SOURCE
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "../../kexec.h"
+#include "../../kexec-elf.h"
+#include
+#include "kexec-sh.h"
+
+static const int probe_debug = 0;
+
+/*
+ * zImage_sh_probe - sanity check the elf image
+ *
+ * Make sure that the file image has a reasonable chance of working.
+ */
+int zImage_sh_probe(const char *buf, off_t len)
+{
+ if (memcmp(&buf[0x202], "HdrS", 4) != 0) {
+ fprintf(stderr, "Not a zImage\n");
+ return -1;
+ }
+ return 0;
+}
+
+void zImage_sh_usage(void)
+{
+ printf(
+ " --append=STRING Set the kernel command line to STRING.\n"
+ " --empty-zero=ADDRESS Set the kernel top ADDRESS. \n\n");
+
+}
+
+int zImage_sh_load(int argc, char **argv, const char *buf, off_t len,
+ struct kexec_info *info)
+{
+ char *command_line;
+ int opt;
+ unsigned long empty_zero, area;
+ unsigned char *param;
+ unsigned long *paraml;
+
+ static const struct option options[] = {
+ KEXEC_ARCH_OPTIONS
+ {0, 0, 0, 0},
+ };
+
+ static const char short_options[] = KEXEC_ARCH_OPT_STR "";
+
+ command_line = 0;
+ empty_zero = get_empty_zero(NULL);
+ while ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
+ switch (opt) {
+ default:
+ /* Ignore core options */
+ if (opt < OPT_ARCH_MAX) {
+ break;
+ }
+ case '?':
+ usage();
+ return -1;
+ case OPT_APPEND:
+ command_line = optarg;
+ break;
+ case OPT_EMPTYZERO:
+ empty_zero = get_empty_zero(optarg);
+ break;
+ }
+ }
+ param = xmalloc(4096);
+ memset(param, 0, 4096);
+ area = empty_zero & 0x1c000000;
+ if (!command_line) {
+ command_line = get_append();
+ }
+ strncpy(¶m[256], command_line, strlen(command_line));
+ paraml = (unsigned long *)param;
+ // paraml[0] = 1; // readonly flag is set as default
+
+ add_segment(info, param, 4096, empty_zero, 4096);
+ add_segment(info, buf, len, (area | 0x00210000), len);
+
+ /* For now we don't have arguments to pass :( */
+ info->entry = (void *)(0x80210000 | area);
+ return 0;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/Makefile new/kexec-tools/kexec/arch/sh/Makefile
--- old/kexec-tools/kexec/arch/sh/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/Makefile 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,8 @@
+#
+# kexec sh (linux booting linux)
+#
+KEXEC_C_SRCS+= kexec/arch/sh/kexec-sh.c
+KEXEC_C_SRCS+= kexec/arch/sh/kexec-zImage-sh.c
+KEXEC_C_SRCS+= kexec/arch/sh/kexec-netbsd-sh.c
+KEXEC_C_SRCS+= kexec/arch/sh/kexec-elf-rel-sh.c
+KEXEC_S_SRCS+= kexec/arch/sh/netbsd_booter.S
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/arch/sh/netbsd_booter.S new/kexec-tools/kexec/arch/sh/netbsd_booter.S
--- old/kexec-tools/kexec/arch/sh/netbsd_booter.S 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/kexec/arch/sh/netbsd_booter.S 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,47 @@
+ .globl netbsd_booter
+netbsd_booter:
+ mov.l ccr,r0
+ mov #0,r1
+ mov.l r1,@r0
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ mova netbsd_start,r0
+ mov.l @r0,r1
+ add #4,r0
+ mov.l @r0,r4 ! howto
+ add #4,r0
+ mov r0,r5 ! bootinfo
+ jmp @r1
+ nop
+ nop
+ nop
+ .align 4
+ccr: .long 0xff00001c
+
+ .align 8
+netbsd_start:
+ .long 0x8c001000
+ .long 0x200 ! howto
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+ .long 0 ! bootinfo
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/crashdump.c new/kexec-tools/kexec/crashdump.c
--- old/kexec-tools/kexec/crashdump.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/crashdump.c 2007-02-03 04:23:31.000000000 +0100
@@ -31,18 +31,22 @@
/* include "crashdump-elf.c" twice to create two functions from one */
+#define ELF_WIDTH 64
#define FUNC crash_create_elf64_headers
#define EHDR Elf64_Ehdr
#define PHDR Elf64_Phdr
#include "crashdump-elf.c"
+#undef ELF_WIDTH
#undef PHDR
#undef EHDR
#undef FUNC
+#define ELF_WIDTH 32
#define FUNC crash_create_elf32_headers
#define EHDR Elf32_Ehdr
#define PHDR Elf32_Phdr
#include "crashdump-elf.c"
+#undef ELF_WIDTH
#undef PHDR
#undef EHDR
#undef FUNC
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/crashdump-elf.c new/kexec-tools/kexec/crashdump-elf.c
--- old/kexec-tools/kexec/crashdump-elf.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/crashdump-elf.c 2007-02-03 04:23:31.000000000 +0100
@@ -3,6 +3,26 @@
#error FUNC, EHDR and PHDR must be defined
#endif
+#if (ELF_WIDTH == 64)
+#define dfprintf_phdr(fh, prefix, phdr) \
+do { \
+ dfprintf((fh), \
+ "%s: p_type = %u, p_offset = 0x%lx p_paddr = 0x%lx " \
+ "p_vaddr = 0x%lx p_filesz = 0x%lx p_memsz = 0x%lx\n", \
+ (prefix), (phdr)->p_type, (phdr)->p_offset, (phdr)->p_paddr, \
+ (phdr)->p_vaddr, (phdr)->p_filesz, (phdr)->p_memsz); \
+} while(0)
+#else
+#define dfprintf_phdr(fh, prefix, phdr) \
+do { \
+ dfprintf((fh), \
+ "%s: p_type = %u, p_offset = 0x%x " "p_paddr = 0x%x " \
+ "p_vaddr = 0x%x p_filesz = 0x%x p_memsz = 0x%x\n", \
+ (prefix), (phdr)->p_type, (phdr)->p_offset, (phdr)->p_paddr, \
+ (phdr)->p_vaddr, (phdr)->p_filesz, (phdr)->p_memsz); \
+} while(0)
+#endif
+
/* Prepares the crash memory headers and stores in supplied buffer. */
int FUNC(struct kexec_info *info,
struct crash_elf_info *elf_info,
@@ -120,11 +140,7 @@
/* Increment number of program headers. */
(elf->e_phnum)++;
- dfprintf(stdout, "Elf header: p_type = %d, p_offset = 0x%lx "
- "p_paddr = 0x%lx p_vaddr = 0x%lx "
- "p_filesz = 0x%lx p_memsz = 0x%lx\n",
- phdr->p_type, phdr->p_offset, phdr->p_paddr,
- phdr->p_vaddr, phdr->p_filesz, phdr->p_memsz);
+ dfprintf_phdr(stdout, "Elf header", phdr);
}
/* Setup an PT_LOAD type program header for the region where
@@ -141,12 +157,7 @@
phdr->p_filesz = phdr->p_memsz = info->kern_size;
phdr->p_align = 0;
(elf->e_phnum)++;
- dfprintf(stdout, "Kernel text Elf header: "
- "p_type = %d, p_offset = 0x%lx "
- "p_paddr = 0x%lx p_vaddr = 0x%lx "
- "p_filesz = 0x%lx p_memsz = 0x%lx\n",
- phdr->p_type, phdr->p_offset, phdr->p_paddr,
- phdr->p_vaddr, phdr->p_filesz, phdr->p_memsz);
+ dfprintf_phdr(stdout, "Kernel text Elf header", phdr);
}
/* Setup PT_LOAD type program header for every system RAM chunk.
@@ -187,11 +198,9 @@
/* Increment number of program headers. */
(elf->e_phnum)++;
- dfprintf(stdout, "Elf header: p_type = %d, p_offset = 0x%lx "
- "p_paddr = 0x%lx p_vaddr = 0x%lx "
- "p_filesz = 0x%lx p_memsz = 0x%lx\n",
- phdr->p_type, phdr->p_offset, phdr->p_paddr,
- phdr->p_vaddr, phdr->p_filesz, phdr->p_memsz);
+ dfprintf_phdr(stdout, "Elf header", phdr);
}
return 0;
}
+
+#undef dfprintf_phdr
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/kexec.c new/kexec-tools/kexec/kexec.c
--- old/kexec-tools/kexec/kexec.c 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/kexec.c 2007-02-03 04:23:31.000000000 +0100
@@ -58,6 +58,8 @@
{
void *buf;
buf = malloc(size);
+ if (!size)
+ return NULL;
if (!buf) {
die("Cannot malloc %ld bytes: %s\n",
size + 0UL, strerror(errno));
@@ -196,7 +198,7 @@
/* Compute the free memory ranges */
max_mem_ranges = memory_ranges + info->nr_segments;
- mem_range = malloc(max_mem_ranges *sizeof(struct memory_range));
+ mem_range = xmalloc(max_mem_ranges *sizeof(struct memory_range));
mem_ranges = 0;
/* Perform a merge on the 2 sorted lists of memory ranges */
@@ -220,7 +222,7 @@
mstart = send +1;
j++;
}
- if (mstart <= mend) {
+ if (mstart < mend) {
mem_range[mem_ranges].start = mstart;
mem_range[mem_ranges].end = mend;
mem_range[mem_ranges].type = RANGE_RAM;
@@ -265,6 +267,7 @@
}
}
}
+ free(mem_range);
if (hole_base == ULONG_MAX) {
fprintf(stderr, "Could not find a free area of memory of "
"%lx bytes...\n", hole_size);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/kexec/kexec-syscall.h new/kexec-tools/kexec/kexec-syscall.h
--- old/kexec-tools/kexec/kexec-syscall.h 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/kexec/kexec-syscall.h 2007-02-03 04:23:31.000000000 +0100
@@ -25,6 +25,9 @@
#ifdef __i386__
#define __NR_kexec_load 283
#endif
+#ifdef __sh__
+#define __NR_kexec_load 283
+#endif
#ifdef __ia64__
#define __NR_kexec_load 1268
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/Makefile new/kexec-tools/Makefile
--- old/kexec-tools/Makefile 2006-12-18 04:05:14.000000000 +0100
+++ new/kexec-tools/Makefile 2007-02-03 04:23:31.000000000 +0100
@@ -1,6 +1,6 @@
# Hey Emacs this is a -*- makefile-*-
include Makefile.conf
-VERSION=20061214
+VERSION=20061214-git
DATE=14th December 2006
PACKAGE=kexec-tools-testing
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/purgatory/arch/sh/include/limits.h new/kexec-tools/purgatory/arch/sh/include/limits.h
--- old/kexec-tools/purgatory/arch/sh/include/limits.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/purgatory/arch/sh/include/limits.h 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,58 @@
+#ifndef LIMITS_H
+#define LIMITS_H 1
+
+
+/* Number of bits in a `char' */
+#define CHAR_BIT 8
+
+/* Minimum and maximum values a `signed char' can hold */
+#define SCHAR_MIN (-128)
+#define SCHAR_MAX 127
+
+/* Maximum value an `unsigned char' can hold. (Minimum is 0.) */
+#define UCHAR_MAX 255
+
+/* Minimum and maximum values a `char' can hold */
+#define CHAR_MIN SCHAR_MIN
+#define CHAR_MAX SCHAR_MAX
+
+/* Minimum and maximum values a `signed short int' can hold */
+#define SHRT_MIN (-32768)
+#define SHRT_MAX 32767
+
+/* Maximum value an `unsigned short' can hold. (Minimum is 0.) */
+#define USHRT_MAX 65535
+
+
+/* Minimum and maximum values a `signed int' can hold */
+#define INT_MIN (-INT_MAX - 1)
+#define INT_MAX 2147483647
+
+/* Maximum value an `unsigned int' can hold. (Minimum is 0.) */
+#define UINT_MAX 4294967295U
+
+
+/* Minimum and maximum values a `signed int' can hold */
+#define INT_MIN (-INT_MAX - 1)
+#define INT_MAX 2147483647
+
+/* Maximum value an `unsigned int' can hold. (Minimum is 0.) */
+#define UINT_MAX 4294967295U
+
+/* Minimum and maximum values a `signed long' can hold */
+#define LONG_MAX 2147483647L
+#define LONG_MIN (-LONG_MAX - 1L)
+
+/* Maximum value an `unsigned long' can hold. (Minimum is 0.) */
+#define ULONG_MAX 4294967295UL
+
+/* Minimum and maximum values a `signed long long' can hold */
+#define LLONG_MAX 9223372036854775807LL
+#define LLONG_MIN (-LONG_MAX - 1LL)
+
+
+/* Maximum value an `unsigned long long' can hold. (Minimum is 0.) */
+#define ULLONG_MAX 18446744073709551615ULL
+
+
+#endif /* LIMITS_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/purgatory/arch/sh/include/stdint.h new/kexec-tools/purgatory/arch/sh/include/stdint.h
--- old/kexec-tools/purgatory/arch/sh/include/stdint.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/purgatory/arch/sh/include/stdint.h 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,16 @@
+#ifndef STDINT_H
+#define STDINT_H
+
+typedef unsigned long size_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+typedef signed long long int64_t;
+
+#endif /* STDINT_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kexec-tools/purgatory/arch/sh/Makefile new/kexec-tools/purgatory/arch/sh/Makefile
--- old/kexec-tools/purgatory/arch/sh/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/kexec-tools/purgatory/arch/sh/Makefile 2007-02-03 04:23:31.000000000 +0100
@@ -0,0 +1,7 @@
+#
+# Purgatory alpha
+#
+
+PURGATORY_C_SRCS+=
+PURGATORY_S_SRCS+=
+
++++++ README.SUSE ++++++
--- kexec-tools/README.SUSE 2007-01-25 19:30:07.000000000 +0100
+++ /mounts/work_src_done/STABLE/kexec-tools/README.SUSE 2007-02-05 12:47:11.138472000 +0100
@@ -208,6 +208,13 @@
/proc/cmdline.
+- KDUMP_COMMANDLINE_APPEND
+
+Set this variable if you only want to _append_ values to the default
+command line string. The string gets also appended if KDUMP_COMMANDLINE
+is set.
+
+
- KEXEC_OPTIONS
You can use this to pass additional arguments to kexec. For i386 and
++++++ sysconfig.kdump ++++++
--- kexec-tools/sysconfig.kdump 2007-01-25 19:30:07.000000000 +0100
+++ /mounts/work_src_done/STABLE/kexec-tools/sysconfig.kdump 2007-02-05 12:47:11.142454000 +0100
@@ -27,6 +27,16 @@
#
KDUMP_COMMANDLINE=""
+## Type: string
+## Default: ""
+## ServiceRestart: kdump
+#
+# Set this variable if you only want to _append_ values to the default
+# command line string. The string gets also appended if KDUMP_COMMANDLINE
+# is set.
+#
+KDUMP_COMMANDLINE_APPEND=""
+
## Type: string
## Default: ""
## ServiceRestart: kdump
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org