From ba2ce3ddff7692289d74a4017806b57a1681d3c8 Mon Sep 17 00:00:00 2001 From: Andrea Adami Date: Fri, 15 May 2009 18:57:11 +0200 Subject: kexec-tools_2.0.0: initial commit - kexec-tools_2.0.0 compiles just fine - kexec-tools-static_2.0.0 breaks during do_compile (against klibc) - setting DEFAULT_PREFERENCE = "-1" --- conf/checksums.ini | 4 + recipes/kexec/files/kexec2-klibc.patch | 167 ++++++++++++++++++++++++++++++ recipes/kexec/kexec-tools-static_2.0.0.bb | 24 +++++ recipes/kexec/kexec-tools2.inc | 12 +++ recipes/kexec/kexec-tools_2.0.0.bb | 7 ++ 5 files changed, 214 insertions(+) create mode 100644 recipes/kexec/files/kexec2-klibc.patch create mode 100644 recipes/kexec/kexec-tools-static_2.0.0.bb create mode 100644 recipes/kexec/kexec-tools2.inc create mode 100644 recipes/kexec/kexec-tools_2.0.0.bb diff --git a/conf/checksums.ini b/conf/checksums.ini index 7c9ef50029..d8392d1507 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -11462,6 +11462,10 @@ sha256=a758c8f9b55d8288e2484dd1a2dcbd9c4ca3ca3052864a45cb104f613b7f712d md5=b4f7ffcc294d41a6a4c40d6e44b7734d sha256=280b34fefa12c3d7a3e432c3730fe5d0d56e8d169c28b695cce9ba6d8dbe6e38 +[http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-2.0.0.tar.gz] +md5=bf87c53f36b4454ad3cc50aa9c72faf3 +sha256=f8244b8c4691faf0c9765ec3acba730a5620c8077f9bed667b9ac835dd959ba2 + [http://projects.linuxtogo.org/frs/download.php/221/kexecboot-0.3.tar.gz] md5=3c3b8edb739146183b3ddff3e0af5f1c sha256=61a918b38a4b0b97e1469cbe3d9c4307af956bd95abec2067aa2fd278739cd96 diff --git a/recipes/kexec/files/kexec2-klibc.patch b/recipes/kexec/files/kexec2-klibc.patch new file mode 100644 index 0000000000..c52262bb5f --- /dev/null +++ b/recipes/kexec/files/kexec2-klibc.patch @@ -0,0 +1,167 @@ +Index: kexec-tools-2.0.0/kexec/arch/arm/kexec-elf-rel-arm.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 +-#include ++#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 + * + */ ++ ++/* work around for linux header files */ ++#define __deprecated ++ + #define _GNU_SOURCE + #include + #include +@@ -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.0/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 +@@ -14,7 +14,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +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 + + $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ +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 + #include + #include +-#include "elf.h" ++#include "../include/elf.h" + #include + #include "kexec.h" + #include "kexec-elf.h" +Index: kexec-tools-2.0.0/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 +@@ -2,7 +2,7 @@ + #define KEXEC_SYSCALL_H + + #define __LIBRARY__ +-#include ++/*#include */ + #include + #include + +@@ -21,7 +21,7 @@ + #define LINUX_REBOOT_CMD_KEXEC_OLD 0x81726354 + #define LINUX_REBOOT_CMD_KEXEC_OLD2 0x18263645 + #define LINUX_REBOOT_CMD_KEXEC 0x45584543 +- ++/* + #ifdef __i386__ + #define __NR_kexec_load 283 + #endif +@@ -55,18 +55,19 @@ + #ifndef __NR_kexec_load + #error Unknown processor architecture. Needs a kexec_load syscall number. + #endif +- ++*/ + struct kexec_segment; +- ++/* + static inline long kexec_load(void *entry, unsigned long nr_segments, + struct kexec_segment *segments, unsigned long flags) + { + return (long) syscall(__NR_kexec_load, entry, nr_segments, segments, flags); + } +- ++*/ + static inline long kexec_reboot(void) + { +- return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); ++ //return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); ++ return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); + } + + +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 @@ + + #include "config.h" + +-#ifdef HAVE_LIBZ +-#include +-#endif ++#include "zlib.h" + #include + #include "kexec.h" + #include "kexec-syscall.h" +Index: kexec-tools-2.0.0/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 +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include "../../../include/elf.h" + #include "kexec.h" + #include "crashdump.h" + +Index: kexec-tools-2.0.0/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 +@@ -3,7 +3,7 @@ + #include + #include + #include +-#include ++#include "../../../include/elf.h" + #include + #include + #include diff --git a/recipes/kexec/kexec-tools-static_2.0.0.bb b/recipes/kexec/kexec-tools-static_2.0.0.bb new file mode 100644 index 0000000000..a0d02aa9ac --- /dev/null +++ b/recipes/kexec/kexec-tools-static_2.0.0.bb @@ -0,0 +1,24 @@ +# the binaries are statical linked against klibc +require kexec-tools2.inc + +DEFAULT_PREFERENCE = "-1" + +PR = "r0" +DEPENDS = "klibc" + +SRC_URI += "file://kexec2-klibc.patch;patch=1" +S = "${WORKDIR}/kexec-tools-${PV}" + +EXTRA_OECONF = " --without-zlib" + +export CC=${TARGET_PREFIX}klcc + +# standart oe cflags don't work with klcc +export CFLAGS="" +export CPPFLAGS="" +export LDFLAGS="" + +PACKAGES =+ "kexec-static kdump-static" + +FILES_kexec-static = "${sbindir}/kexec" +FILES_kdump-static = "${sbindir}/kdump" diff --git a/recipes/kexec/kexec-tools2.inc b/recipes/kexec/kexec-tools2.inc new file mode 100644 index 0000000000..261bfb9b3f --- /dev/null +++ b/recipes/kexec/kexec-tools2.inc @@ -0,0 +1,12 @@ +DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" +AUTHOR = "Eric Biederman" +HOMEPAGE = "http://www.xmission.com/~ebiederm/files/kexec/" +SECTION = "kernel/userland" +LICENSE = "GPL" +DEPENDS = "virtual/kernel zlib" + +inherit autotools + + +SRC_URI = "http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-${PV}.tar.gz \ + " diff --git a/recipes/kexec/kexec-tools_2.0.0.bb b/recipes/kexec/kexec-tools_2.0.0.bb new file mode 100644 index 0000000000..7692081d24 --- /dev/null +++ b/recipes/kexec/kexec-tools_2.0.0.bb @@ -0,0 +1,7 @@ +require kexec-tools2.inc +export LDFLAGS = "-L${STAGING_LIBDIR}" +EXTRA_OECONF = " --with-zlib=yes" + +PR = "r0" + +DEFAULT_PREFERENCE = "-1" -- cgit 1.2.3-korg