summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kexec
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2015-02-20 20:46:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-21 22:05:35 +0000
commit4b69d0013dc40b1c8573ff4b03c99abf57538eaa (patch)
tree899945af066a536249c895786d89b8a210057eee /meta/recipes-kernel/kexec
parentb4a936a938cb914fc62add7a3e535915946aee81 (diff)
downloadpoky-4b69d0013dc40b1c8573ff4b03c99abf57538eaa.tar.gz
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>
Diffstat (limited to 'meta/recipes-kernel/kexec')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch102
1 files changed, 40 insertions, 62 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
index b697a54b90..92b5631f78 100644
--- a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
+++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
@@ -15,36 +15,44 @@ Upstream-Status: Pending
15Signed-off-by: Kai Kang <kai.kang@windriver.com> 15Signed-off-by: Kai Kang <kai.kang@windriver.com>
16--- 16---
17 17
18Index: kexec-tools-2.0.4/configure.ac 18---
19=================================================================== 19 configure.ac | 3
20--- kexec-tools-2.0.4.orig/configure.ac 20 kexec/Makefile | 1
21+++ kexec-tools-2.0.4/configure.ac 21 kexec/arch/arm64/Makefile | 13 +
22@@ -30,6 +30,9 @@ case $target_cpu in 22 kexec/arch/arm64/crashdump-arm64.c | 305 ++++++++++++++++++++++++++++++++
23 powerpc64 ) 23 kexec/arch/arm64/include/arch/options.h | 26 ++
24 kexec/arch/arm64/kexec-arm64.c | 177 ++++++++++++++++++
25 kexec/arch/arm64/kexec-arm64.h | 20 ++
26 kexec/arch/arm64/kexec-elf-arm64.c | 114 +++++++++++
27 kexec/kexec-syscall.h | 9
28 kexec/kexec.c | 2
29 purgatory/arch/arm64/Makefile | 7
30 11 files changed, 675 insertions(+), 2 deletions(-)
31
32--- a/configure.ac
33+++ b/configure.ac
34@@ -35,6 +35,9 @@ case $target_cpu in
24 ARCH="ppc64" 35 ARCH="ppc64"
36 SUBARCH="LE"
25 ;; 37 ;;
26+ aarch64 ) 38+ aarch64* )
27+ ARCH="arm64" 39+ ARCH="arm64"
28+ ;; 40+ ;;
29 arm* ) 41 arm* )
30 ARCH="arm" 42 ARCH="arm"
31 ;; 43 ;;
32Index: kexec-tools-2.0.4/kexec/Makefile 44--- a/kexec/Makefile
33=================================================================== 45+++ b/kexec/Makefile
34--- kexec-tools-2.0.4.orig/kexec/Makefile 46@@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
35+++ kexec-tools-2.0.4/kexec/Makefile
36@@ -70,6 +70,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
37 47
38 include $(srcdir)/kexec/arch/alpha/Makefile 48 include $(srcdir)/kexec/arch/alpha/Makefile
39 include $(srcdir)/kexec/arch/arm/Makefile 49 include $(srcdir)/kexec/arch/arm/Makefile
40+include $(srcdir)/kexec/arch/arm64/Makefile 50+include $(srcdir)/kexec/arch/arm64/Makefile
41 include $(srcdir)/kexec/arch/i386/Makefile 51 include $(srcdir)/kexec/arch/i386/Makefile
42 include $(srcdir)/kexec/arch/ia64/Makefile 52 include $(srcdir)/kexec/arch/ia64/Makefile
43 include $(srcdir)/kexec/arch/mips/Makefile 53 include $(srcdir)/kexec/arch/m68k/Makefile
44Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile
45===================================================================
46--- /dev/null 54--- /dev/null
47+++ kexec-tools-2.0.4/kexec/arch/arm64/Makefile 55+++ b/kexec/arch/arm64/Makefile
48@@ -0,0 +1,13 @@ 56@@ -0,0 +1,13 @@
49+ 57+
50+arm64_KEXEC_SRCS += \ 58+arm64_KEXEC_SRCS += \
@@ -59,10 +67,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile
59+dist += $(arm64_KEXEC_SRCS) \ 67+dist += $(arm64_KEXEC_SRCS) \
60+ kexec/arch/arm64/Makefile \ 68+ kexec/arch/arm64/Makefile \
61+ kexec/arch/arm64/kexec-arm64.h 69+ kexec/arch/arm64/kexec-arm64.h
62Index: kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c
63===================================================================
64--- /dev/null 70--- /dev/null
65+++ kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c 71+++ b/kexec/arch/arm64/crashdump-arm64.c
66@@ -0,0 +1,305 @@ 72@@ -0,0 +1,305 @@
67+/* 73+/*
68+ * This program is free software; you can redistribute it and/or modify 74+ * 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
369+ 375+
370+#endif 376+#endif
371+ 377+
372Index: kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h
373===================================================================
374--- /dev/null 378--- /dev/null
375+++ kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h 379+++ b/kexec/arch/arm64/include/arch/options.h
376@@ -0,0 +1,26 @@ 380@@ -0,0 +1,26 @@
377+#ifndef KEXEC_ARCH_ARM64_OPTIONS_H 381+#ifndef KEXEC_ARCH_ARM64_OPTIONS_H
378+#define KEXEC_ARCH_ARM64_OPTIONS_H 382+#define KEXEC_ARCH_ARM64_OPTIONS_H
@@ -400,10 +404,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h
400+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR 404+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR
401+ 405+
402+#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */ 406+#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */
403Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c
404===================================================================
405--- /dev/null 407--- /dev/null
406+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c 408+++ b/kexec/arch/arm64/kexec-arm64.c
407@@ -0,0 +1,177 @@ 409@@ -0,0 +1,177 @@
408+/* 410+/*
409+ * ARM64 kexec support. 411+ * ARM64 kexec support.
@@ -582,10 +584,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c
582+ (void)value; 584+ (void)value;
583+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); 585+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
584+} 586+}
585Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h
586===================================================================
587--- /dev/null 587--- /dev/null
588+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h 588+++ b/kexec/arch/arm64/kexec-arm64.h
589@@ -0,0 +1,20 @@ 589@@ -0,0 +1,20 @@
590+/* 590+/*
591+ * ARM64 kexec support. 591+ * ARM64 kexec support.
@@ -608,10 +608,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h
608+ 608+
609+#endif 609+#endif
610\ No newline at end of file 610\ No newline at end of file
611Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c
612===================================================================
613--- /dev/null 611--- /dev/null
614+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c 612+++ b/kexec/arch/arm64/kexec-elf-arm64.c
615@@ -0,0 +1,114 @@ 613@@ -0,0 +1,114 @@
616+/* 614+/*
617+ * ARM64 kexec support. 615+ * ARM64 kexec support.
@@ -727,10 +725,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c
727+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); 725+ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
728+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); 726+ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
729+} 727+}
730Index: kexec-tools-2.0.4/kexec/kexec-syscall.h 728--- a/kexec/kexec-syscall.h
731=================================================================== 729+++ b/kexec/kexec-syscall.h
732--- kexec-tools-2.0.4.orig/kexec/kexec-syscall.h
733+++ kexec-tools-2.0.4/kexec/kexec-syscall.h
734@@ -39,8 +39,8 @@ 730@@ -39,8 +39,8 @@
735 #ifdef __s390__ 731 #ifdef __s390__
736 #define __NR_kexec_load 277 732 #define __NR_kexec_load 277
@@ -742,7 +738,7 @@ Index: kexec-tools-2.0.4/kexec/kexec-syscall.h
742 #endif 738 #endif
743 #if defined(__mips__) 739 #if defined(__mips__)
744 #define __NR_kexec_load 4311 740 #define __NR_kexec_load 4311
745@@ -72,6 +72,8 @@ static inline long kexec_load(void *entr 741@@ -108,6 +108,8 @@ static inline long kexec_file_load(int k
746 #define KEXEC_ARCH_PPC64 (21 << 16) 742 #define KEXEC_ARCH_PPC64 (21 << 16)
747 #define KEXEC_ARCH_IA_64 (50 << 16) 743 #define KEXEC_ARCH_IA_64 (50 << 16)
748 #define KEXEC_ARCH_ARM (40 << 16) 744 #define KEXEC_ARCH_ARM (40 << 16)
@@ -751,21 +747,19 @@ Index: kexec-tools-2.0.4/kexec/kexec-syscall.h
751 #define KEXEC_ARCH_S390 (22 << 16) 747 #define KEXEC_ARCH_S390 (22 << 16)
752 #define KEXEC_ARCH_SH (42 << 16) 748 #define KEXEC_ARCH_SH (42 << 16)
753 #define KEXEC_ARCH_MIPS_LE (10 << 16) 749 #define KEXEC_ARCH_MIPS_LE (10 << 16)
754@@ -114,5 +116,8 @@ static inline long kexec_load(void *entr 750@@ -153,5 +155,8 @@ static inline long kexec_file_load(int k
755 #if defined(__mips__) 751 #ifdef __m68k__
756 #define KEXEC_ARCH_NATIVE KEXEC_ARCH_MIPS 752 #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K
757 #endif 753 #endif
758+#if defined(__arm64__) 754+#if defined(__arm64__)
759+#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64 755+#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64
760+#endif 756+#endif
761 757
762 #endif /* KEXEC_SYSCALL_H */ 758 #endif /* KEXEC_SYSCALL_H */
763Index: kexec-tools-2.0.4/kexec/kexec.c 759--- a/kexec/kexec.c
764=================================================================== 760+++ b/kexec/kexec.c
765--- kexec-tools-2.0.4.orig/kexec/kexec.c 761@@ -664,6 +664,8 @@ static int my_load(const char *type, int
766+++ kexec-tools-2.0.4/kexec/kexec.c 762 memset(&info, 0, sizeof(info));
767@@ -659,6 +659,8 @@ static int my_load(const char *type, int
768 info.backup_start = 0;
769 info.kexec_flags = kexec_flags; 763 info.kexec_flags = kexec_flags;
770 764
771+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); 765+ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
@@ -773,10 +767,8 @@ Index: kexec-tools-2.0.4/kexec/kexec.c
773 result = 0; 767 result = 0;
774 if (argc - fileind <= 0) { 768 if (argc - fileind <= 0) {
775 fprintf(stderr, "No kernel specified\n"); 769 fprintf(stderr, "No kernel specified\n");
776Index: kexec-tools-2.0.4/purgatory/arch/arm64/Makefile
777===================================================================
778--- /dev/null 770--- /dev/null
779+++ kexec-tools-2.0.4/purgatory/arch/arm64/Makefile 771+++ b/purgatory/arch/arm64/Makefile
780@@ -0,0 +1,7 @@ 772@@ -0,0 +1,7 @@
781+# 773+#
782+# Purgatory arm64 774+# Purgatory arm64
@@ -785,17 +777,3 @@ Index: kexec-tools-2.0.4/purgatory/arch/arm64/Makefile
785+arm64_PURGATORY_SRCS = 777+arm64_PURGATORY_SRCS =
786+ 778+
787+dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS) 779+dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
788Index: kexec-tools-2.0.4/configure
789===================================================================
790--- kexec-tools-2.0.4.orig/configure
791+++ kexec-tools-2.0.4/configure
792@@ -2256,6 +2256,9 @@ case $target_cpu in
793 powerpc64 )
794 ARCH="ppc64"
795 ;;
796+ aarch64 )
797+ ARCH="arm64"
798+ ;;
799 arm* )
800 ARCH="arm"
801 ;;