diff options
Diffstat (limited to 'meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch')
-rw-r--r-- | meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch b/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch new file mode 100644 index 0000000000..8b1c0183e0 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 5a4958f01a793c3e7f440f5bae75666a4349cc50 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pratyush Anand <panand@redhat.com> | ||
3 | Date: Thu, 14 May 2015 11:25:37 +0530 | ||
4 | Subject: [PATCH 9/9] arm64: kdump: Add support for binary image files | ||
5 | |||
6 | This patch adds support to use binary image ie arch/arm64/boot/Image with | ||
7 | kdump. | ||
8 | |||
9 | Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] | ||
10 | |||
11 | Signed-off-by: Pratyush Anand <panand@redhat.com> | ||
12 | [takahiro.akashi@linaro.org: a bit reworked] | ||
13 | Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> | ||
14 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
15 | --- | ||
16 | kexec/arch/arm64/kexec-image-arm64.c | 12 ++++++++++++ | ||
17 | 1 file changed, 12 insertions(+) | ||
18 | |||
19 | diff --git a/kexec/arch/arm64/kexec-image-arm64.c b/kexec/arch/arm64/kexec-image-arm64.c | ||
20 | index 960ed96..982e431 100644 | ||
21 | --- a/kexec/arch/arm64/kexec-image-arm64.c | ||
22 | +++ b/kexec/arch/arm64/kexec-image-arm64.c | ||
23 | @@ -4,7 +4,9 @@ | ||
24 | |||
25 | #define _GNU_SOURCE | ||
26 | |||
27 | +#include "crashdump-arm64.h" | ||
28 | #include "kexec-arm64.h" | ||
29 | +#include "kexec-syscall.h" | ||
30 | #include <limits.h> | ||
31 | |||
32 | int image_arm64_probe(const char *kernel_buf, off_t kernel_size) | ||
33 | @@ -58,6 +60,16 @@ int image_arm64_load(int argc, char **argv, const char *kernel_buf, | ||
34 | dbgprintf("%s: PE format: %s\n", __func__, | ||
35 | (arm64_header_check_pe_sig(header) ? "yes" : "no")); | ||
36 | |||
37 | + if (info->kexec_flags & KEXEC_ON_CRASH) { | ||
38 | + /* create and initialize elf core header segment */ | ||
39 | + result = load_crashdump_segments(info); | ||
40 | + if (result) { | ||
41 | + dbgprintf("%s: Creating eflcorehdr failed.\n", | ||
42 | + __func__); | ||
43 | + goto exit; | ||
44 | + } | ||
45 | + } | ||
46 | + | ||
47 | /* load the kernel */ | ||
48 | add_segment_phys_virt(info, kernel_buf, kernel_size, | ||
49 | kernel_segment + arm64_mem.text_offset, | ||
50 | -- | ||
51 | 1.9.1 | ||
52 | |||