]> git.pld-linux.org Git - packages/kexec-tools.git/blame - kexec-tools-fix-broken-multiboot2-buliding-for-i386.patch
- updated to 2.0.20
[packages/kexec-tools.git] / kexec-tools-fix-broken-multiboot2-buliding-for-i386.patch
CommitLineData
5d012401
JB
1From 940c3a1e1a304fbecc850c593a272215b0f52eab Mon Sep 17 00:00:00 2001
2From: Kairui Song <kasong@redhat.com>
3Date: Wed, 31 Jul 2019 16:30:47 +0800
4Subject: [PATCH] x86: Fix broken multiboot2 buliding for i386
5
6When building for i386, an error occured:
7
8kexec/arch/i386/kexec-x86.c:39:22: error: 'multiboot2_x86_probe'
9undeclared here (not in a function); did you mean 'multiboot_x86_probe'?
1039 | { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load,
11 | ^~~~~~~~~~~~~~~~~~~~
12 | multiboot_x86_probe
13
14kexec/arch/i386/kexec-x86.c:39:44: error: 'multiboot2_x86_load'
15undeclared here (not in a function); did you mean 'multiboot_x86_load'?
1639 | { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load,
17 | ^~~~~~~~~~~~~~~~~~~
18 | multiboot_x86_load
19kexec/arch/i386/kexec-x86.c:40:4: error: 'multiboot2_x86_usage'
20 undeclared here (not in a function); did you mean 'multiboot_x86_usage'?
2140 | multiboot2_x86_usage },
22 | ^~~~~~~~~~~~~~~~~~~~
23 | multiboot_x86_usage
24
25Fix this issue by putting the definition in the right header, also tidy
26up Makefile.
27
28Fixes: 22a2ed55132e ("x86: Support multiboot2 images")
29Signed-off-by: Kairui Song <kasong@redhat.com>
30---
31 kexec/arch/i386/Makefile | 2 +-
32 kexec/arch/i386/kexec-x86.h | 5 +++++
33 kexec/arch/x86_64/kexec-x86_64.h | 5 -----
34 3 files changed, 6 insertions(+), 6 deletions(-)
35
36diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile
37index 105cefd..f486103 100644
38--- a/kexec/arch/i386/Makefile
39+++ b/kexec/arch/i386/Makefile
40@@ -7,6 +7,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-elf-x86.c
41 i386_KEXEC_SRCS += kexec/arch/i386/kexec-elf-rel-x86.c
42 i386_KEXEC_SRCS += kexec/arch/i386/kexec-bzImage.c
43 i386_KEXEC_SRCS += kexec/arch/i386/kexec-multiboot-x86.c
44+i386_KEXEC_SRCS += kexec/arch/i386/kexec-mb2-x86.c
45 i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c
46 i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c
47 i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c
48@@ -14,7 +15,6 @@ i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c
49
50 dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \
51 kexec/arch/i386/crashdump-x86.h \
52- kexec/arch/i386/kexec-mb2-x86.c \
53 kexec/arch/i386/kexec-x86.h \
54 kexec/arch/i386/x86-linux-setup.h \
55 kexec/arch/i386/include/arch/options.h
56diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h
57index 1b58c3b..16d0f6c 100644
58--- a/kexec/arch/i386/kexec-x86.h
59+++ b/kexec/arch/i386/kexec-x86.h
60@@ -60,6 +60,11 @@ int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len,
61 struct kexec_info *info);
62 void multiboot_x86_usage(void);
63
64+int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
65+ struct kexec_info *info);
66+void multiboot2_x86_usage(void);
67+int multiboot2_x86_probe(const char *buf, off_t buf_len);
68+
69 int elf_x86_probe(const char *buf, off_t len);
70 int elf_x86_load(int argc, char **argv, const char *buf, off_t len,
71 struct kexec_info *info);
72diff --git a/kexec/arch/x86_64/kexec-x86_64.h b/kexec/arch/x86_64/kexec-x86_64.h
73index 21c3a73..4cdeffb 100644
74--- a/kexec/arch/x86_64/kexec-x86_64.h
75+++ b/kexec/arch/x86_64/kexec-x86_64.h
76@@ -33,9 +33,4 @@ int bzImage64_load(int argc, char **argv, const char *buf, off_t len,
77 struct kexec_info *info);
78 void bzImage64_usage(void);
79
80-int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
81- struct kexec_info *info);
82-void multiboot2_x86_usage(void);
83-int multiboot2_x86_probe(const char *buf, off_t buf_len);
84-
85 #endif /* KEXEC_X86_64_H */
86--
872.21.0
88
This page took 0.057435 seconds and 4 git commands to generate.