Skip to contentSkip to conversation

failed to compile kexec from git

DISCUSSION CAI Qian 4 participants 7 messages Mar 13, 2013

Subsystems (2)
lore
Share & tools
lore

CAI Qian

author
#0 lore raw

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

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

author
#1 lore raw

If I revert this commit, 6df15d1cca55b2cd59c79aed69f004e1b2a6ba36 kexec x86: drop truncation warning for crash kernel

Everything is fine again.

CAI Qian

----- Original Message -----

Quoted 21 lines

From: "CAI Qian" <[email protected]>
To: "kexec" <[email protected]>
Sent: Wednesday, March 13, 2013 10:52:52 AM
Subject: failed to compile kexec from git

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

Quoted 7 lines

CAI Qian

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw
In reply to CAI Qian
Quoted 6 lines · 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

Quoted 9 lines

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 <[email protected]>
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.

---
 kexec/arch/i386/x86-linux-setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kexec/arch/i386/x86-linux-setup.c +1 -1
index b903d43..454fad6 100644
@@ -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()
Signature · 7 lines
1.7.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#6 lore raw
Quoted 52 lines · Zhang Yanfei
Quoted 6 lines · 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

Quoted 9 lines

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 <[email protected]>
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.

---
 kexec/arch/i386/x86-linux-setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kexec/arch/i386/x86-linux-setup.c +0 -0
index b903d43..454fad6 100644

kexec/arch/i386/x86-linux-setup.c void setup_linux_system_parameters(struct kexec_info *info, · line 514

Quoted 8 lines
kexec/arch/i386/x86-linux-setup.c +1 -1
@@ -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()

It works for me.

Thanks,
WANG Chao

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
In reply to CAI Qian
Quoted 5 lines · CAI Qian

If I revert this commit, 6df15d1cca55b2cd59c79aed69f004e1b2a6ba36 kexec x86: drop truncation warning for crash kernel

Everything is fine again.

Thanks. I have applied the following patch which I believe resolves the problem. Cliff, could you test this?

commit 51438a32f6a0f09a358742f06196d14e4ad0ccab

Author: Simon Horman <[email protected]>
Date:   Wed Mar 13 10:48:48 2013 +0100

Correct build failure in init_linux_parameters()

This fixes a build failure introduced by "kexec x86: drop truncation warning for crash kernel".

kexec/arch/i386/x86-linux-setup.c +1 -1
index b903d43..454fad6 100644
@@ -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()

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
Quoted 9 lines · Simon Horman
Quoted 5 lines · CAI Qian

If I revert this commit, 6df15d1cca55b2cd59c79aed69f004e1b2a6ba36 kexec x86: drop truncation warning for crash kernel

Everything is fine again.

Thanks. I have applied the following patch which I believe resolves the problem. Cliff, could you test this?

oops...I've sent the same patch before and WANG chao <[email protected]> tested it and it is ok now.

Thanks
Zhang

Quoted 29 lines

commit 51438a32f6a0f09a358742f06196d14e4ad0ccab

Author: Simon Horman <[email protected]>
Date:   Wed Mar 13 10:48:48 2013 +0100

Correct build failure in init_linux_parameters()

This fixes a build failure introduced by "kexec x86: drop truncation warning for crash kernel".

kexec/arch/i386/x86-linux-setup.c +1 -1
index b903d43..454fad6 100644
@@ -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()
Quoted 5 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
Quoted 6 lines · Zhang Yanfei
Quoted 5 lines · Simon Horman
Quoted 4 lines · CAI Qian

If I revert this commit, 6df15d1cca55b2cd59c79aed69f004e1b2a6ba36 kexec x86: drop truncation warning for crash kernel

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Everything is fine again.

Thanks. I have applied the following patch which I believe resolves the problem. Cliff, could you test this?

oops...I've sent the same patch before and WANG chao <[email protected]> tested it and it is ok now.

Sorry for missing that. Thanks for the confirmation.

Quoted 33 lines

Thanks
Zhang

Quoted 29 lines

commit 51438a32f6a0f09a358742f06196d14e4ad0ccab

Author: Simon Horman <[email protected]>
Date:   Wed Mar 13 10:48:48 2013 +0100

Correct build failure in init_linux_parameters()

This fixes a build failure introduced by "kexec x86: drop truncation warning for crash kernel".

kexec/arch/i386/x86-linux-setup.c +1 -1
index b903d43..454fad6 100644
@@ -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()
Quoted 7 lines
Quoted 5 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec