Re: Improving Performance
Geert,
Hi Michael,
On Thu, Mar 13, 2014 at 7:35 AM, schmitz
<schmitz@biophys.uni-duesseldorf.de> wrote:
(Neither do I have kexec tools yet - nice plug though, Geert! I definitely
need to play with kexec.)
git clone git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
cd kexec-tools
./bootstrap
./configure
make install
It has less build requirements than ARAnyM ;-)
Fails with:
schmitz@hobbes:~/kexec-tools$ make
gcc -g -O2 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include
-I./util_lib/include -Iinclude/ -I./kexec/arch/m68k/include -c -MD -o
kexec/kexec.o kexec/kexec.c
In file included from kexec/kexec.c:44:
kexec/kexec-syscall.h:52:2: #error Unknown processor architecture. Needs
a kexec_load syscall number.
In file included from kexec/kexec.c:44:
kexec/kexec-syscall.h: In function `kexec_load':
kexec/kexec-syscall.h:61: error: `__NR_kexec_load' undeclared (first use
in this function)
kexec/kexec-syscall.h:61: error: (Each undeclared identifier is reported
only once
kexec/kexec-syscall.h:61: error: for each function it appears in.)
make: *** [kexec/kexec.o] Error 1
(no syscall no. defined in the kernel headers).
Hmmm - the backup #ifdef __m68k__ does not appear to trigger, maybe it's
__mc68000__ instead?
See attached - not really enough yet, though:
In file included from kexec/arch/m68k/kexec-m68k.c:19:
kexec/arch/m68k/bootinfo.h:12: error: syntax error before "__be16"
kexec/arch/m68k/bootinfo.h:12: warning: no semicolon at end of struct or
union
kexec/arch/m68k/bootinfo.h:13: warning: type defaults to `int' in
declaration of `size'
kexec/arch/m68k/bootinfo.h:13: warning: data definition has no type or
storage class
kexec/arch/m68k/bootinfo.h:15: error: syntax error before "__be32"
kexec/arch/m68k/bootinfo.h:15: warning: no semicolon at end of struct or
union
kexec/arch/m68k/bootinfo.h:17: warning: type defaults to `int' in
declaration of `machtype'
kexec/arch/m68k/bootinfo.h:17: warning: data definition has no type or
storage class
kexec/arch/m68k/bootinfo.h:19: error: syntax error before "__be32"
kexec/arch/m68k/bootinfo.h:19: warning: no semicolon at end of struct or
union
kexec/arch/m68k/bootinfo.h:20: warning: type defaults to `int' in
declaration of `size'
kexec/arch/m68k/bootinfo.h:20: warning: data definition has no type or
storage class
kexec/arch/m68k/bootinfo.h:21: warning: type defaults to `int' in
declaration of `mem_info'
kexec/arch/m68k/bootinfo.h:21: warning: data definition has no type or
storage class
kexec/arch/m68k/bootinfo.h:23: error: syntax error before '}' token
make: *** [kexec/arch/m68k/kexec-m68k.o] Error 1
Missing typedefs for __u16, __u32, __be16 and __be32 (the former two
being present in /usr/include/asm/types.h but not picked up from there).
Patch attached as well - may be harmful on more recent m68k installations.
Untested, yet.
Cheers,
Michael
>From 546c34dbbbbaf7100f529aa350b3adbf5d6bebf3 Mon Sep 17 00:00:00 2001
From: Michael Schmitz <schmitz@debian.org>
Date: Sat, 15 Mar 2014 12:59:29 +1300
Subject: [PATCH] Fix m68k default syscall #define
Signed-off-by: Michael Schmitz <schmitz@debian.org>
---
kexec/kexec-syscall.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
index 6238044..92efbf2 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
@@ -118,7 +118,7 @@ static inline long kexec_load(void *entry, unsigned long nr_segments,
#if defined(__mips__)
#define KEXEC_ARCH_NATIVE KEXEC_ARCH_MIPS
#endif
-#ifdef __m68k__
+#if defined(__m68k__) || defined(__mc68000__)
#define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K
#endif
--
1.5.6
>From 22ba5a8482a7c4aeb0d154f5155b1623ac5830c6 Mon Sep 17 00:00:00 2001
From: Michael Schmitz <schmitz@debian.org>
Date: Sat, 15 Mar 2014 13:30:48 +1300
Subject: [PATCH] more m68k compile fixes
Signed-off-by: Michael Schmitz <schmitz@debian.org>
---
kexec/arch/m68k/bootinfo.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/kexec/arch/m68k/bootinfo.h b/kexec/arch/m68k/bootinfo.h
index b6f453d..33d36c1 100644
--- a/kexec/arch/m68k/bootinfo.h
+++ b/kexec/arch/m68k/bootinfo.h
@@ -3,6 +3,17 @@
#define DEFAULT_BOOTINFO_FILE "/proc/bootinfo"
#define MAX_BOOTINFO_SIZE 1536
+ /*
+ * These went missing from my m68k system - MSch
+ */
+
+typedef unsigned short __u16;
+typedef unsigned int __u32;
+
+typedef __u16 __le16;
+typedef __u16 __be16;
+typedef __u32 __le32;
+typedef __u32 __be32;
/*
* Convenience overlay of several struct bi_record variants
--
1.5.6
Reply to: