From 3973e307e10c865712ad59b3f609e27f1e2bddfc Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 17 Mar 2008 10:25:43 +0900 Subject: kexec-tools: mips: support big-endian mips (repost) [ Reposted with correct linux-mips address ] Hi, this patch switches the mips support in kexec-tools around a little bit. All the files and directories containing "mipsel" have been renamed to contain "mips" instead. This is kind of consistent with the way that ARCH=mips in the kernel works for both big and little endian. After a small amount of tweaking, which is also included in this patch, the code compiles and works fine for big endian mips as well as small endian mips. All you need to do is compile using an appropriate compiler. That is to say, kexec-tools's build system doesn't need to be told about which endienness the code is being compiled for. I have added kept mipsel as a supported "architecture" via ./configure, though its just an alias for mips now. This is consistent with how other architectures such as sh are treated. But I'm happy to remove mipsel from ./configure if the mips people want that. I tested this patch using qemu and the 2.6.24.3 tag of the mips-2.6 git tree compiled for the qemu machine type for both big and little endian. The qemu machine type has subsequently been removed, and kexec-tools needs some work in order to function with qemu - as far as I understand the way the boot parameters are passed needs to be fixed, likely in purgatory. However, this is not related to the changes introduced in this patch. I intend to merge this patch into kexec-tools-testing if no alarm bells are sounded. Signed-off-by: Simon Horman --- purgatory/arch/mips/Makefile | 11 +++++++++++ purgatory/arch/mips/console-mips.c | 5 +++++ purgatory/arch/mips/purgatory-mips.c | 7 +++++++ purgatory/arch/mips/purgatory-mips.h | 6 ++++++ purgatory/arch/mipsel/Makefile | 11 ----------- purgatory/arch/mipsel/console-mipsel.c | 5 ----- purgatory/arch/mipsel/purgatory-mipsel.c | 7 ------- purgatory/arch/mipsel/purgatory-mipsel.h | 6 ------ 8 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 purgatory/arch/mips/Makefile create mode 100644 purgatory/arch/mips/console-mips.c create mode 100644 purgatory/arch/mips/purgatory-mips.c create mode 100644 purgatory/arch/mips/purgatory-mips.h delete mode 100644 purgatory/arch/mipsel/Makefile delete mode 100644 purgatory/arch/mipsel/console-mipsel.c delete mode 100644 purgatory/arch/mipsel/purgatory-mipsel.c delete mode 100644 purgatory/arch/mipsel/purgatory-mipsel.h (limited to 'purgatory/arch') diff --git a/purgatory/arch/mips/Makefile b/purgatory/arch/mips/Makefile new file mode 100644 index 0000000..9ec0c8b --- /dev/null +++ b/purgatory/arch/mips/Makefile @@ -0,0 +1,11 @@ +# +# Purgatory mips +# + +mips_PURGATORY_SRCS+= purgatory/arch/mips/purgatory-mips.c +mips_PURGATORY_SRCS+= purgatory/arch/mips/console-mips.c + +dist += purgatory/arch/mips/Makefile $(mips_PURGATORY_C_SRCS) \ + purgatory/arch/mips/include/limits.h \ + purgatory/arch/mips/purgatory-mips.h + diff --git a/purgatory/arch/mips/console-mips.c b/purgatory/arch/mips/console-mips.c new file mode 100644 index 0000000..389b7be --- /dev/null +++ b/purgatory/arch/mips/console-mips.c @@ -0,0 +1,5 @@ +#include +void putchar(int ch) +{ + /* Nothing for now */ +} diff --git a/purgatory/arch/mips/purgatory-mips.c b/purgatory/arch/mips/purgatory-mips.c new file mode 100644 index 0000000..cb25bf7 --- /dev/null +++ b/purgatory/arch/mips/purgatory-mips.c @@ -0,0 +1,7 @@ +#include +#include "purgatory-mips.h" + +void setup_arch(void) +{ + /* Nothing for now */ +} diff --git a/purgatory/arch/mips/purgatory-mips.h b/purgatory/arch/mips/purgatory-mips.h new file mode 100644 index 0000000..c57b402 --- /dev/null +++ b/purgatory/arch/mips/purgatory-mips.h @@ -0,0 +1,6 @@ +#ifndef PURGATORY_MIPSEL_H +#define PURGATORY_MIPSEL_H + +/* nothing yet */ + +#endif /* PURGATORY_MIPSEL_H */ diff --git a/purgatory/arch/mipsel/Makefile b/purgatory/arch/mipsel/Makefile deleted file mode 100644 index c6e0580..0000000 --- a/purgatory/arch/mipsel/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# Purgatory mipsel -# - -mipsel_PURGATORY_C_SRCS+= purgatory/arch/mipsel/purgatory-mipsel.c -mipsel_PURGATORY_C_SRCS+= purgatory/arch/mipsel/console-mipsel.c - -dist += purgatory/arch/mipsel/Makefile $(mipsel_PURGATORY_C_SRCS) \ - purgatory/arch/mipsel/include/limits.h \ - purgatory/arch/mipsel/purgatory-mipsel.h - diff --git a/purgatory/arch/mipsel/console-mipsel.c b/purgatory/arch/mipsel/console-mipsel.c deleted file mode 100644 index 389b7be..0000000 --- a/purgatory/arch/mipsel/console-mipsel.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -void putchar(int ch) -{ - /* Nothing for now */ -} diff --git a/purgatory/arch/mipsel/purgatory-mipsel.c b/purgatory/arch/mipsel/purgatory-mipsel.c deleted file mode 100644 index f8780de..0000000 --- a/purgatory/arch/mipsel/purgatory-mipsel.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include "purgatory-mipsel.h" - -void setup_arch(void) -{ - /* Nothing for now */ -} diff --git a/purgatory/arch/mipsel/purgatory-mipsel.h b/purgatory/arch/mipsel/purgatory-mipsel.h deleted file mode 100644 index c57b402..0000000 --- a/purgatory/arch/mipsel/purgatory-mipsel.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef PURGATORY_MIPSEL_H -#define PURGATORY_MIPSEL_H - -/* nothing yet */ - -#endif /* PURGATORY_MIPSEL_H */ -- cgit