1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

kexec-tools: fix build failure on aarch64_be architecture

* refresh/cleanup the patch to apply cleanly on 2.0.9
* get rid of configure - it's autogenerated
* configure.ac: use aarch64* wildcard

(From OE-Core rev: 66457319e4050fee569aeccd1fe98fbf9f046f02)

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Fathi Boudra
2015-02-20 20:46:41 +02:00
committed by Richard Purdie
parent b4a936a938
commit 4b69d0013d
@@ -15,36 +15,44 @@ Upstream-Status: Pending
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Kai Kang <kai.kang@windriver.com>
--- ---
Index: kexec-tools-2.0.4/configure.ac ---
=================================================================== configure.ac | 3
--- kexec-tools-2.0.4.orig/configure.ac kexec/Makefile | 1
+++ kexec-tools-2.0.4/configure.ac kexec/arch/arm64/Makefile | 13 +
@@ -30,6 +30,9 @@ case $target_cpu in kexec/arch/arm64/crashdump-arm64.c | 305 ++++++++++++++++++++++++++++++++
powerpc64 ) kexec/arch/arm64/include/arch/options.h | 26 ++
kexec/arch/arm64/kexec-arm64.c | 177 ++++++++++++++++++
kexec/arch/arm64/kexec-arm64.h | 20 ++
kexec/arch/arm64/kexec-elf-arm64.c | 114 +++++++++++
kexec/kexec-syscall.h | 9
kexec/kexec.c | 2
purgatory/arch/arm64/Makefile | 7
11 files changed, 675 insertions(+), 2 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,9 @@ case $target_cpu in
ARCH="ppc64" ARCH="ppc64"
SUBARCH="LE"
;; ;;
+ aarch64 ) + aarch64* )
+ ARCH="arm64" + ARCH="arm64"
+ ;; + ;;
arm* ) arm* )
ARCH="arm" ARCH="arm"
;; ;;
Index: kexec-tools-2.0.4/kexec/Makefile --- a/kexec/Makefile
=================================================================== +++ b/kexec/Makefile
--- kexec-tools-2.0.4.orig/kexec/Makefile @@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
+++ kexec-tools-2.0.4/kexec/Makefile
@@ -70,6 +70,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
include $(srcdir)/kexec/arch/alpha/Makefile include $(srcdir)/kexec/arch/alpha/Makefile
include $(srcdir)/kexec/arch/arm/Makefile include $(srcdir)/kexec/arch/arm/Makefile
+include $(srcdir)/kexec/arch/arm64/Makefile +include $(srcdir)/kexec/arch/arm64/Makefile
include $(srcdir)/kexec/arch/i386/Makefile include $(srcdir)/kexec/arch/i386/Makefile
include $(srcdir)/kexec/arch/ia64/Makefile include $(srcdir)/kexec/arch/ia64/Makefile
include $(srcdir)/kexec/arch/mips/Makefile include $(srcdir)/kexec/arch/m68k/Makefile
Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile
===================================================================
--- /dev/null --- /dev/null
+++ kexec-tools-2.0.4/kexec/arch/arm64/Makefile +++ b/kexec/arch/arm64/Makefile
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
+ +
+arm64_KEXEC_SRCS += \ +arm64_KEXEC_SRCS += \
@@ -59,10 +67,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile
+dist += $(arm64_KEXEC_SRCS) \ +dist += $(arm64_KEXEC_SRCS) \
+ kexec/arch/arm64/Makefile \ + kexec/arch/arm64/Makefile \
+ kexec/arch/arm64/kexec-arm64.h + kexec/arch/arm64/kexec-arm64.h
Index: kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c
===================================================================
--- /dev/null --- /dev/null
+++ kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c +++ b/kexec/arch/arm64/crashdump-arm64.c
@@ -0,0 +1,305 @@ @@ -0,0 +1,305 @@
+/* +/*
+ * This program is free software; you can redistribute it and/or modify + * This program is free software; you can redistribute it and/or modify
@@ -369,10 +375,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c
+ +
+#endif +#endif
+ +
Index: kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h
===================================================================
--- /dev/null --- /dev/null
+++ kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h +++ b/kexec/arch/arm64/include/arch/options.h
@@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
+#ifndef KEXEC_ARCH_ARM64_OPTIONS_H +#ifndef KEXEC_ARCH_ARM64_OPTIONS_H
+#define KEXEC_ARCH_ARM64_OPTIONS_H +#define KEXEC_ARCH_ARM64_OPTIONS_H
@@ -400,10 +404,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h
+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR +#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR
+ +
+#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */ +#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */
Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c
===================================================================
--- /dev/null --- /dev/null
+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c +++ b/kexec/arch/arm64/kexec-arm64.c
@@ -0,0 +1,177 @@ @@ -0,0 +1,177 @@
+/* +/*
+ * ARM64 kexec support. + * ARM64 kexec support.
@@ -582,10 +584,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c
+ (void)value; + (void)value;
+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); + fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
+} +}
Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h
===================================================================
--- /dev/null --- /dev/null
+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h +++ b/kexec/arch/arm64/kexec-arm64.h
@@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
+/* +/*
+ * ARM64 kexec support. + * ARM64 kexec support.
@@ -608,10 +608,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h
+ +
+#endif +#endif
\ No newline at end of file \ No newline at end of file
Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c
===================================================================
--- /dev/null --- /dev/null
+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c +++ b/kexec/arch/arm64/kexec-elf-arm64.c
@@ -0,0 +1,114 @@ @@ -0,0 +1,114 @@
+/* +/*
+ * ARM64 kexec support. + * ARM64 kexec support.
@@ -727,10 +725,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c
+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); + fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); + fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
+} +}
Index: kexec-tools-2.0.4/kexec/kexec-syscall.h --- a/kexec/kexec-syscall.h
=================================================================== +++ b/kexec/kexec-syscall.h
--- kexec-tools-2.0.4.orig/kexec/kexec-syscall.h
+++ kexec-tools-2.0.4/kexec/kexec-syscall.h
@@ -39,8 +39,8 @@ @@ -39,8 +39,8 @@
#ifdef __s390__ #ifdef __s390__
#define __NR_kexec_load 277 #define __NR_kexec_load 277
@@ -742,7 +738,7 @@ Index: kexec-tools-2.0.4/kexec/kexec-syscall.h
#endif #endif
#if defined(__mips__) #if defined(__mips__)
#define __NR_kexec_load 4311 #define __NR_kexec_load 4311
@@ -72,6 +72,8 @@ static inline long kexec_load(void *entr @@ -108,6 +108,8 @@ static inline long kexec_file_load(int k
#define KEXEC_ARCH_PPC64 (21 << 16) #define KEXEC_ARCH_PPC64 (21 << 16)
#define KEXEC_ARCH_IA_64 (50 << 16) #define KEXEC_ARCH_IA_64 (50 << 16)
#define KEXEC_ARCH_ARM (40 << 16) #define KEXEC_ARCH_ARM (40 << 16)
@@ -751,21 +747,19 @@ Index: kexec-tools-2.0.4/kexec/kexec-syscall.h
#define KEXEC_ARCH_S390 (22 << 16) #define KEXEC_ARCH_S390 (22 << 16)
#define KEXEC_ARCH_SH (42 << 16) #define KEXEC_ARCH_SH (42 << 16)
#define KEXEC_ARCH_MIPS_LE (10 << 16) #define KEXEC_ARCH_MIPS_LE (10 << 16)
@@ -114,5 +116,8 @@ static inline long kexec_load(void *entr @@ -153,5 +155,8 @@ static inline long kexec_file_load(int k
#if defined(__mips__) #ifdef __m68k__
#define KEXEC_ARCH_NATIVE KEXEC_ARCH_MIPS #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K
#endif #endif
+#if defined(__arm64__) +#if defined(__arm64__)
+#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64 +#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64
+#endif +#endif
#endif /* KEXEC_SYSCALL_H */ #endif /* KEXEC_SYSCALL_H */
Index: kexec-tools-2.0.4/kexec/kexec.c --- a/kexec/kexec.c
=================================================================== +++ b/kexec/kexec.c
--- kexec-tools-2.0.4.orig/kexec/kexec.c @@ -664,6 +664,8 @@ static int my_load(const char *type, int
+++ kexec-tools-2.0.4/kexec/kexec.c memset(&info, 0, sizeof(info));
@@ -659,6 +659,8 @@ static int my_load(const char *type, int
info.backup_start = 0;
info.kexec_flags = kexec_flags; info.kexec_flags = kexec_flags;
+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); + fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
@@ -773,10 +767,8 @@ Index: kexec-tools-2.0.4/kexec/kexec.c
result = 0; result = 0;
if (argc - fileind <= 0) { if (argc - fileind <= 0) {
fprintf(stderr, "No kernel specified\n"); fprintf(stderr, "No kernel specified\n");
Index: kexec-tools-2.0.4/purgatory/arch/arm64/Makefile
===================================================================
--- /dev/null --- /dev/null
+++ kexec-tools-2.0.4/purgatory/arch/arm64/Makefile +++ b/purgatory/arch/arm64/Makefile
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+# +#
+# Purgatory arm64 +# Purgatory arm64
@@ -785,17 +777,3 @@ Index: kexec-tools-2.0.4/purgatory/arch/arm64/Makefile
+arm64_PURGATORY_SRCS = +arm64_PURGATORY_SRCS =
+ +
+dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS) +dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
Index: kexec-tools-2.0.4/configure
===================================================================
--- kexec-tools-2.0.4.orig/configure
+++ kexec-tools-2.0.4/configure
@@ -2256,6 +2256,9 @@ case $target_cpu in
powerpc64 )
ARCH="ppc64"
;;
+ aarch64 )
+ ARCH="arm64"
+ ;;
arm* )
ARCH="arm"
;;