failed to compile kexec from git

Zhang Yanfei zhangyanfei at cn.fujitsu.com
Tue Mar 12 23:19:19 EDT 2013


于 2013年03月13日 10:52, CAI Qian 写道:
> Looks like this is broken recently. I cloned the tree
> at the top commit been,
> 
> e73d481c4add17ee953c80bb4be72372d90d93d3
> ppc/uImage: Add support for RAM Disks
> 
> Then, error out.
> 
> kexec/arch/i386/x86-linux-setup.c: In function ‘setup_linux_system_parameters’:
> kexec/arch/i386/x86-linux-setup.c:511:9: error: ‘kexec_flags’ undeclared (first use in this function)
> kexec/arch/i386/x86-linux-setup.c:511:9: note: each undeclared identifier is reported only once for each function it appears in
> make: *** [kexec/arch/i386/x86-linux-setup.o] Error 1
> 
> CAI Qian
> 

Hello CAI,

The below patch should fix the bug.

---
>From 3511ddae28f50ec13f73c0d124c587ae5fe78048 Mon Sep 17 00:00:00 2001
From: Zhang Yanfei <zhangyanfei at cn.fujitsu.com>
Date: Wed, 13 Mar 2013 11:10:36 +0800
Subject: [PATCH] kexec: i386: fix a bug due to parameter change

The kexec-tools fails to be compiled and here is the error message:

kexec/arch/i386/x86-linux-setup.c: In function ‘setup_linux_system_parameters’:
kexec/arch/i386/x86-linux-setup.c:511:9: error: ‘kexec_flags’ undeclared (first use in this function)
kexec/arch/i386/x86-linux-setup.c:511:9: note: each undeclared identifier is reported only once for each function it appears in
make: *** [kexec/arch/i386/x86-linux-setup.o] Error 1

This is due to the parameter change of function setup_linux_system_parameters,
and the bug was imported by commit 6df15d1cca55b2cd59c79aed69f004e1b2a6ba36
    kexec x86: drop truncation warning for crash kernel

The patch fix the bug.

Reported-by: "CAI Qian" <caiqian at redhat.com>
Signed-off-by: Zhang Yanfei <zhangyanfei at cn.fujitsu.com>
---
 kexec/arch/i386/x86-linux-setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
index b903d43..454fad6 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -508,7 +508,7 @@ void setup_linux_system_parameters(struct kexec_info *info,
 	range = info->memory_range;
 	ranges = info->memory_ranges;
 	if (ranges > E820MAX) {
-		if (!(kexec_flags & KEXEC_ON_CRASH))
+		if (!(info->kexec_flags & KEXEC_ON_CRASH))
 			/*
 			 * this e820 not used for capture kernel, see
 			 * do_bzImage_load()
-- 
1.7.1




More information about the kexec mailing list