- the arm patch broke anybody else.
- restructure patches per task they fulfil
This commit is contained in:
parent
8cb4e4054e
commit
fc613ea410
27
package/kexec/kexec-tools-001-smaller-reboot.patch
Normal file
27
package/kexec/kexec-tools-001-smaller-reboot.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--- kexec-tools-1.101.orig/kexec/kexec.c 2006-09-20 04:39:38.000000000 +0200
|
||||||
|
+++ kexec-tools-1.101/kexec/kexec.c 2007-01-22 15:58:30.000000000 +0100
|
||||||
|
@@ -630,19 +630,14 @@ int k_unload (unsigned long kexec_flags)
|
||||||
|
*/
|
||||||
|
static int my_shutdown(void)
|
||||||
|
{
|
||||||
|
- char *args[8];
|
||||||
|
- int i = 0;
|
||||||
|
+ char *args[2];
|
||||||
|
|
||||||
|
- args[i++] = "shutdown";
|
||||||
|
- args[i++] = "-r";
|
||||||
|
- args[i++] = "now";
|
||||||
|
- args[i++] = NULL;
|
||||||
|
+ args[0] = "reboot";
|
||||||
|
+ args[1] = NULL;
|
||||||
|
|
||||||
|
- execv("/sbin/shutdown", args);
|
||||||
|
- execv("/etc/shutdown", args);
|
||||||
|
- execv("/bin/shutdown", args);
|
||||||
|
+ execv("/sbin/reboot", args);
|
||||||
|
|
||||||
|
- perror("shutdown");
|
||||||
|
+ perror("reboot");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
diff -uNr kexec-tools-1.101.orig/configure kexec-tools-1.101/configure
|
diff -rduNp kexec-tools-1.101.orig/configure kexec-tools-1.101/configure
|
||||||
--- kexec-tools-1.101.orig/configure 2005-02-16 13:37:44.000000000 +0100
|
--- kexec-tools-1.101.orig/configure 2006-09-20 04:39:38.000000000 +0200
|
||||||
+++ kexec-tools-1.101/configure 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/configure 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -1381,6 +1381,9 @@
|
@@ -1381,6 +1381,9 @@ case $host_cpu in
|
||||||
i?86 )
|
i?86 )
|
||||||
host_cpu="i386"
|
host_cpu="i386"
|
||||||
;;
|
;;
|
||||||
@ -11,7 +11,7 @@ diff -uNr kexec-tools-1.101.orig/configure kexec-tools-1.101/configure
|
|||||||
powerpc )
|
powerpc )
|
||||||
host_cpu="ppc"
|
host_cpu="ppc"
|
||||||
;;
|
;;
|
||||||
@@ -1389,7 +1392,7 @@
|
@@ -1395,7 +1398,7 @@ case $host_cpu in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
@ -20,9 +20,9 @@ diff -uNr kexec-tools-1.101.orig/configure kexec-tools-1.101/configure
|
|||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
{ { echo "$as_me:$LINENO: error: unsupported architecture $host_cpu" >&5
|
{ { echo "$as_me:$LINENO: error: unsupported architecture $host_cpu" >&5
|
||||||
diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/Makefile kexec-tools-1.101/kexec/arch/arm/Makefile
|
diff -rduNp kexec-tools-1.101.orig/kexec/arch/arm/Makefile kexec-tools-1.101/kexec/arch/arm/Makefile
|
||||||
--- kexec-tools-1.101.orig/kexec/arch/arm/Makefile 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/kexec/arch/arm/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/kexec/arch/arm/Makefile 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/kexec/arch/arm/Makefile 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,8 @@
|
@@ -0,0 +1,8 @@
|
||||||
+#
|
+#
|
||||||
+# kexec arm (linux booting linux)
|
+# kexec arm (linux booting linux)
|
||||||
@ -32,10 +32,9 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/Makefile kexec-tools-1.101/kexec
|
|||||||
+KEXEC_C_SRCS+= kexec/arch/arm/kexec-arm.c
|
+KEXEC_C_SRCS+= kexec/arch/arm/kexec-arm.c
|
||||||
+
|
+
|
||||||
+KEXEC_S_SRCS+=
|
+KEXEC_S_SRCS+=
|
||||||
|
diff -rduNp kexec-tools-1.101.orig/kexec/arch/arm/include/arch/options.h kexec-tools-1.101/kexec/arch/arm/include/arch/options.h
|
||||||
diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/include/arch/options.h kexec-tools-1.101/kexec/arch/arm/include/arch/options.h
|
|
||||||
--- kexec-tools-1.101.orig/kexec/arch/arm/include/arch/options.h 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/kexec/arch/arm/include/arch/options.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/kexec/arch/arm/include/arch/options.h 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/kexec/arch/arm/include/arch/options.h 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,11 @@
|
@@ -0,0 +1,11 @@
|
||||||
+#ifndef KEXEC_ARCH_ARM_OPTIONS_H
|
+#ifndef KEXEC_ARCH_ARM_OPTIONS_H
|
||||||
+#define KEXEC_ARCH_ARM_OPTIONS_H
|
+#define KEXEC_ARCH_ARM_OPTIONS_H
|
||||||
@ -48,10 +47,10 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/include/arch/options.h kexec-too
|
|||||||
+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
|
+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
|
||||||
+
|
+
|
||||||
+#endif /* KEXEC_ARCH_ARM_OPTIONS_H */
|
+#endif /* KEXEC_ARCH_ARM_OPTIONS_H */
|
||||||
diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c kexec-tools-1.101/kexec/arch/arm/kexec-arm.c
|
diff -rduNp kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c kexec-tools-1.101/kexec/arch/arm/kexec-arm.c
|
||||||
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/kexec/arch/arm/kexec-arm.c 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/kexec/arch/arm/kexec-arm.c 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,133 @@
|
@@ -0,0 +1,130 @@
|
||||||
+/*
|
+/*
|
||||||
+ * kexec: Linux boots Linux
|
+ * kexec: Linux boots Linux
|
||||||
+ *
|
+ *
|
||||||
@ -159,7 +158,7 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c kexec-tools-1.101/ke
|
|||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+int arch_compat_trampoline(struct kexec_info *info, unsigned long *flags)
|
+int arch_compat_trampoline(struct kexec_info *info)
|
||||||
+{
|
+{
|
||||||
+ int result;
|
+ int result;
|
||||||
+ struct utsname utsname;
|
+ struct utsname utsname;
|
||||||
@ -169,11 +168,8 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c kexec-tools-1.101/ke
|
|||||||
+ strerror(errno));
|
+ strerror(errno));
|
||||||
+ return -1;
|
+ return -1;
|
||||||
+ }
|
+ }
|
||||||
+ if (strncmp(utsname.machine, "arm",3) == 0)
|
+ if (strncmp(utsname.machine, "arm",3) != 0)
|
||||||
+ {
|
+ {
|
||||||
+ *flags |= KEXEC_ARCH_ARM;
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ fprintf(stderr, "Unsupported machine type: %s\n",
|
+ fprintf(stderr, "Unsupported machine type: %s\n",
|
||||||
+ utsname.machine);
|
+ utsname.machine);
|
||||||
+ return -1;
|
+ return -1;
|
||||||
@ -185,9 +181,9 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c kexec-tools-1.101/ke
|
|||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.h kexec-tools-1.101/kexec/arch/arm/kexec-arm.h
|
diff -rduNp kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.h kexec-tools-1.101/kexec/arch/arm/kexec-arm.h
|
||||||
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.h 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/kexec/arch/arm/kexec-arm.h 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/kexec/arch/arm/kexec-arm.h 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,9 @@
|
@@ -0,0 +1,9 @@
|
||||||
+#ifndef KEXEC_ARM_H
|
+#ifndef KEXEC_ARM_H
|
||||||
+#define KEXEC_ARM_H
|
+#define KEXEC_ARM_H
|
||||||
@ -198,9 +194,9 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.h kexec-tools-1.101/ke
|
|||||||
+void zImage_arm_usage(void);
|
+void zImage_arm_usage(void);
|
||||||
+
|
+
|
||||||
+#endif /* KEXEC_ARM_H */
|
+#endif /* KEXEC_ARM_H */
|
||||||
diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-elf-rel-arm.c kexec-tools-1.101/kexec/arch/arm/kexec-elf-rel-arm.c
|
diff -rduNp kexec-tools-1.101.orig/kexec/arch/arm/kexec-elf-rel-arm.c kexec-tools-1.101/kexec/arch/arm/kexec-elf-rel-arm.c
|
||||||
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-elf-rel-arm.c 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-elf-rel-arm.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/kexec/arch/arm/kexec-elf-rel-arm.c 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/kexec/arch/arm/kexec-elf-rel-arm.c 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,35 @@
|
@@ -0,0 +1,35 @@
|
||||||
+#include <stdio.h>
|
+#include <stdio.h>
|
||||||
+#include <elf.h>
|
+#include <elf.h>
|
||||||
@ -237,9 +233,9 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-elf-rel-arm.c kexec-tools-
|
|||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-zImage-arm.c kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c
|
diff -rduNp kexec-tools-1.101.orig/kexec/arch/arm/kexec-zImage-arm.c kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c
|
||||||
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-zImage-arm.c 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-zImage-arm.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,34 @@
|
@@ -0,0 +1,34 @@
|
||||||
+#define _GNU_SOURCE
|
+#define _GNU_SOURCE
|
||||||
+#include <stdio.h>
|
+#include <stdio.h>
|
||||||
@ -275,10 +271,10 @@ diff -uNr kexec-tools-1.101.orig/kexec/arch/arm/kexec-zImage-arm.c kexec-tools-1
|
|||||||
+ info->entry = (void*)base;
|
+ info->entry = (void*)base;
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff -uNr kexec-tools-1.101.orig/kexec/kexec-syscall.h kexec-tools-1.101/kexec/kexec-syscall.h
|
diff -rduNp kexec-tools-1.101.orig/kexec/kexec-syscall.h kexec-tools-1.101/kexec/kexec-syscall.h
|
||||||
--- kexec-tools-1.101.orig/kexec/kexec-syscall.h 2005-01-06 07:59:50.000000000 +0100
|
--- kexec-tools-1.101.orig/kexec/kexec-syscall.h 2006-09-20 04:39:38.000000000 +0200
|
||||||
+++ kexec-tools-1.101/kexec/kexec-syscall.h 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/kexec/kexec-syscall.h 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -37,6 +37,9 @@
|
@@ -43,6 +43,9 @@
|
||||||
#ifdef __s390__
|
#ifdef __s390__
|
||||||
#define __NR_kexec_load 277
|
#define __NR_kexec_load 277
|
||||||
#endif
|
#endif
|
||||||
@ -288,7 +284,7 @@ diff -uNr kexec-tools-1.101.orig/kexec/kexec-syscall.h kexec-tools-1.101/kexec/k
|
|||||||
#ifndef __NR_kexec_load
|
#ifndef __NR_kexec_load
|
||||||
#error Unknown processor architecture. Needs a kexec_load syscall number.
|
#error Unknown processor architecture. Needs a kexec_load syscall number.
|
||||||
#endif
|
#endif
|
||||||
@@ -67,6 +70,7 @@
|
@@ -74,6 +77,7 @@ static inline long kexec_reboot(void)
|
||||||
#define KEXEC_ARCH_PPC64 (21 << 16)
|
#define KEXEC_ARCH_PPC64 (21 << 16)
|
||||||
#define KEXEC_ARCH_IA_64 (50 << 16)
|
#define KEXEC_ARCH_IA_64 (50 << 16)
|
||||||
#define KEXEC_ARCH_S390 (22 << 16)
|
#define KEXEC_ARCH_S390 (22 << 16)
|
||||||
@ -296,9 +292,9 @@ diff -uNr kexec-tools-1.101.orig/kexec/kexec-syscall.h kexec-tools-1.101/kexec/k
|
|||||||
|
|
||||||
#define KEXEC_MAX_SEGMENTS 16
|
#define KEXEC_MAX_SEGMENTS 16
|
||||||
|
|
||||||
diff -uNr kexec-tools-1.101.orig/purgatory/arch/arm/Makefile kexec-tools-1.101/purgatory/arch/arm/Makefile
|
diff -rduNp kexec-tools-1.101.orig/purgatory/arch/arm/Makefile kexec-tools-1.101/purgatory/arch/arm/Makefile
|
||||||
--- kexec-tools-1.101.orig/purgatory/arch/arm/Makefile 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/purgatory/arch/arm/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/purgatory/arch/arm/Makefile 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/purgatory/arch/arm/Makefile 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,7 @@
|
@@ -0,0 +1,7 @@
|
||||||
+#
|
+#
|
||||||
+# Purgatory arm
|
+# Purgatory arm
|
||||||
@ -307,9 +303,9 @@ diff -uNr kexec-tools-1.101.orig/purgatory/arch/arm/Makefile kexec-tools-1.101/p
|
|||||||
+PURGATORY_S_SRCS +=
|
+PURGATORY_S_SRCS +=
|
||||||
+PURGATORY_C_SRCS +=
|
+PURGATORY_C_SRCS +=
|
||||||
+
|
+
|
||||||
diff -uNr kexec-tools-1.101.orig/purgatory/arch/arm/include/limits.h kexec-tools-1.101/purgatory/arch/arm/include/limits.h
|
diff -rduNp kexec-tools-1.101.orig/purgatory/arch/arm/include/limits.h kexec-tools-1.101/purgatory/arch/arm/include/limits.h
|
||||||
--- kexec-tools-1.101.orig/purgatory/arch/arm/include/limits.h 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/purgatory/arch/arm/include/limits.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/purgatory/arch/arm/include/limits.h 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/purgatory/arch/arm/include/limits.h 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,58 @@
|
@@ -0,0 +1,58 @@
|
||||||
+#ifndef LIMITS_H
|
+#ifndef LIMITS_H
|
||||||
+#define LIMITS_H 1
|
+#define LIMITS_H 1
|
||||||
@ -369,9 +365,9 @@ diff -uNr kexec-tools-1.101.orig/purgatory/arch/arm/include/limits.h kexec-tools
|
|||||||
+
|
+
|
||||||
+
|
+
|
||||||
+#endif /* LIMITS_H */
|
+#endif /* LIMITS_H */
|
||||||
diff -uNr kexec-tools-1.101.orig/purgatory/arch/arm/include/stdint.h kexec-tools-1.101/purgatory/arch/arm/include/stdint.h
|
diff -rduNp kexec-tools-1.101.orig/purgatory/arch/arm/include/stdint.h kexec-tools-1.101/purgatory/arch/arm/include/stdint.h
|
||||||
--- kexec-tools-1.101.orig/purgatory/arch/arm/include/stdint.h 1970-01-01 01:00:00.000000000 +0100
|
--- kexec-tools-1.101.orig/purgatory/arch/arm/include/stdint.h 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ kexec-tools-1.101/purgatory/arch/arm/include/stdint.h 2006-12-17 23:05:16.000000000 +0100
|
+++ kexec-tools-1.101/purgatory/arch/arm/include/stdint.h 2007-01-22 15:54:14.000000000 +0100
|
||||||
@@ -0,0 +1,16 @@
|
@@ -0,0 +1,16 @@
|
||||||
+#ifndef STDINT_H
|
+#ifndef STDINT_H
|
||||||
+#define STDINT_H
|
+#define STDINT_H
|
||||||
@ -389,78 +385,3 @@ diff -uNr kexec-tools-1.101.orig/purgatory/arch/arm/include/stdint.h kexec-tools
|
|||||||
+typedef signed long long int64_t;
|
+typedef signed long long int64_t;
|
||||||
+
|
+
|
||||||
+#endif /* STDINT_H */
|
+#endif /* STDINT_H */
|
||||||
diff -ur kexec-tools-1.101/kexec/arch/arm/kexec-arm.c kexec-tools-1.101.patched/kexec/arch/arm/kexec-arm.c
|
|
||||||
--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-arm.c 2006-12-20 16:41:12.000000000 +0100
|
|
||||||
+++ kexec-tools-1.101/kexec/arch/arm/kexec-arm.c 2006-12-20 16:40:19.000000000 +0100
|
|
||||||
@@ -105,7 +105,7 @@
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int arch_compat_trampoline(struct kexec_info *info, unsigned long *flags)
|
|
||||||
+int arch_compat_trampoline(struct kexec_info *info)
|
|
||||||
{
|
|
||||||
int result;
|
|
||||||
struct utsname utsname;
|
|
||||||
@@ -115,11 +115,8 @@
|
|
||||||
strerror(errno));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
- if (strncmp(utsname.machine, "arm",3) == 0)
|
|
||||||
+ if (strncmp(utsname.machine, "arm",3) != 0)
|
|
||||||
{
|
|
||||||
- *flags |= KEXEC_ARCH_ARM;
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
fprintf(stderr, "Unsupported machine type: %s\n",
|
|
||||||
utsname.machine);
|
|
||||||
return -1;
|
|
||||||
diff -ur kexec-tools-1.101/kexec/kexec.c kexec-tools-1.101.patched/kexec/kexec.c
|
|
||||||
--- kexec-tools-1.101.orig/kexec/kexec.c 2006-09-20 04:39:38.000000000 +0200
|
|
||||||
+++ kexec-tools-1.101/kexec/kexec.c 2006-12-20 16:39:10.000000000 +0100
|
|
||||||
@@ -532,8 +532,7 @@
|
|
||||||
kernel_buf, kernel_size);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- if (get_memory_ranges(&memory_range, &memory_ranges,
|
|
||||||
- info.kexec_flags) < 0) {
|
|
||||||
+ if (get_memory_ranges(&memory_range, &memory_ranges) < 0) {
|
|
||||||
fprintf(stderr, "Could not get memory layout\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
diff -ur kexec-tools-1.101/kexec/kexec.h kexec-tools-1.101.patched/kexec/kexec.h
|
|
||||||
--- kexec-tools-1.101.orig/kexec/kexec.h 2006-09-20 04:39:38.000000000 +0200
|
|
||||||
+++ kexec-tools-1.101/kexec/kexec.h 2006-12-20 16:40:47.000000000 +0100
|
|
||||||
@@ -119,8 +119,7 @@
|
|
||||||
};
|
|
||||||
|
|
||||||
void usage(void);
|
|
||||||
-int get_memory_ranges(struct memory_range **range, int *ranges,
|
|
||||||
- unsigned long kexec_flags);
|
|
||||||
+int get_memory_ranges(struct memory_range **range, int *ranges);
|
|
||||||
int valid_memory_range(unsigned long sstart, unsigned long send);
|
|
||||||
int valid_memory_segment(struct kexec_segment *segment);
|
|
||||||
void print_segments(FILE *file, struct kexec_info *info);
|
|
||||||
diff -ur kexec-tools-1.101.orig/kexec/kexec.c kexec-tools-1.101/kexec/kexec.c
|
|
||||||
--- kexec-tools-1.101.orig/kexec/kexec.c 2006-12-20 17:04:59.000000000 +0100
|
|
||||||
+++ kexec-tools-1.101/kexec/kexec.c 2006-12-20 17:05:33.000000000 +0100
|
|
||||||
@@ -630,16 +630,11 @@
|
|
||||||
static int my_shutdown(void)
|
|
||||||
{
|
|
||||||
char *args[8];
|
|
||||||
- int i = 0;
|
|
||||||
|
|
||||||
- args[i++] = "shutdown";
|
|
||||||
- args[i++] = "-r";
|
|
||||||
- args[i++] = "now";
|
|
||||||
- args[i++] = NULL;
|
|
||||||
-
|
|
||||||
- execv("/sbin/shutdown", args);
|
|
||||||
- execv("/etc/shutdown", args);
|
|
||||||
- execv("/bin/shutdown", args);
|
|
||||||
+ args[0] = "reboot";
|
|
||||||
+ args[1] = NULL;
|
|
||||||
+
|
|
||||||
+ execv("/sbin/reboot", args);
|
|
||||||
|
|
||||||
perror("shutdown");
|
|
||||||
return -1;
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -rup kexec-tools-1.101.orig/kexec/kexec.c kexec-tools-1.101/kexec/kexec.c
|
|
||||||
--- kexec-tools-1.101.orig/kexec/kexec.c 2006-12-20 18:40:26.000000000 +0100
|
|
||||||
+++ kexec-tools-1.101/kexec/kexec.c 2006-12-20 18:41:02.000000000 +0100
|
|
||||||
@@ -629,7 +629,7 @@ int k_unload (unsigned long kexec_flags)
|
|
||||||
*/
|
|
||||||
static int my_shutdown(void)
|
|
||||||
{
|
|
||||||
- char *args[8];
|
|
||||||
+ char *args[2];
|
|
||||||
|
|
||||||
args[0] = "reboot";
|
|
||||||
args[1] = NULL;
|
|
@ -33,11 +33,11 @@ kexec-source: $(DL_DIR)/$(KEXEC_SOURCE) $(DL_DIR)/$(KEXEC_PATCH)
|
|||||||
|
|
||||||
$(KEXEC_DIR)/.unpacked: $(DL_DIR)/$(KEXEC_SOURCE) $(DL_DIR)/$(KEXEC_PATCH)
|
$(KEXEC_DIR)/.unpacked: $(DL_DIR)/$(KEXEC_SOURCE) $(DL_DIR)/$(KEXEC_PATCH)
|
||||||
$(KEXEC_CAT) $(DL_DIR)/$(KEXEC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
$(KEXEC_CAT) $(DL_DIR)/$(KEXEC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
||||||
toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.patch
|
|
||||||
ifneq ($(KEXEC_PATCH),)
|
ifneq ($(KEXEC_PATCH),)
|
||||||
(cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1)
|
(cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1)
|
||||||
toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
|
toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
|
||||||
endif
|
endif
|
||||||
|
toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.dpatch
|
||||||
touch $(KEXEC_DIR)/.unpacked
|
touch $(KEXEC_DIR)/.unpacked
|
||||||
|
|
||||||
$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
|
$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
|
||||||
|
Loading…
Reference in New Issue
Block a user