summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2009-09-26 18:09:19 +0200
committerAndrea Adami <andrea.adami@gmail.com>2009-09-26 18:10:50 +0200
commit3726ebb80ecb3a21c1acbd98967ab5de7b58e5a6 (patch)
treeaec87005ddc5c9c353f8149850e20c06f81b557f
parent1c1c4a18003cc8cc830262502dd96f5e1304ca57 (diff)
kexec-tools-klibc-static_2.0.1: update patch against new ver. Still broken. WIP
-rw-r--r--recipes/kexec/files/kexec-tools-2-headers.patch84
-rw-r--r--recipes/kexec/files/kexec-tools-2-klibc.patch (renamed from recipes/kexec/files/kexec2-klibc.patch)279
-rw-r--r--recipes/kexec/kexec-tools-klibc-static_2.0.1.bb5
3 files changed, 229 insertions, 139 deletions
diff --git a/recipes/kexec/files/kexec-tools-2-headers.patch b/recipes/kexec/files/kexec-tools-2-headers.patch
new file mode 100644
index 0000000000..e28b8a19b4
--- /dev/null
+++ b/recipes/kexec/files/kexec-tools-2-headers.patch
@@ -0,0 +1,84 @@
+Index: kexec-tools-2.0.1/purgatory/arch/arm/include/limits.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ kexec-tools-2.0.1/purgatory/arch/arm/include/limits.h 2006-02-06 18:28:37.031096672 +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 */
+Index: kexec-tools-2.0.1/purgatory/arch/arm/include/stdint.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ kexec-tools-2.0.1/purgatory/arch/arm/include/stdint.h 2006-02-06 18:28:37.031096672 +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 --git a/recipes/kexec/files/kexec2-klibc.patch b/recipes/kexec/files/kexec-tools-2-klibc.patch
index a7dbe61d13..c8b340e4b9 100644
--- a/recipes/kexec/files/kexec2-klibc.patch
+++ b/recipes/kexec/files/kexec-tools-2-klibc.patch
@@ -1,49 +1,21 @@
-Index: kexec-tools-2.0.0/kexec/arch/arm/kexec-elf-rel-arm.c
+Index: kexec-tools-2.0.1/kexec/kexec-elf-rel.c
===================================================================
---- kexec-tools-2.0.0.orig/kexec/arch/arm/kexec-elf-rel-arm.c 2009-04-24 14:15:46.934825202 +0100
-+++ kexec-tools-2.0.0/kexec/arch/arm/kexec-elf-rel-arm.c 2009-04-24 14:15:47.014827381 +0100
-@@ -1,5 +1,5 @@
- #include <stdio.h>
--#include <elf.h>
-+#include "../../../include/elf.h"
- #include "../../kexec.h"
- #include "../../kexec-elf.h"
-
-Index: kexec-tools-2.0.0/kexec/arch/arm/kexec-zImage-arm.c
-===================================================================
---- kexec-tools-2.0.0.orig/kexec/arch/arm/kexec-zImage-arm.c 2009-04-24 14:15:46.982825391 +0100
-+++ kexec-tools-2.0.0/kexec/arch/arm/kexec-zImage-arm.c 2009-04-26 01:58:20.838624318 +0200
-@@ -2,6 +2,10 @@
- * - 08/21/2007 ATAG support added by Uli Luckas <u.luckas@road.de>
- *
- */
-+
-+/* work around for linux header files */
-+#define __deprecated
-+
- #define _GNU_SOURCE
+--- kexec-tools-2.0.1.orig/kexec/kexec-elf-rel.c 2009-09-24 14:15:34.025828340 +0100
++++ kexec-tools-2.0.1/kexec/kexec-elf-rel.c 2009-09-24 14:15:47.030825302 +0100
+@@ -4,7 +4,7 @@
#include <stdio.h>
- #include <string.h>
-@@ -110,13 +114,13 @@
- }
+ #include <errno.h>
+ #include <stdlib.h>
+-#include "elf.h"
++#include "../include/elf.h"
+ #include <boot/elf_boot.h>
+ #include "kexec.h"
+ #include "kexec-elf.h"
- fread(buf, sizeof(buf[1]), BOOT_PARAMS_SIZE, fp);
-- if (ferror(fp)) {
-+/* if (ferror(fp)) {
- fprintf(stderr, "Cannot read %s: %s\n",
- fn, strerror(errno));
- fclose(fp);
- return NULL;
- }
--
-+*/
- fclose(fp);
- return (struct tag *) buf;
- }
-Index: kexec-tools-2.0.0/kexec/ifdown.c
+Index: kexec-tools-2.0.1/kexec/ifdown.c
===================================================================
---- kexec-tools-2.0.0.orig/kexec/ifdown.c 2009-04-24 14:15:34.025828340 +0100
-+++ kexec-tools-2.0.0/kexec/ifdown.c 2009-04-24 14:15:47.014827381 +0100
+--- kexec-tools-2.0.1.orig/kexec/ifdown.c 2009-09-24 14:15:34.025828340 +0100
++++ kexec-tools-2.0.1/kexec/ifdown.c 2009-09-24 14:15:47.014827381 +0100
@@ -14,7 +14,7 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
@@ -53,57 +25,11 @@ Index: kexec-tools-2.0.0/kexec/ifdown.c
#include <net/if.h>
#include <netinet/in.h>
-Index: kexec-tools-2.0.0/purgatory/Makefile
-===================================================================
---- kexec-tools-2.0.0.orig/purgatory/Makefile 2009-05-19 14:15:34.037827479 +0100
-+++ kexec-tools-2.0.0/purgatory/Makefile 2009-05-19 14:15:47.022825503 +0100
-@@ -47,6 +47,7 @@
- $(PURGATORY): CC=$(TARGET_CC)
- $(PURGATORY): CFLAGS+=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
- -Os -fno-builtin -ffreestanding \
-+ -nostdinc \
- -fno-zero-initialized-in-bss
-
- $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
-Index: kexec-tools-2.0.0/purgatory/purgatory.c
-===================================================================
---- kexec-tools-2.0.0.orig/purgatory/purgatory.old 2009-05-16 13:28:19.000000000 +0200
-+++ kexec-tools-2.0.0/purgatory/purgatory.c 2009-05-16 14:15:21.000000000 +0200
-@@ -1,4 +1,4 @@
--
-+//#include <stdarg.h>
- #include <limits.h>
- #include <stdint.h>
- #include <purgatory.h>
-@@ -3,7 +3,7 @@
- #include <stdint.h>
- #include <purgatory.h>
- #include <sha256.h>
--#include <string.h>
-+/* #include <string.h> */
- #include "../kexec/kexec-sha256.h"
- struct sha256_region sha256_regions[SHA256_REGIONS] = {};
- }
- sha256_finish(&ctx, digest);
- if (memcmp(digest, sha256_digest, sizeof(digest)) != 0) {
-Index: kexec-tools-2.0.0/kexec/kexec-elf-rel.c
-===================================================================
---- kexec-tools-2.0.0.orig/kexec/kexec-elf-rel.c 2009-04-24 14:15:34.025828340 +0100
-+++ kexec-tools-2.0.0/kexec/kexec-elf-rel.c 2009-04-24 14:15:47.030825302 +0100
-@@ -4,7 +4,7 @@
- #include <stdio.h>
- #include <errno.h>
- #include <stdlib.h>
--#include "elf.h"
-+#include "../include/elf.h"
- #include <boot/elf_boot.h>
- #include "kexec.h"
- #include "kexec-elf.h"
-Index: kexec-tools-2.0.0/kexec/kexec-syscall.h
+Index: kexec-tools-2.0.1/kexec/kexec-syscall.h
===================================================================
---- kexec-tools-2.0.0.orig/kexec/kexec-syscall.h 2009-04-24 14:15:46.950825917 +0100
-+++ kexec-tools-2.0.0/kexec/kexec-syscall.h 2009-04-24 14:15:47.030825302 +0100
+--- kexec-tools-2.0.1.orig/kexec/kexec-syscall.h 2009-09-24 14:15:46.950825917 +0100
++++ kexec-tools-2.0.1/kexec/kexec-syscall.h 2009-09-24 14:15:47.030825302 +0100
@@ -2,7 +2,7 @@
#define KEXEC_SYSCALL_H
@@ -122,7 +48,7 @@ Index: kexec-tools-2.0.0/kexec/kexec-syscall.h
#ifdef __i386__
#define __NR_kexec_load 283
#endif
-@@ -55,18 +55,19 @@
+@@ -60,19 +60,20 @@
#ifndef __NR_kexec_load
#error Unknown processor architecture. Needs a kexec_load syscall number.
#endif
@@ -146,25 +72,12 @@ Index: kexec-tools-2.0.0/kexec/kexec-syscall.h
}
-Index: kexec-tools-2.0.0/kexec/kexec.c
-===================================================================
---- kexec-tools-2.0.0.orig/kexec/kexec.c 2009-04-24 14:15:46.950825917 +0100
-+++ kexec-tools-2.0.0/kexec/kexec.c 2009-04-26 01:58:53.545624148 +0200
-@@ -38,9 +38,7 @@
+ #define KEXEC_ON_CRASH<><------>0x00000001
- #include "config.h"
-
--#ifdef HAVE_LIBZ
--#include <zlib.h>
--#endif
-+#include "zlib.h"
- #include <sha256.h>
- #include "kexec.h"
- #include "kexec-syscall.h"
-Index: kexec-tools-2.0.0/kexec/crashdump.c
+Index: kexec-tools-2.0.1/kexec/crashdump.c
===================================================================
---- kexec-tools-2.0.0.orig/kexec/crashdump.old 2009-05-15 17:47:56.000000000 +0200
-+++ kexec-tools-2.0.0/kexec/crashdump.c 2009-05-15 13:28:19.000000000 +0200
+--- kexec-tools-2.0.1.orig/kexec/crashdump.c 2008-10-31 03:00:38.000000000 +0100
++++ kexec-tools-2.0.1/kexec/crashdump.c 2009-09-26 11:16:27.000000000 +0200
@@ -26,7 +26,7 @@
#include <sys/types.h>
#include <sys/stat.h>
@@ -173,11 +86,12 @@ Index: kexec-tools-2.0.0/kexec/crashdump.c
+#include "../../../include/elf.h"
#include "kexec.h"
#include "crashdump.h"
+ #include "kexec-syscall.h"
-Index: kexec-tools-2.0.0/kexec/crashdump-xen.c
+Index: kexec-tools-2.0.1/kexec/crashdump-xen.c
===================================================================
---- kexec-tools-2.0.0.orig/kexec/crashdump-xen.c.old 2009-05-15 13:28:19.000000000 +0200
-+++ kexec-tools-2.0.0/kexec/crashdump-xen.c 2009-05-15 17:49:04.000000000 +0200
+--- kexec-tools-2.0.1.orig/kexec/crashdump-xen.c 2008-07-15 02:46:43.000000000 +0200
++++ kexec-tools-2.0.1/kexec/crashdump-xen.c 2009-09-26 11:16:41.000000000 +0200
@@ -3,7 +3,7 @@
#include <stdarg.h>
#include <string.h>
@@ -187,25 +101,123 @@ Index: kexec-tools-2.0.0/kexec/crashdump-xen.c
#include <errno.h>
#include <limits.h>
#include <sys/types.h>
-Index: kexec-tools-2.0.0/kexec/crashdump-elf.c
+
+Index: kexec-tools-2.0.1/kexec/crashdump-elf.c
===================================================================
---- kexec-tools-2.0.0.orig/kexec/crashdump-elf.c.old 2009-05-16 13:28:19.000000000 +0200
-+++ kexec-tools-2.0.0/kexec/crashdump-elf.c 2009-05-16 11:12:15.000000000 +0200
-@@ -43,8 +43,8 @@
+--- kexec-tools-2.0.1.orig/kexec/crashdump-elf.c 2008-10-31 03:00:38.000000000 +0100
++++ kexec-tools-2.0.1/kexec/crashdump-elf.c 2009-09-26 11:17:57.000000000 +0200
+@@ -47,7 +47,8 @@
if (xen_present())
nr_cpus = xen_get_nr_phys_cpus();
else
- nr_cpus = sysconf(_SC_NPROCESSORS_CONF);
--
-+/* nr_cpus = sysconf(_SC_NPROCESSORS_CONF); */
++ /*nr_cpus = sysconf(_SC_NPROCESSORS_CONF);*/
+ nr_cpus = 1;
+
if (nr_cpus < 0) {
return -1;
+
+Index: kexec-tools-2.0.1/kexec/arch/arm/kexec-elf-rel-arm.c
+===================================================================
+--- kexec-tools-2.0.1.orig/kexec/arch/arm/kexec-elf-rel-arm.c 2009-04-24 14:15:46.934825202 +0100
++++ kexec-tools-2.0.1/kexec/arch/arm/kexec-elf-rel-arm.c 2009-09-24 14:15:47.014827381 +0100
+@@ -1,5 +1,5 @@
+ #include <stdio.h>
+-#include <elf.h>
++#include "../../../include/elf.h"
+ #include "../../kexec.h"
+ #include "../../kexec-elf.h"
+
+Index: kexec-tools-2.0.1/purgatory/string.c
+===================================================================
+--- kexec-tools-2.0.1.orig/purgatory/string.c 2008-05-16 13:28:19.000000000 +0200
++++ kexec-tools-2.0.1/purgatory/string.c 2009-09-16 17:49:04.000000000 +0200
+@@ -1,5 +1,5 @@
+ #include <stddef.h>
+-#include <string.h>
++/* #include <string.h> */
+
+ size_t strnlen(const char *s, size_t max)
+ {
+
+Index: kexec-tools-2.0.1/purgatory/purgatory.c
+===================================================================
+--- kexec-tools-2.0.1.orig/purgatory/purgatory.c 2009-05-16 13:28:19.000000000 +0200
++++ kexec-tools-2.0.1/purgatory/purgatory.c 2009-09-16 14:15:21.000000000 +0200
+@@ -3,7 +3,7 @@
+ #include <stdint.h>
+ #include <purgatory.h>
+ #include <sha256.h>
+-#include <string.h>
++/* #include <string.h> */
+ #include "../kexec/kexec-sha256.h"
+
+ struct sha256_region sha256_regions[SHA256_REGIONS] = {};
}
-Index: kexec-tools-2.0.0/kexec/kexec-elf-boot.c
+ sha256_finish(&ctx, digest);
+ if (memcmp(digest, sha256_digest, sizeof(digest)) != 0) {
+
+Index: kexec-tools-2.0.1/kexec/kexec.c
===================================================================
---- kexec-tools-2.0.0.orig/kexec/kexec-elf-boot.c.old 2009-05-16 13:28:19.000000000 +0200
-+++ kexec-tools-2.0.0/kexec/kexec-elf-boot.c 2009-05-16 11:13:28.000000000 +0200
+--- kexec-tools-2.0.1.orig/kexec/kexec.c 2008-02-24 14:15:46.950825917 +0100
++++ kexec-tools-2.0.1/kexec/kexec.c 2009-09-26 01:58:53.545624148 +0200
+@@ -38,9 +38,8 @@
+
+ #include "config.h"
+
+-#ifdef HAVE_LIBZ
+-#include <zlib.h>
+-#endif
++#include "zlib.h"
++
+ #include <sha256.h>
+ #include "kexec.h"
+ #include "kexec-syscall.h"
+@@ -554,6 +554,6 @@
+ }
+
+-#if HAVE_LIBZ
++#if 1
+ char *slurp_decompress_file(const char *filename, off_t *r_size)
+ {
+ gzFile fp;
+
+Index: kexec-tools-2.0.1/kexec/arch/arm/kexec-zImage-arm.c
+===================================================================
+--- kexec-tools-2.0.1.orig/kexec/arch/arm/kexec-zImage-arm.c 2009-04-24 14:15:46.982825391 +0100
++++ kexec-tools-2.0.1/kexec/arch/arm/kexec-zImage-arm.c 2009-09-26 01:58:20.838624318 +0200
+@@ -2,6 +2,10 @@
+ * - 08/21/2007 ATAG support added by Uli Luckas <u.luckas@road.de>
+ *
+ */
++
++/* work around for linux header files */
++#define __deprecated
++
+ #define _GNU_SOURCE
+ #define _XOPEN_SOURCE
+ #include <stdio.h>
+@@ -110,13 +114,13 @@
+ }
+
+ fread(buf, sizeof(buf[1]), BOOT_PARAMS_SIZE, fp);
+- if (ferror(fp)) {
++/* if (ferror(fp)) {
+ fprintf(stderr, "Cannot read %s: %s\n",
+ fn, strerror(errno));
+ fclose(fp);
+ return NULL;
+ }
+-
++*/
+ fclose(fp);
+ return (struct tag *) buf;
+ }
+
+Index: kexec-tools-2.0.1/kexec/kexec-elf-boot.c
+===================================================================
+--- kexec-tools-2.0.1.orig/kexec/kexec-elf-boot.c 2009-05-16 13:28:19.000000000 +0200
++++ kexec-tools-2.0.1/kexec/kexec-elf-boot.c 2009-09-16 11:13:28.000000000 +0200
@@ -22,7 +22,7 @@
#include <string.h>
#include <stdlib.h>
@@ -215,10 +227,11 @@ Index: kexec-tools-2.0.0/kexec/kexec-elf-boot.c
#include <boot/elf_boot.h>
#include <ip_checksum.h>
#include <x86/x86-linux.h>
-Index: kexec-tools-2.0.0/kdump/kdump.c
+
+Index: kexec-tools-2.0.1/kdump/kdump.c
===================================================================
---- kexec-tools-2.0.0.orig/kdump/kdump.c.old 2009-05-16 13:28:19.000000000 +0200
-+++ kexec-tools-2.0.0/kdump/kdump.c 2009-05-16 11:13:08.000000000 +0200
+--- kexec-tools-2.0.1.orig/kdump/kdump.c 2009-05-16 13:28:19.000000000 +0200
++++ kexec-tools-2.0.1/kdump/kdump.c 2009-09-16 11:13:08.000000000 +0200
@@ -8,7 +8,7 @@
#include <sys/stat.h>
#include <fcntl.h>
@@ -228,10 +241,11 @@ Index: kexec-tools-2.0.0/kdump/kdump.c
#if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) || !defined(__BIG_ENDIAN)
#error Endian defines missing
-Index: kexec-tools-2.0.0/kexec/kexec.h
+
+Index: kexec-tools-2.0.1/kexec/kexec.h
===================================================================
---- kexec-tools-2.0.0.orig/kexec/kexec.h.old 2008-05-16 13:28:19.000000000 +0200
-+++ kexec-tools-2.0.0/kexec/kexec.h 2009-05-16 17:32:15.000000000 +0200
+--- kexec-tools-2.0.1.orig/kexec/kexec.h.old 2008-05-16 13:28:19.000000000 +0200
++++ kexec-tools-2.0.1/kexec/kexec.h 2009-09-16 17:32:15.000000000 +0200
@@ -197,7 +197,7 @@
extern char *slurp_file(const char *filename, off_t *r_size);
extern char *slurp_file_len(const char *filename, off_t size);
@@ -241,14 +255,3 @@ Index: kexec-tools-2.0.0/kexec/kexec.h
extern void add_segment(struct kexec_info *info,
const void *buf, size_t bufsz, unsigned long base, size_t memsz);
extern void add_segment_phys_virt(struct kexec_info *info,
-Index: kexec-tools-2.0.0/purgatory/string.c
-===================================================================
---- kexec-tools-2.0.0.orig/purgatory/string.c.old 2008-05-16 13:28:19.000000000 +0200
-+++ kexec-tools-2.0.0/purgatory/string.c 2009-05-16 17:49:04.000000000 +0200
-@@ -1,5 +1,5 @@
- #include <stddef.h>
--#include <string.h>
-+/* #include <string.h> */
-
- size_t strnlen(const char *s, size_t max)
- {
diff --git a/recipes/kexec/kexec-tools-klibc-static_2.0.1.bb b/recipes/kexec/kexec-tools-klibc-static_2.0.1.bb
index d2bc135902..b9586f005c 100644
--- a/recipes/kexec/kexec-tools-klibc-static_2.0.1.bb
+++ b/recipes/kexec/kexec-tools-klibc-static_2.0.1.bb
@@ -6,7 +6,10 @@ DEFAULT_PREFERENCE = "-1"
PR = "r0"
DEPENDS = "klibc"
-#SRC_URI += "file://kexec2-klibc.patch;patch=1"
+SRC_URI += "file://kexec-tools-2-headers.patch;patch=1 \
+ file://kexec-tools-2-klibc.patch;patch=1 \
+ "
+
S = "${WORKDIR}/kexec-tools-${PV}"
EXTRA_OECONF = " --without-zlib"