summaryrefslogtreecommitdiff
path: root/recipes/kexec/files
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2009-05-16 18:22:54 +0200
committerAndrea Adami <andrea.adami@gmail.com>2009-05-16 18:29:24 +0200
commit71c53615c26094991223f503372dfbfd63f144f5 (patch)
treed4932bb825da26030e3469b996a937cd70f82a2d /recipes/kexec/files
parent6d20fd1c39bd27e73fc61fa109e8cea7d4645326 (diff)
kexec-tools-static_2.0.0: another step towards klibc statical linking - retry with purgatory.c - FIXME: kcc LDFLAGS - STILL FAILING BUILD
Diffstat (limited to 'recipes/kexec/files')
-rw-r--r--recipes/kexec/files/kexec2-klibc.patch59
1 files changed, 43 insertions, 16 deletions
diff --git a/recipes/kexec/files/kexec2-klibc.patch b/recipes/kexec/files/kexec2-klibc.patch
index 5422445d73..b80848d291 100644
--- a/recipes/kexec/files/kexec2-klibc.patch
+++ b/recipes/kexec/files/kexec2-klibc.patch
@@ -57,14 +57,17 @@ Index: kexec-tools-2.0.0/purgatory/Makefile
===================================================================
--- kexec-tools-2.0.0.orig/purgatory/Makefile 2009-04-24 14:15:34.037827479 +0100
+++ kexec-tools-2.0.0/purgatory/Makefile 2009-04-24 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
+@@ -55,9 +54,7 @@
+ -I$(srcdir)/purgatory/arch/$(ARCH)/include \
+ -I$(srcdir)/util_lib/include \
+ -I$(shell $(CC) -print-file-name=include)
+-$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
+- --no-undefined -nostartfiles -nostdlib -nodefaultlibs \
+- -e purgatory_start -r
++$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)
- $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
+ $(PURGATORY): $(PURGATORY_OBJS)
+ $(MKDIR) -p $(@D)
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
@@ -75,15 +78,15 @@ Index: kexec-tools-2.0.0/purgatory/purgatory.c
#include <limits.h>
#include <stdint.h>
#include <purgatory.h>
-@@ -18,8 +18,10 @@
- sha256_starts(&ctx);
- end = &sha256_regions[sizeof(sha256_regions)/sizeof(sha256_regions[0])];
- for(ptr = sha256_regions; ptr < end; ptr++) {
-- sha256_update(&ctx, (uint8_t *)((uintptr_t)ptr->start),
-+/* sha256_update(&ctx, (uint8_t *)((uintptr_t)ptr->start),
- ptr->len);
-+*/
-+ sha256_update(&ctx, ptr->start, ptr->len);
+@@ -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) {
@@ -228,3 +231,27 @@ 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
+===================================================================
+--- 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
+@@ -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);
+ extern char *slurp_decompress_file(const char *filename, off_t *r_size);
+-extern unsigned long virt_to_phys(unsigned long addr);
++/* extern unsigned long virt_to_phys(unsigned long addr); */
+ 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)
+ {