* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2006-12-20 14:41 aldot at uclibc.org
0 siblings, 0 replies; 17+ messages in thread
From: aldot at uclibc.org @ 2006-12-20 14:41 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2006-12-20 06:41:04 -0800 (Wed, 20 Dec 2006)
New Revision: 17014
Log:
- remove obsoleted dep on host-fakeroot
Modified:
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2006-12-20 04:30:25 UTC (rev 17013)
+++ trunk/buildroot/package/kexec/kexec.mk 2006-12-20 14:41:04 UTC (rev 17014)
@@ -38,7 +38,6 @@
(cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1)
toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
endif
-
touch $(KEXEC_DIR)/.unpacked
$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
@@ -61,7 +60,7 @@
$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/kdump \
$(TARGET_DIR)/sbin/
-kexec: uclibc host-fakeroot $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
+kexec: uclibc $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
kexec-clean:
-$(MAKE) -C $(KEXEC_DIR) clean
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2006-12-20 16:50 aldot at uclibc.org
2006-12-20 17:01 ` Petr Stetiar
0 siblings, 1 reply; 17+ messages in thread
From: aldot at uclibc.org @ 2006-12-20 16:50 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2006-12-20 08:50:04 -0800 (Wed, 20 Dec 2006)
New Revision: 17018
Log:
- Petr Stetiar updated the kexec arm patch. Thanks!
Modified:
trunk/buildroot/package/kexec/kexec-tools-arm.patch
Changeset:
Modified: trunk/buildroot/package/kexec/kexec-tools-arm.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-arm.patch 2006-12-20 16:45:47 UTC (rev 17017)
+++ trunk/buildroot/package/kexec/kexec-tools-arm.patch 2006-12-20 16:50:04 UTC (rev 17018)
@@ -389,3 +389,78 @@
+typedef signed long long int64_t;
+
+#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;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
2006-12-20 16:50 aldot at uclibc.org
@ 2006-12-20 17:01 ` Petr Stetiar
2007-01-22 16:45 ` Bernhard Fischer
0 siblings, 1 reply; 17+ messages in thread
From: Petr Stetiar @ 2006-12-20 17:01 UTC (permalink / raw)
To: buildroot
aldot at uclibc.org <aldot@uclibc.org> [2006-12-20 08:50:04]:
> Author: aldot
> Date: 2006-12-20 08:50:04 -0800 (Wed, 20 Dec 2006)
> New Revision: 17018
> + static int my_shutdown(void)
> + {
> + char *args[8];
Sorry. Just noticed, that this correctly should be "char *args[2];".
-- ynezz
-------------- next part --------------
Index: package/kexec/kexec-tools-arm.patch
===================================================================
--- package/kexec/kexec-tools-arm.patch (revision 17018)
+++ package/kexec/kexec-tools-arm.patch (working copy)
@@ -446,7 +446,7 @@
@@ -630,16 +630,11 @@
static int my_shutdown(void)
{
- char *args[8];
+ char *args[2];
- int i = 0;
- args[i++] = "shutdown";
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2006-12-20 17:40 aldot at uclibc.org
0 siblings, 0 replies; 17+ messages in thread
From: aldot at uclibc.org @ 2006-12-20 17:40 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2006-12-20 09:40:52 -0800 (Wed, 20 Dec 2006)
New Revision: 17020
Log:
- Add args patch.
Added:
trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch
Changeset:
Added: trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch 2006-12-20 17:08:38 UTC (rev 17019)
+++ trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch 2006-12-20 17:40:52 UTC (rev 17020)
@@ -0,0 +1,12 @@
+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;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2007-01-22 14:59 aldot at uclibc.org
0 siblings, 0 replies; 17+ messages in thread
From: aldot at uclibc.org @ 2007-01-22 14:59 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2007-01-22 06:59:06 -0800 (Mon, 22 Jan 2007)
New Revision: 17462
Log:
- the arm patch broke anybody else.
- restructure patches per task they fulfil
Added:
trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch
trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
Removed:
trunk/buildroot/package/kexec/kexec-tools-arm.patch
trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch
Modified:
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Added: trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch (rev 0)
+++ trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch 2007-01-22 14:59:06 UTC (rev 17462)
@@ -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;
+ }
+
Added: trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch (rev 0)
+++ trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch 2007-01-22 14:59:06 UTC (rev 17462)
@@ -0,0 +1,387 @@
+diff -rduNp kexec-tools-1.101.orig/configure kexec-tools-1.101/configure
+--- kexec-tools-1.101.orig/configure 2006-09-20 04:39:38.000000000 +0200
++++ kexec-tools-1.101/configure 2007-01-22 15:54:14.000000000 +0100
+@@ -1381,6 +1381,9 @@ case $host_cpu in
+ i?86 )
+ host_cpu="i386"
+ ;;
++ arm )
++ host_cpu="arm"
++ ;;
+ powerpc )
+ host_cpu="ppc"
+ ;;
+@@ -1395,7 +1398,7 @@ case $host_cpu in
+ ;;
+ esac
+ case $host_cpu in
+- i386|ppc|x86_64|alpha|ppc64|ia64|s390)
++ i386|ppc|x86_64|alpha|ppc64|ia64|s390|arm)
+ ;;
+ * )
+ { { echo "$as_me:$LINENO: error: unsupported architecture $host_cpu" >&5
+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/kexec/arch/arm/Makefile 2007-01-22 15:54:14.000000000 +0100
+@@ -0,0 +1,8 @@
++#
++# kexec arm (linux booting linux)
++#
++KEXEC_C_SRCS+= kexec/arch/arm/kexec-elf-rel-arm.c
++KEXEC_C_SRCS+= kexec/arch/arm/kexec-zImage-arm.c
++KEXEC_C_SRCS+= kexec/arch/arm/kexec-arm.c
++
++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
+--- 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 2007-01-22 15:54:14.000000000 +0100
+@@ -0,0 +1,11 @@
++#ifndef KEXEC_ARCH_ARM_OPTIONS_H
++#define KEXEC_ARCH_ARM_OPTIONS_H
++
++#define OPT_ARCH_MAX (OPT_MAX+0)
++
++#define KEXEC_ARCH_OPTIONS \
++ KEXEC_OPTIONS \
++
++#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
++
++#endif /* KEXEC_ARCH_ARM_OPTIONS_H */
+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/kexec/arch/arm/kexec-arm.c 2007-01-22 15:54:14.000000000 +0100
+@@ -0,0 +1,130 @@
++/*
++ * kexec: Linux boots Linux
++ *
++ * modified from kexec-ppc.c
++ *
++ */
++
++#define _GNU_SOURCE
++#include <stddef.h>
++#include <stdio.h>
++#include <errno.h>
++#include <stdint.h>
++#include <string.h>
++#include <getopt.h>
++#include <sys/utsname.h>
++#include "../../kexec.h"
++#include "../../kexec-syscall.h"
++#include "kexec-arm.h"
++#include <arch/options.h>
++
++#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)
++{
++ const char iomem[]= "/proc/iomem";
++ int memory_ranges = 0;
++ char line[MAX_LINE];
++ FILE *fp;
++ fp = fopen(iomem, "r");
++ if (!fp) {
++ fprintf(stderr, "Cannot open %s: %s\n",
++ iomem, strerror(errno));
++ return -1;
++ }
++
++ while(fgets(line, sizeof(line), fp) != 0) {
++ unsigned long long start, end;
++ char *str;
++ int type;
++ int consumed;
++ int count;
++ if (memory_ranges >= MAX_MEMORY_RANGES)
++ break;
++ count = sscanf(line, "%Lx-%Lx : %n",
++ &start, &end, &consumed);
++ if (count != 2)
++ continue;
++ str = line + consumed;
++ end = end + 1;
++
++ if (memcmp(str, "System RAM\n", 11) == 0) {
++ type = RANGE_RAM;
++ }
++ else if (memcmp(str, "reserved\n", 9) == 0) {
++ type = RANGE_RESERVED;
++ }
++ else {
++ continue;
++ }
++
++ memory_range[memory_ranges].start = start;
++ memory_range[memory_ranges].end = end;
++ memory_range[memory_ranges].type = type;
++ memory_ranges++;
++ }
++ fclose(fp);
++ *range = memory_range;
++ *ranges = memory_ranges;
++ return 0;
++}
++
++/* Supported file types and callbacks */
++struct file_type file_type[] = {
++ {"zImage", zImage_arm_probe, zImage_arm_load, zImage_arm_usage},
++};
++int file_types = sizeof(file_type) / sizeof(file_type[0]);
++
++
++void arch_usage(void)
++{
++}
++
++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:
++ break;
++ }
++ }
++ /* 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 (strncmp(utsname.machine, "arm",3) != 0)
++ {
++ fprintf(stderr, "Unsupported machine type: %s\n",
++ utsname.machine);
++ return -1;
++ }
++ return 0;
++}
++
++void arch_update_purgatory(struct kexec_info *info)
++{
++}
++
+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/kexec/arch/arm/kexec-arm.h 2007-01-22 15:54:14.000000000 +0100
+@@ -0,0 +1,9 @@
++#ifndef KEXEC_ARM_H
++#define KEXEC_ARM_H
++
++int zImage_arm_probe(const char *buf, off_t len);
++int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
++ struct kexec_info *info);
++void zImage_arm_usage(void);
++
++#endif /* KEXEC_ARM_H */
+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/kexec/arch/arm/kexec-elf-rel-arm.c 2007-01-22 15:54:14.000000000 +0100
+@@ -0,0 +1,35 @@
++#include <stdio.h>
++#include <elf.h>
++#include "../../kexec.h"
++#include "../../kexec-elf.h"
++
++int machine_verify_elf_rel(struct mem_ehdr *ehdr)
++{
++ if (ehdr->ei_data != ELFDATA2MSB) {
++ return 0;
++ }
++ if (ehdr->ei_class != ELFCLASS32) {
++ return 0;
++ }
++ if (ehdr->e_machine != EM_ARM)
++ {
++ return 0;
++ }
++ return 1;
++}
++
++void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
++ void *location, unsigned long address, unsigned long value)
++{
++ switch(r_type) {
++ case R_ARM_ABS32:
++ *((uint32_t *)location) += value;
++ break;
++ case R_ARM_REL32:
++ *((uint32_t *)location) += value - address;
++ break;
++ default:
++ die("Unknown rel relocation: %lu\n", r_type);
++ break;
++ }
++}
+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/kexec/arch/arm/kexec-zImage-arm.c 2007-01-22 15:54:14.000000000 +0100
+@@ -0,0 +1,34 @@
++#define _GNU_SOURCE
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <limits.h>
++#include "../../kexec.h"
++
++int zImage_arm_probe(const char *buf, off_t len)
++{
++ /*
++ * Only zImage loading is supported. Do not check if
++ * the buffer is valid kernel image
++ */
++ return 0;
++}
++void zImage_arm_usage(void)
++{
++}
++int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
++ struct kexec_info *info)
++{
++ unsigned long base;
++ unsigned int offset = 0x8000; /* 32k offset from memory start */
++ base = locate_hole(info,len+offset,0,0,ULONG_MAX,INT_MAX);
++ if (base == ULONG_MAX)
++ {
++ return -1;
++ }
++ base += offset;
++ add_segment(info,buf,len,base,len);
++ info->entry = (void*)base;
++ return 0;
++}
+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 2006-09-20 04:39:38.000000000 +0200
++++ kexec-tools-1.101/kexec/kexec-syscall.h 2007-01-22 15:54:14.000000000 +0100
+@@ -43,6 +43,9 @@
+ #ifdef __s390__
+ #define __NR_kexec_load 277
+ #endif
++#ifdef __arm__
++#define __NR_kexec_load __NR_SYSCALL_BASE + 189
++#endif
+ #ifndef __NR_kexec_load
+ #error Unknown processor architecture. Needs a kexec_load syscall number.
+ #endif
+@@ -74,6 +77,7 @@ static inline long kexec_reboot(void)
+ #define KEXEC_ARCH_PPC64 (21 << 16)
+ #define KEXEC_ARCH_IA_64 (50 << 16)
+ #define KEXEC_ARCH_S390 (22 << 16)
++#define KEXEC_ARCH_ARM (40 << 16)
+
+ #define KEXEC_MAX_SEGMENTS 16
+
+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/purgatory/arch/arm/Makefile 2007-01-22 15:54:14.000000000 +0100
+@@ -0,0 +1,7 @@
++#
++# Purgatory arm
++#
++
++PURGATORY_S_SRCS +=
++PURGATORY_C_SRCS +=
++
+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/purgatory/arch/arm/include/limits.h 2007-01-22 15:54:14.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 -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/purgatory/arch/arm/include/stdint.h 2007-01-22 15:54:14.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 */
Deleted: trunk/buildroot/package/kexec/kexec-tools-arm.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-arm.patch 2007-01-22 14:12:08 UTC (rev 17461)
+++ trunk/buildroot/package/kexec/kexec-tools-arm.patch 2007-01-22 14:59:06 UTC (rev 17462)
@@ -1,466 +0,0 @@
-diff -uNr 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/configure 2006-12-17 23:05:16.000000000 +0100
-@@ -1381,6 +1381,9 @@
- i?86 )
- host_cpu="i386"
- ;;
-+ arm )
-+ host_cpu="arm"
-+ ;;
- powerpc )
- host_cpu="ppc"
- ;;
-@@ -1389,7 +1392,7 @@
- ;;
- esac
- case $host_cpu in
-- i386|ppc|x86_64|alpha|ppc64|ia64|s390)
-+ i386|ppc|x86_64|alpha|ppc64|ia64|s390|arm)
- ;;
- * )
- { { 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
---- 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
-@@ -0,0 +1,8 @@
-+#
-+# kexec arm (linux booting linux)
-+#
-+KEXEC_C_SRCS+= kexec/arch/arm/kexec-elf-rel-arm.c
-+KEXEC_C_SRCS+= kexec/arch/arm/kexec-zImage-arm.c
-+KEXEC_C_SRCS+= kexec/arch/arm/kexec-arm.c
-+
-+KEXEC_S_SRCS+=
-
-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/kexec/arch/arm/include/arch/options.h 2006-12-17 23:05:16.000000000 +0100
-@@ -0,0 +1,11 @@
-+#ifndef KEXEC_ARCH_ARM_OPTIONS_H
-+#define KEXEC_ARCH_ARM_OPTIONS_H
-+
-+#define OPT_ARCH_MAX (OPT_MAX+0)
-+
-+#define KEXEC_ARCH_OPTIONS \
-+ KEXEC_OPTIONS \
-+
-+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
-+
-+#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
---- 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
-@@ -0,0 +1,133 @@
-+/*
-+ * kexec: Linux boots Linux
-+ *
-+ * modified from kexec-ppc.c
-+ *
-+ */
-+
-+#define _GNU_SOURCE
-+#include <stddef.h>
-+#include <stdio.h>
-+#include <errno.h>
-+#include <stdint.h>
-+#include <string.h>
-+#include <getopt.h>
-+#include <sys/utsname.h>
-+#include "../../kexec.h"
-+#include "../../kexec-syscall.h"
-+#include "kexec-arm.h"
-+#include <arch/options.h>
-+
-+#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)
-+{
-+ const char iomem[]= "/proc/iomem";
-+ int memory_ranges = 0;
-+ char line[MAX_LINE];
-+ FILE *fp;
-+ fp = fopen(iomem, "r");
-+ if (!fp) {
-+ fprintf(stderr, "Cannot open %s: %s\n",
-+ iomem, strerror(errno));
-+ return -1;
-+ }
-+
-+ while(fgets(line, sizeof(line), fp) != 0) {
-+ unsigned long long start, end;
-+ char *str;
-+ int type;
-+ int consumed;
-+ int count;
-+ if (memory_ranges >= MAX_MEMORY_RANGES)
-+ break;
-+ count = sscanf(line, "%Lx-%Lx : %n",
-+ &start, &end, &consumed);
-+ if (count != 2)
-+ continue;
-+ str = line + consumed;
-+ end = end + 1;
-+
-+ if (memcmp(str, "System RAM\n", 11) == 0) {
-+ type = RANGE_RAM;
-+ }
-+ else if (memcmp(str, "reserved\n", 9) == 0) {
-+ type = RANGE_RESERVED;
-+ }
-+ else {
-+ continue;
-+ }
-+
-+ memory_range[memory_ranges].start = start;
-+ memory_range[memory_ranges].end = end;
-+ memory_range[memory_ranges].type = type;
-+ memory_ranges++;
-+ }
-+ fclose(fp);
-+ *range = memory_range;
-+ *ranges = memory_ranges;
-+ return 0;
-+}
-+
-+/* Supported file types and callbacks */
-+struct file_type file_type[] = {
-+ {"zImage", zImage_arm_probe, zImage_arm_load, zImage_arm_usage},
-+};
-+int file_types = sizeof(file_type) / sizeof(file_type[0]);
-+
-+
-+void arch_usage(void)
-+{
-+}
-+
-+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:
-+ break;
-+ }
-+ }
-+ /* 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, unsigned long *flags)
-+{
-+ int result;
-+ struct utsname utsname;
-+ result = uname(&utsname);
-+ if (result < 0) {
-+ fprintf(stderr, "uname failed: %s\n",
-+ strerror(errno));
-+ return -1;
-+ }
-+ if (strncmp(utsname.machine, "arm",3) == 0)
-+ {
-+ *flags |= KEXEC_ARCH_ARM;
-+ }
-+ else {
-+ fprintf(stderr, "Unsupported machine type: %s\n",
-+ utsname.machine);
-+ return -1;
-+ }
-+ return 0;
-+}
-+
-+void arch_update_purgatory(struct kexec_info *info)
-+{
-+}
-+
-diff -uNr 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/kexec/arch/arm/kexec-arm.h 2006-12-17 23:05:16.000000000 +0100
-@@ -0,0 +1,9 @@
-+#ifndef KEXEC_ARM_H
-+#define KEXEC_ARM_H
-+
-+int zImage_arm_probe(const char *buf, off_t len);
-+int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info);
-+void zImage_arm_usage(void);
-+
-+#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
---- 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
-@@ -0,0 +1,35 @@
-+#include <stdio.h>
-+#include <elf.h>
-+#include "../../kexec.h"
-+#include "../../kexec-elf.h"
-+
-+int machine_verify_elf_rel(struct mem_ehdr *ehdr)
-+{
-+ if (ehdr->ei_data != ELFDATA2MSB) {
-+ return 0;
-+ }
-+ if (ehdr->ei_class != ELFCLASS32) {
-+ return 0;
-+ }
-+ if (ehdr->e_machine != EM_ARM)
-+ {
-+ return 0;
-+ }
-+ return 1;
-+}
-+
-+void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
-+ void *location, unsigned long address, unsigned long value)
-+{
-+ switch(r_type) {
-+ case R_ARM_ABS32:
-+ *((uint32_t *)location) += value;
-+ break;
-+ case R_ARM_REL32:
-+ *((uint32_t *)location) += value - address;
-+ break;
-+ default:
-+ die("Unknown rel relocation: %lu\n", r_type);
-+ 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
---- 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
-@@ -0,0 +1,34 @@
-+#define _GNU_SOURCE
-+#include <stdio.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <errno.h>
-+#include <limits.h>
-+#include "../../kexec.h"
-+
-+int zImage_arm_probe(const char *buf, off_t len)
-+{
-+ /*
-+ * Only zImage loading is supported. Do not check if
-+ * the buffer is valid kernel image
-+ */
-+ return 0;
-+}
-+void zImage_arm_usage(void)
-+{
-+}
-+int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info)
-+{
-+ unsigned long base;
-+ unsigned int offset = 0x8000; /* 32k offset from memory start */
-+ base = locate_hole(info,len+offset,0,0,ULONG_MAX,INT_MAX);
-+ if (base == ULONG_MAX)
-+ {
-+ return -1;
-+ }
-+ base += offset;
-+ add_segment(info,buf,len,base,len);
-+ info->entry = (void*)base;
-+ return 0;
-+}
-diff -uNr 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/kexec/kexec-syscall.h 2006-12-17 23:05:16.000000000 +0100
-@@ -37,6 +37,9 @@
- #ifdef __s390__
- #define __NR_kexec_load 277
- #endif
-+#ifdef __arm__
-+#define __NR_kexec_load __NR_SYSCALL_BASE + 189
-+#endif
- #ifndef __NR_kexec_load
- #error Unknown processor architecture. Needs a kexec_load syscall number.
- #endif
-@@ -67,6 +70,7 @@
- #define KEXEC_ARCH_PPC64 (21 << 16)
- #define KEXEC_ARCH_IA_64 (50 << 16)
- #define KEXEC_ARCH_S390 (22 << 16)
-+#define KEXEC_ARCH_ARM (40 << 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
---- 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
-@@ -0,0 +1,7 @@
-+#
-+# Purgatory arm
-+#
-+
-+PURGATORY_S_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
---- 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
-@@ -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 -uNr 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/purgatory/arch/arm/include/stdint.h 2006-12-17 23:05:16.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 -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;
Deleted: trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch 2007-01-22 14:12:08 UTC (rev 17461)
+++ trunk/buildroot/package/kexec/kexec-tools-my_shutdown-args.patch 2007-01-22 14:59:06 UTC (rev 17462)
@@ -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;
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2007-01-22 14:12:08 UTC (rev 17461)
+++ trunk/buildroot/package/kexec/kexec.mk 2007-01-22 14:59:06 UTC (rev 17462)
@@ -33,11 +33,11 @@
$(KEXEC_DIR)/.unpacked: $(DL_DIR)/$(KEXEC_SOURCE) $(DL_DIR)/$(KEXEC_PATCH)
$(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),)
(cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1)
toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
endif
+ toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.dpatch
touch $(KEXEC_DIR)/.unpacked
$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
2006-12-20 17:01 ` Petr Stetiar
@ 2007-01-22 16:45 ` Bernhard Fischer
0 siblings, 0 replies; 17+ messages in thread
From: Bernhard Fischer @ 2007-01-22 16:45 UTC (permalink / raw)
To: buildroot
On Wed, Dec 20, 2006 at 06:01:36PM +0100, Petr Stetiar wrote:
>aldot at uclibc.org <aldot@uclibc.org> [2006-12-20 08:50:04]:
>
>> Author: aldot
>> Date: 2006-12-20 08:50:04 -0800 (Wed, 20 Dec 2006)
>> New Revision: 17018
>> + static int my_shutdown(void)
>> + {
>> + char *args[8];
>
>Sorry. Just noticed, that this correctly should be "char *args[2];".
I saw that your arm-support patch broke anybody else (so i broke arm in
turn ;)
Can you please update the kexec/002-add-arch-arm.patch without changing
get_memory..() params in kexec/kexec.c?
Thanks in advance and cheers,
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2007-01-23 11:47 aldot at uclibc.org
0 siblings, 0 replies; 17+ messages in thread
From: aldot at uclibc.org @ 2007-01-23 11:47 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2007-01-23 03:47:05 -0800 (Tue, 23 Jan 2007)
New Revision: 17488
Log:
- update timestamp of the build_dir binary by stripping it
Modified:
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2007-01-23 11:44:14 UTC (rev 17487)
+++ trunk/buildroot/package/kexec/kexec.mk 2007-01-23 11:47:05 UTC (rev 17488)
@@ -38,7 +38,7 @@
toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
endif
toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.dpatch
- touch $(KEXEC_DIR)/.unpacked
+ touch $@
$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
(cd $(KEXEC_DIR); rm -rf config.cache; \
@@ -50,15 +50,17 @@
--prefix=/ \
$(KEXEC_CONFIG_OPTS) \
);
- touch $(KEXEC_DIR)/.configured
+ touch $@
$(KEXEC_DIR)/$(KEXEC_BINARY): $(KEXEC_DIR)/.configured
$(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(KEXEC_DIR)
+ $(STRIP) -s $@
$(TARGET_DIR)/$(KEXEC_TARGET_BINARY): $(KEXEC_DIR)/$(KEXEC_BINARY)
cp -dpf $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY) \
$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/kdump \
$(TARGET_DIR)/sbin/
+ touch -c $@
kexec: uclibc $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2007-01-24 19:11 aldot at uclibc.org
0 siblings, 0 replies; 17+ messages in thread
From: aldot at uclibc.org @ 2007-01-24 19:11 UTC (permalink / raw)
To: buildroot
Author: aldot
Date: 2007-01-24 11:11:13 -0800 (Wed, 24 Jan 2007)
New Revision: 17504
Log:
- correct typo
Modified:
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2007-01-24 17:02:45 UTC (rev 17503)
+++ trunk/buildroot/package/kexec/kexec.mk 2007-01-24 19:11:13 UTC (rev 17504)
@@ -52,15 +52,15 @@
);
touch $@
-$(KEXEC_DIR)/$(KEXEC_BINARY): $(KEXEC_DIR)/.configured
+$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY): $(KEXEC_DIR)/.configured
$(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(KEXEC_DIR)
- $(STRIP) -s $@
+ touch -c $@
-$(TARGET_DIR)/$(KEXEC_TARGET_BINARY): $(KEXEC_DIR)/$(KEXEC_BINARY)
+$(TARGET_DIR)/$(KEXEC_TARGET_BINARY): $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY)
cp -dpf $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY) \
$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/kdump \
$(TARGET_DIR)/sbin/
- touch -c $@
+ $(STRIP) -s $(TARGET_DIR)/sbin/k{exec,dump}
kexec: uclibc $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
2007-07-24 14:06 [Buildroot] svn commit: trunk/buildroot/package/kexec ulf at uclibc.org
@ 2007-07-24 14:05 ` Bernhard Fischer
0 siblings, 0 replies; 17+ messages in thread
From: Bernhard Fischer @ 2007-07-24 14:05 UTC (permalink / raw)
To: buildroot
On Tue, Jul 24, 2007 at 07:06:16AM -0700, ulf at uclibc.org wrote:
>Author: ulf
>Date: 2007-07-24 07:06:13 -0700 (Tue, 24 Jul 2007)
>New Revision: 19246
>
>Log:
>Patch correctly kexec, make sure utils is built using HOSTCC
>
>Added:
> trunk/buildroot/package/kexec/kexec-patch.sh
> trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch
>
>Modified:
> trunk/buildroot/package/kexec/kexec.mk
>
>
>Changeset:
>Added: trunk/buildroot/package/kexec/kexec-patch.sh
>===================================================================
>--- trunk/buildroot/package/kexec/kexec-patch.sh (rev 0)
>+++ trunk/buildroot/package/kexec/kexec-patch.sh 2007-07-24 14:06:13 UTC (rev 19246)
>@@ -0,0 +1,16 @@
>+#!/bin/bash
>+SRCDIR=$1
>+PATCHDIR=$2
>+PATCHLIST=${PATCHDIR}/$3
>+
>+do_patch()
>+{
>+ cd ${SRCDIR}
>+ for f in `cat ${PATCHLIST}` ; do
>+ echo ${PATCHDIR}/$f
>+ cat ${PATCHDIR}/$f | patch -p2
>+ done
>+}
>+
>+do_patch
No, please don't do such a beast. See package/argus/argus.mk instead for
a simple 4-liner that does the same but in the makefile.
>+
>
>
>Property changes on: trunk/buildroot/package/kexec/kexec-patch.sh
>___________________________________________________________________
>Name: svn:executable
> + *
>
>Added: trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch
>===================================================================
>--- trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch (rev 0)
>+++ trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch 2007-07-24 14:06:13 UTC (rev 19246)
>@@ -0,0 +1,17 @@
>+diff -urN kexec-tools-1.101-0rig/util/Makefile kexec-tools-1.101/util/Makefile
>+--- kexec-tools-1.101-0rig/util/Makefile 2004-12-16 22:08:21.000000000 +0100
>++++ kexec-tools-1.101/util/Makefile 2007-07-24 16:32:48.000000000 +0200
>+@@ -1,4 +1,4 @@
>+ BIN_TO_HEX:= $(OBJDIR)/bin/bin-to-hex
>+ $(BIN_TO_HEX): util/bin-to-hex.c
>+ mkdir -p $(@D)
>+- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
>++ $(HOSTCC) $(HOST_CFLAGS) $< -o $@
BUILD_CC is perfectly fine. I'd rather add it to TARGET_CONFIGURE_OPTS
instead.
>+diff -urN kexec-tools-1.101-0rig/util/Makefile~ kexec-tools-1.101/util/Makefile~
>+--- kexec-tools-1.101-0rig/util/Makefile~ 1970-01-01 01:00:00.000000000 +0100
>++++ kexec-tools-1.101/util/Makefile~ 2004-12-16 22:08:21.000000000 +0100
This is a backup-file and should not be in the patch..
>+@@ -0,0 +1,4 @@
>++BIN_TO_HEX:= $(OBJDIR)/bin/bin-to-hex
>++$(BIN_TO_HEX): util/bin-to-hex.c
>++ mkdir -p $(@D)
>++ $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
>
>Modified: trunk/buildroot/package/kexec/kexec.mk
>===================================================================
>--- trunk/buildroot/package/kexec/kexec.mk 2007-07-24 13:41:05 UTC (rev 19245)
>+++ trunk/buildroot/package/kexec/kexec.mk 2007-07-24 14:06:13 UTC (rev 19246)
>@@ -35,9 +35,10 @@
> $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
> ifneq ($(KEXEC_PATCH),)
> (cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1)
>- toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
>+ package/kexec/kexec-patch.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches 00list
>+# toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
> endif
>- toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.dpatch
>+ toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.patch
> touch $@
>
> $(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
See above.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2007-07-24 14:06 ulf at uclibc.org
2007-07-24 14:05 ` Bernhard Fischer
0 siblings, 1 reply; 17+ messages in thread
From: ulf at uclibc.org @ 2007-07-24 14:06 UTC (permalink / raw)
To: buildroot
Author: ulf
Date: 2007-07-24 07:06:13 -0700 (Tue, 24 Jul 2007)
New Revision: 19246
Log:
Patch correctly kexec, make sure utils is built using HOSTCC
Added:
trunk/buildroot/package/kexec/kexec-patch.sh
trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch
Modified:
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Added: trunk/buildroot/package/kexec/kexec-patch.sh
===================================================================
--- trunk/buildroot/package/kexec/kexec-patch.sh (rev 0)
+++ trunk/buildroot/package/kexec/kexec-patch.sh 2007-07-24 14:06:13 UTC (rev 19246)
@@ -0,0 +1,16 @@
+#!/bin/bash
+SRCDIR=$1
+PATCHDIR=$2
+PATCHLIST=${PATCHDIR}/$3
+
+do_patch()
+{
+ cd ${SRCDIR}
+ for f in `cat ${PATCHLIST}` ; do
+ echo ${PATCHDIR}/$f
+ cat ${PATCHDIR}/$f | patch -p2
+ done
+}
+
+do_patch
+
Property changes on: trunk/buildroot/package/kexec/kexec-patch.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch (rev 0)
+++ trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch 2007-07-24 14:06:13 UTC (rev 19246)
@@ -0,0 +1,17 @@
+diff -urN kexec-tools-1.101-0rig/util/Makefile kexec-tools-1.101/util/Makefile
+--- kexec-tools-1.101-0rig/util/Makefile 2004-12-16 22:08:21.000000000 +0100
++++ kexec-tools-1.101/util/Makefile 2007-07-24 16:32:48.000000000 +0200
+@@ -1,4 +1,4 @@
+ BIN_TO_HEX:= $(OBJDIR)/bin/bin-to-hex
+ $(BIN_TO_HEX): util/bin-to-hex.c
+ mkdir -p $(@D)
+- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
++ $(HOSTCC) $(HOST_CFLAGS) $< -o $@
+diff -urN kexec-tools-1.101-0rig/util/Makefile~ kexec-tools-1.101/util/Makefile~
+--- kexec-tools-1.101-0rig/util/Makefile~ 1970-01-01 01:00:00.000000000 +0100
++++ kexec-tools-1.101/util/Makefile~ 2004-12-16 22:08:21.000000000 +0100
+@@ -0,0 +1,4 @@
++BIN_TO_HEX:= $(OBJDIR)/bin/bin-to-hex
++$(BIN_TO_HEX): util/bin-to-hex.c
++ mkdir -p $(@D)
++ $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2007-07-24 13:41:05 UTC (rev 19245)
+++ trunk/buildroot/package/kexec/kexec.mk 2007-07-24 14:06:13 UTC (rev 19246)
@@ -35,9 +35,10 @@
$(KEXEC_CAT) $(DL_DIR)/$(KEXEC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
ifneq ($(KEXEC_PATCH),)
(cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1)
- toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
+ package/kexec/kexec-patch.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches 00list
+# toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
endif
- toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.dpatch
+ toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.patch
touch $@
$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2007-07-27 7:34 ulf at uclibc.org
2007-07-27 10:32 ` Bernhard Fischer
0 siblings, 1 reply; 17+ messages in thread
From: ulf at uclibc.org @ 2007-07-27 7:34 UTC (permalink / raw)
To: buildroot
Author: ulf
Date: 2007-07-27 00:34:44 -0700 (Fri, 27 Jul 2007)
New Revision: 19267
Log:
Patch kexec inside makefile
Removed:
trunk/buildroot/package/kexec/kexec-patch.sh
Modified:
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Deleted: trunk/buildroot/package/kexec/kexec-patch.sh
===================================================================
--- trunk/buildroot/package/kexec/kexec-patch.sh 2007-07-27 07:32:13 UTC (rev 19266)
+++ trunk/buildroot/package/kexec/kexec-patch.sh 2007-07-27 07:34:44 UTC (rev 19267)
@@ -1,16 +0,0 @@
-#!/bin/bash
-SRCDIR=$1
-PATCHDIR=$2
-PATCHLIST=${PATCHDIR}/$3
-
-do_patch()
-{
- cd ${SRCDIR}
- for f in `cat ${PATCHLIST}` ; do
- echo ${PATCHDIR}/$f
- cat ${PATCHDIR}/$f | patch -p2
- done
-}
-
-do_patch
-
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2007-07-27 07:32:13 UTC (rev 19266)
+++ trunk/buildroot/package/kexec/kexec.mk 2007-07-27 07:34:44 UTC (rev 19267)
@@ -34,9 +34,10 @@
$(KEXEC_DIR)/.unpacked: $(DL_DIR)/$(KEXEC_SOURCE) $(DL_DIR)/$(KEXEC_PATCH)
$(KEXEC_CAT) $(DL_DIR)/$(KEXEC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
ifneq ($(KEXEC_PATCH),)
- (cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1)
- package/kexec/kexec-patch.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches 00list
-# toolchain/patch-kernel.sh $(KEXEC_DIR) $(KEXEC_DIR)/debian/patches \*.patch
+ (cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1; \
+ for f in `cat debian/patches/00list` ; do \
+ cat debian/patches/$$f | patch -p2 ; \
+ done)
endif
toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.patch
touch $@
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
2007-07-27 7:34 ulf at uclibc.org
@ 2007-07-27 10:32 ` Bernhard Fischer
0 siblings, 0 replies; 17+ messages in thread
From: Bernhard Fischer @ 2007-07-27 10:32 UTC (permalink / raw)
To: buildroot
On Fri, Jul 27, 2007 at 12:34:44AM -0700, ulf at uclibc.org wrote:
>Author: ulf
>Date: 2007-07-27 00:34:44 -0700 (Fri, 27 Jul 2007)
>New Revision: 19267
>
>Log:
>Patch kexec inside makefile
Thanks for fixing this.
cheers,
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2007-10-18 5:26 ulf at uclibc.org
2007-10-18 5:47 ` Hamish Moffatt
0 siblings, 1 reply; 17+ messages in thread
From: ulf at uclibc.org @ 2007-10-18 5:26 UTC (permalink / raw)
To: buildroot
Author: ulf
Date: 2007-10-17 22:26:06 -0700 (Wed, 17 Oct 2007)
New Revision: 20278
Log:
Fix kexec build for ARM
Modified:
trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
Changeset:
Modified: trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch 2007-10-17 22:01:58 UTC (rev 20277)
+++ trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch 2007-10-18 05:26:06 UTC (rev 20278)
@@ -5,7 +5,7 @@
i?86 )
host_cpu="i386"
;;
-+ arm )
++ arm* )
+ host_cpu="arm"
+ ;;
powerpc )
@@ -76,7 +76,7 @@
+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)
++int get_memory_ranges(struct memory_range **range, int *ranges, unsigned long kexec_flags)
+{
+ const char iomem[]= "/proc/iomem";
+ int memory_ranges = 0;
@@ -385,3 +385,14 @@
+typedef signed long long int64_t;
+
+#endif /* STDINT_H */
+--- kexec-tools-1.101/kexec/kexec-syscall.h.orig 2007-10-18 14:28:44.000000000 +1000
++++ kexec-tools-1.101/kexec/kexec-syscall.h 2007-10-18 14:28:57.000000000 +1000
+@@ -44,7 +44,7 @@
+ #define __NR_kexec_load 277
+ #endif
+ #ifdef __arm__
+-#define __NR_kexec_load __NR_SYSCALL_BASE + 189
++#define __NR_kexec_load __NR_SYSCALL_BASE + 347
+ #endif
+ #ifndef __NR_kexec_load
+ #error Unknown processor architecture. Needs a kexec_load syscall number.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
2007-10-18 5:26 ulf at uclibc.org
@ 2007-10-18 5:47 ` Hamish Moffatt
2007-10-18 6:16 ` Ulf Samuelsson
0 siblings, 1 reply; 17+ messages in thread
From: Hamish Moffatt @ 2007-10-18 5:47 UTC (permalink / raw)
To: buildroot
On Wed, Oct 17, 2007 at 10:26:07PM -0700, ulf at uclibc.org wrote:
> Author: ulf
> Date: 2007-10-17 22:26:06 -0700 (Wed, 17 Oct 2007)
> New Revision: 20278
>
> Log:
> Fix kexec build for ARM
>
> Modified:
> trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
Thanks Ulf. Are patches related to bugs preferred on the mailing list or
in the bug tracker?
Hamish
--
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
2007-10-18 5:47 ` Hamish Moffatt
@ 2007-10-18 6:16 ` Ulf Samuelsson
0 siblings, 0 replies; 17+ messages in thread
From: Ulf Samuelsson @ 2007-10-18 6:16 UTC (permalink / raw)
To: buildroot
tor 2007-10-18 klockan 15:47 +1000 skrev Hamish Moffatt:
> On Wed, Oct 17, 2007 at 10:26:07PM -0700, ulf at uclibc.org wrote:
> > Author: ulf
> > Date: 2007-10-17 22:26:06 -0700 (Wed, 17 Oct 2007)
> > New Revision: 20278
> >
> > Log:
> > Fix kexec build for ARM
> >
> > Modified:
> > trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
>
> Thanks Ulf. Are patches related to bugs preferred on the mailing list or
> in the bug tracker?
>
The advantage of using the bug tracker, is that the bug is tracked.
> Hamish
--
Best Regards,
Ulf Samuelsson mail: ulf at atmel.com
Atmel Nordic AB
Box 2033, 174 52 Sundbyberg
Kavalleriv?gen 24, 174 58 Sundbyberg
Sweden
Tel: +46 8 441 54 22 GSM: +46 706 224457
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2008-05-28 1:21 hamish at uclibc.org
0 siblings, 0 replies; 17+ messages in thread
From: hamish at uclibc.org @ 2008-05-28 1:21 UTC (permalink / raw)
To: buildroot
Author: hamish
Date: 2008-05-27 18:21:45 -0700 (Tue, 27 May 2008)
New Revision: 22096
Log:
Remove bashisms
Modified:
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2008-05-27 15:57:48 UTC (rev 22095)
+++ trunk/buildroot/package/kexec/kexec.mk 2008-05-28 01:21:45 UTC (rev 22096)
@@ -62,13 +62,13 @@
cp -dpf $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY) \
$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/kdump \
$(TARGET_DIR)/sbin/
- $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/sbin/k{exec,dump}
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/sbin/kexec $(TARGET_DIR)/sbin/kdump
kexec: uclibc $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
kexec-clean:
-$(MAKE) -C $(KEXEC_DIR) clean
- rm -f $(TARGET_DIR)/sbin/k{exec,dump}
+ rm -f $(TARGET_DIR)/sbin/kexec $(TARGET_DIR)/sbin/kdump
kexec-dirclean:
rm -rf $(KEXEC_DIR)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] svn commit: trunk/buildroot/package/kexec
@ 2009-02-21 19:13 jacmet at uclibc.org
0 siblings, 0 replies; 17+ messages in thread
From: jacmet at uclibc.org @ 2009-02-21 19:13 UTC (permalink / raw)
To: buildroot
Author: jacmet
Date: 2009-02-21 19:13:24 +0000 (Sat, 21 Feb 2009)
New Revision: 25409
Log:
kexec: bump version and convert to Makefile.autotools.in format
Removed:
trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch
trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch
Modified:
trunk/buildroot/package/kexec/Config.in
trunk/buildroot/package/kexec/kexec.mk
Changeset:
Modified: trunk/buildroot/package/kexec/Config.in
===================================================================
--- trunk/buildroot/package/kexec/Config.in 2009-02-21 13:04:08 UTC (rev 25408)
+++ trunk/buildroot/package/kexec/Config.in 2009-02-21 19:13:24 UTC (rev 25409)
@@ -4,7 +4,7 @@
Kexec is a user space utiltity for loading another kernel
and asking the currently running kernel to do something with it.
- http://www.xmission.com/~ebiederm/files/kexec/
+ http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/
config BR2_PACKAGE_KEXEC_ZLIB
bool "Kexec with zlib support"
Deleted: trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch 2009-02-21 13:04:08 UTC (rev 25408)
+++ trunk/buildroot/package/kexec/kexec-tools-001-smaller-reboot.patch 2009-02-21 19:13:24 UTC (rev 25409)
@@ -1,27 +0,0 @@
---- 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;
- }
-
Deleted: trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch 2009-02-21 13:04:08 UTC (rev 25408)
+++ trunk/buildroot/package/kexec/kexec-tools-002-add-arch-arm.patch 2009-02-21 19:13:24 UTC (rev 25409)
@@ -1,398 +0,0 @@
-diff -rduNp kexec-tools-1.101.orig/configure kexec-tools-1.101/configure
---- kexec-tools-1.101.orig/configure 2006-09-20 04:39:38.000000000 +0200
-+++ kexec-tools-1.101/configure 2007-01-22 15:54:14.000000000 +0100
-@@ -1381,6 +1381,9 @@ case $host_cpu in
- i?86 )
- host_cpu="i386"
- ;;
-+ arm* )
-+ host_cpu="arm"
-+ ;;
- powerpc )
- host_cpu="ppc"
- ;;
-@@ -1395,7 +1398,7 @@ case $host_cpu in
- ;;
- esac
- case $host_cpu in
-- i386|ppc|x86_64|alpha|ppc64|ia64|s390)
-+ i386|ppc|x86_64|alpha|ppc64|ia64|s390|arm)
- ;;
- * )
- { { echo "$as_me:$LINENO: error: unsupported architecture $host_cpu" >&5
-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/kexec/arch/arm/Makefile 2007-01-22 15:54:14.000000000 +0100
-@@ -0,0 +1,8 @@
-+#
-+# kexec arm (linux booting linux)
-+#
-+KEXEC_C_SRCS+= kexec/arch/arm/kexec-elf-rel-arm.c
-+KEXEC_C_SRCS+= kexec/arch/arm/kexec-zImage-arm.c
-+KEXEC_C_SRCS+= kexec/arch/arm/kexec-arm.c
-+
-+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
---- 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 2007-01-22 15:54:14.000000000 +0100
-@@ -0,0 +1,11 @@
-+#ifndef KEXEC_ARCH_ARM_OPTIONS_H
-+#define KEXEC_ARCH_ARM_OPTIONS_H
-+
-+#define OPT_ARCH_MAX (OPT_MAX+0)
-+
-+#define KEXEC_ARCH_OPTIONS \
-+ KEXEC_OPTIONS \
-+
-+#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
-+
-+#endif /* KEXEC_ARCH_ARM_OPTIONS_H */
-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/kexec/arch/arm/kexec-arm.c 2007-01-22 15:54:14.000000000 +0100
-@@ -0,0 +1,130 @@
-+/*
-+ * kexec: Linux boots Linux
-+ *
-+ * modified from kexec-ppc.c
-+ *
-+ */
-+
-+#define _GNU_SOURCE
-+#include <stddef.h>
-+#include <stdio.h>
-+#include <errno.h>
-+#include <stdint.h>
-+#include <string.h>
-+#include <getopt.h>
-+#include <sys/utsname.h>
-+#include "../../kexec.h"
-+#include "../../kexec-syscall.h"
-+#include "kexec-arm.h"
-+#include <arch/options.h>
-+
-+#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)
-+{
-+ const char iomem[]= "/proc/iomem";
-+ int memory_ranges = 0;
-+ char line[MAX_LINE];
-+ FILE *fp;
-+ fp = fopen(iomem, "r");
-+ if (!fp) {
-+ fprintf(stderr, "Cannot open %s: %s\n",
-+ iomem, strerror(errno));
-+ return -1;
-+ }
-+
-+ while(fgets(line, sizeof(line), fp) != 0) {
-+ unsigned long long start, end;
-+ char *str;
-+ int type;
-+ int consumed;
-+ int count;
-+ if (memory_ranges >= MAX_MEMORY_RANGES)
-+ break;
-+ count = sscanf(line, "%Lx-%Lx : %n",
-+ &start, &end, &consumed);
-+ if (count != 2)
-+ continue;
-+ str = line + consumed;
-+ end = end + 1;
-+
-+ if (memcmp(str, "System RAM\n", 11) == 0) {
-+ type = RANGE_RAM;
-+ }
-+ else if (memcmp(str, "reserved\n", 9) == 0) {
-+ type = RANGE_RESERVED;
-+ }
-+ else {
-+ continue;
-+ }
-+
-+ memory_range[memory_ranges].start = start;
-+ memory_range[memory_ranges].end = end;
-+ memory_range[memory_ranges].type = type;
-+ memory_ranges++;
-+ }
-+ fclose(fp);
-+ *range = memory_range;
-+ *ranges = memory_ranges;
-+ return 0;
-+}
-+
-+/* Supported file types and callbacks */
-+struct file_type file_type[] = {
-+ {"zImage", zImage_arm_probe, zImage_arm_load, zImage_arm_usage},
-+};
-+int file_types = sizeof(file_type) / sizeof(file_type[0]);
-+
-+
-+void arch_usage(void)
-+{
-+}
-+
-+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:
-+ break;
-+ }
-+ }
-+ /* 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 (strncmp(utsname.machine, "arm",3) != 0)
-+ {
-+ fprintf(stderr, "Unsupported machine type: %s\n",
-+ utsname.machine);
-+ return -1;
-+ }
-+ return 0;
-+}
-+
-+void arch_update_purgatory(struct kexec_info *info)
-+{
-+}
-+
-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/kexec/arch/arm/kexec-arm.h 2007-01-22 15:54:14.000000000 +0100
-@@ -0,0 +1,9 @@
-+#ifndef KEXEC_ARM_H
-+#define KEXEC_ARM_H
-+
-+int zImage_arm_probe(const char *buf, off_t len);
-+int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info);
-+void zImage_arm_usage(void);
-+
-+#endif /* KEXEC_ARM_H */
-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/kexec/arch/arm/kexec-elf-rel-arm.c 2007-01-22 15:54:14.000000000 +0100
-@@ -0,0 +1,35 @@
-+#include <stdio.h>
-+#include <elf.h>
-+#include "../../kexec.h"
-+#include "../../kexec-elf.h"
-+
-+int machine_verify_elf_rel(struct mem_ehdr *ehdr)
-+{
-+ if (ehdr->ei_data != ELFDATA2MSB) {
-+ return 0;
-+ }
-+ if (ehdr->ei_class != ELFCLASS32) {
-+ return 0;
-+ }
-+ if (ehdr->e_machine != EM_ARM)
-+ {
-+ return 0;
-+ }
-+ return 1;
-+}
-+
-+void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
-+ void *location, unsigned long address, unsigned long value)
-+{
-+ switch(r_type) {
-+ case R_ARM_ABS32:
-+ *((uint32_t *)location) += value;
-+ break;
-+ case R_ARM_REL32:
-+ *((uint32_t *)location) += value - address;
-+ break;
-+ default:
-+ die("Unknown rel relocation: %lu\n", r_type);
-+ break;
-+ }
-+}
-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/kexec/arch/arm/kexec-zImage-arm.c 2007-01-22 15:54:14.000000000 +0100
-@@ -0,0 +1,34 @@
-+#define _GNU_SOURCE
-+#include <stdio.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <errno.h>
-+#include <limits.h>
-+#include "../../kexec.h"
-+
-+int zImage_arm_probe(const char *buf, off_t len)
-+{
-+ /*
-+ * Only zImage loading is supported. Do not check if
-+ * the buffer is valid kernel image
-+ */
-+ return 0;
-+}
-+void zImage_arm_usage(void)
-+{
-+}
-+int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
-+ struct kexec_info *info)
-+{
-+ unsigned long base;
-+ unsigned int offset = 0x8000; /* 32k offset from memory start */
-+ base = locate_hole(info,len+offset,0,0,ULONG_MAX,INT_MAX);
-+ if (base == ULONG_MAX)
-+ {
-+ return -1;
-+ }
-+ base += offset;
-+ add_segment(info,buf,len,base,len);
-+ info->entry = (void*)base;
-+ return 0;
-+}
-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 2006-09-20 04:39:38.000000000 +0200
-+++ kexec-tools-1.101/kexec/kexec-syscall.h 2007-01-22 15:54:14.000000000 +0100
-@@ -43,6 +43,9 @@
- #ifdef __s390__
- #define __NR_kexec_load 277
- #endif
-+#ifdef __arm__
-+#define __NR_kexec_load __NR_SYSCALL_BASE + 189
-+#endif
- #ifndef __NR_kexec_load
- #error Unknown processor architecture. Needs a kexec_load syscall number.
- #endif
-@@ -74,6 +77,7 @@ static inline long kexec_reboot(void)
- #define KEXEC_ARCH_PPC64 (21 << 16)
- #define KEXEC_ARCH_IA_64 (50 << 16)
- #define KEXEC_ARCH_S390 (22 << 16)
-+#define KEXEC_ARCH_ARM (40 << 16)
-
- #define KEXEC_MAX_SEGMENTS 16
-
-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/purgatory/arch/arm/Makefile 2007-01-22 15:54:14.000000000 +0100
-@@ -0,0 +1,7 @@
-+#
-+# Purgatory arm
-+#
-+
-+PURGATORY_S_SRCS +=
-+PURGATORY_C_SRCS +=
-+
-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/purgatory/arch/arm/include/limits.h 2007-01-22 15:54:14.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 -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/purgatory/arch/arm/include/stdint.h 2007-01-22 15:54:14.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 */
---- kexec-tools-1.101/kexec/kexec-syscall.h.orig 2007-10-18 14:28:44.000000000 +1000
-+++ kexec-tools-1.101/kexec/kexec-syscall.h 2007-10-18 14:28:57.000000000 +1000
-@@ -44,7 +44,7 @@
- #define __NR_kexec_load 277
- #endif
- #ifdef __arm__
--#define __NR_kexec_load __NR_SYSCALL_BASE + 189
-+#define __NR_kexec_load __NR_SYSCALL_BASE + 347
- #endif
- #ifndef __NR_kexec_load
- #error Unknown processor architecture. Needs a kexec_load syscall number.
Deleted: trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch
===================================================================
--- trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch 2009-02-21 13:04:08 UTC (rev 25408)
+++ trunk/buildroot/package/kexec/kexec-tools-003-build-util-using-host-gcc.patch 2009-02-21 19:13:24 UTC (rev 25409)
@@ -1,17 +0,0 @@
-diff -urN kexec-tools-1.101-0rig/util/Makefile kexec-tools-1.101/util/Makefile
---- kexec-tools-1.101-0rig/util/Makefile 2004-12-16 22:08:21.000000000 +0100
-+++ kexec-tools-1.101/util/Makefile 2007-07-24 16:32:48.000000000 +0200
-@@ -1,4 +1,4 @@
- BIN_TO_HEX:= $(OBJDIR)/bin/bin-to-hex
- $(BIN_TO_HEX): util/bin-to-hex.c
- mkdir -p $(@D)
-- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
-+ $(HOSTCC) $(HOST_CFLAGS) $< -o $@
-diff -urN kexec-tools-1.101-0rig/util/Makefile~ kexec-tools-1.101/util/Makefile~
---- kexec-tools-1.101-0rig/util/Makefile~ 1970-01-01 01:00:00.000000000 +0100
-+++ kexec-tools-1.101/util/Makefile~ 2004-12-16 22:08:21.000000000 +0100
-@@ -0,0 +1,4 @@
-+BIN_TO_HEX:= $(OBJDIR)/bin/bin-to-hex
-+$(BIN_TO_HEX): util/bin-to-hex.c
-+ mkdir -p $(@D)
-+ $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
Modified: trunk/buildroot/package/kexec/kexec.mk
===================================================================
--- trunk/buildroot/package/kexec/kexec.mk 2009-02-21 13:04:08 UTC (rev 25408)
+++ trunk/buildroot/package/kexec/kexec.mk 2009-02-21 19:13:24 UTC (rev 25409)
@@ -3,80 +3,27 @@
# kexec
#
#############################################################
-KEXEC_VERSION:=1.101
-KEXEC_SOURCE:=kexec-tools_$(KEXEC_VERSION)-kdump10.orig.tar.gz
-KEXEC_PATCH:=kexec-tools_$(KEXEC_VERSION)-kdump10-2.diff.gz
-KEXEC_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/k/kexec-tools/
-KEXEC_DIR:=$(BUILD_DIR)/kexec-tools-$(KEXEC_VERSION)
-KEXEC_CAT:=$(ZCAT)
-KEXEC_BINARY:=kexec
-KEXEC_TARGET_BINARY:=sbin/kexec
+KEXEC_VERSION = 2.0.0
+KEXEC_SOURCE = kexec-tools-$(KEXEC_VERSION).tar.bz2
+KEXEC_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/horms/kexec-tools/
+# no install-strip/install-exec
+KEXEC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
-KEXEC_CONFIG_OPTS:=
-KEXEC_DEPS_y:=
+KEXEC_DEPENDENCIES = uclibc
-KEXEC_DEPS_$(KEXEC_PACKAGE_KEXEC) += zlib
-
ifeq ($(BR2_PACKAGE_KEXEC_ZLIB),y)
-KEXEC_CONFIG_OPTS += --with-zlib
+KEXEC_CONF_OPT += --with-zlib
+KEXEC_DEPENDENCIES += zlib
else
-KEXEC_CONFIG_OPTS += --without-zlib
+KEXEC_CONF_OPT += --without-zlib
endif
-$(DL_DIR)/$(KEXEC_SOURCE):
- $(call DOWNLOAD,$(KEXEC_SITE),$(KEXEC_SOURCE))
+$(eval $(call AUTOTARGETS,package,kexec))
-$(DL_DIR)/$(KEXEC_PATCH):
- $(call DOWNLOAD,$(KEXEC_SITE),$(KEXEC_PATCH))
-
-kexec-source: $(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) -
-ifneq ($(KEXEC_PATCH),)
- (cd $(KEXEC_DIR) && $(KEXEC_CAT) $(DL_DIR)/$(KEXEC_PATCH) | patch -p1; \
- for f in `cat debian/patches/00list`; do \
- cat debian/patches/$$f | patch -p2; \
- done)
+$(KEXEC_HOOK_POST_INSTALL): $(KEXEC_TARGET_INSTALL_TARGET)
+ifneq ($(BR2_ENABLE_DEBUG),y)
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/kexec
+ $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/kdump
endif
- toolchain/patch-kernel.sh $(KEXEC_DIR) package/kexec/ kexec\*.patch
+ rm -rf $(TARGET_DIR)/usr/lib/kexec-tools
touch $@
-
-$(KEXEC_DIR)/.configured: $(KEXEC_DIR)/.unpacked
- (cd $(KEXEC_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/ \
- $(KEXEC_CONFIG_OPTS) \
- )
- touch $@
-
-$(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY): $(KEXEC_DIR)/.configured
- $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(KEXEC_DIR)
- touch -c $@
-
-$(TARGET_DIR)/$(KEXEC_TARGET_BINARY): $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY)
- cp -dpf $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/$(KEXEC_BINARY) \
- $(KEXEC_DIR)/objdir-$(GNU_TARGET_NAME)/build/sbin/kdump \
- $(TARGET_DIR)/sbin/
- $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/sbin/kexec $(TARGET_DIR)/sbin/kdump
-
-kexec: uclibc $(TARGET_DIR)/$(KEXEC_TARGET_BINARY)
-
-kexec-clean:
- -$(MAKE) -C $(KEXEC_DIR) clean
- rm -f $(TARGET_DIR)/sbin/kexec $(TARGET_DIR)/sbin/kdump
-
-kexec-dirclean:
- rm -rf $(KEXEC_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_KEXEC),y)
-TARGETS+=kexec
-endif
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-02-21 19:13 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 14:06 [Buildroot] svn commit: trunk/buildroot/package/kexec ulf at uclibc.org
2007-07-24 14:05 ` Bernhard Fischer
-- strict thread matches above, loose matches on Subject: below --
2009-02-21 19:13 jacmet at uclibc.org
2008-05-28 1:21 hamish at uclibc.org
2007-10-18 5:26 ulf at uclibc.org
2007-10-18 5:47 ` Hamish Moffatt
2007-10-18 6:16 ` Ulf Samuelsson
2007-07-27 7:34 ulf at uclibc.org
2007-07-27 10:32 ` Bernhard Fischer
2007-01-24 19:11 aldot at uclibc.org
2007-01-23 11:47 aldot at uclibc.org
2007-01-22 14:59 aldot at uclibc.org
2006-12-20 17:40 aldot at uclibc.org
2006-12-20 16:50 aldot at uclibc.org
2006-12-20 17:01 ` Petr Stetiar
2007-01-22 16:45 ` Bernhard Fischer
2006-12-20 14:41 aldot at uclibc.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox