diff options
authorVivek Goyal <>2014-08-08 14:25:41 -0700
committerLinus Torvalds <>2014-08-08 15:57:32 -0700
commitde5b56ba51f63973ceb5c184ee0855f0c8a13fc9 (patch)
parent8370edea81e321b8a976969753d6b2811e6d5ed6 (diff)
kernel: build bin2c based on config option CONFIG_BUILD_BIN2C
currently bin2c builds only if CONFIG_IKCONFIG=y. But bin2c will now be used by kexec too. So make it compilation dependent on CONFIG_BUILD_BIN2C and this config option can be selected by CONFIG_KEXEC and CONFIG_IKCONFIG. Signed-off-by: Vivek Goyal <> Cc: Borislav Petkov <> Cc: Michael Kerrisk <> Cc: Yinghai Lu <> Cc: Eric Biederman <> Cc: H. Peter Anvin <> Cc: Matthew Garrett <> Cc: Greg Kroah-Hartman <> Cc: Dave Young <> Cc: WANG Chao <> Cc: Baoquan He <> Cc: Andy Lutomirski <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
3 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c915cc6e40be..98fe3df6df82 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1582,6 +1582,7 @@ source kernel/Kconfig.hz
config KEXEC
bool "kexec system call"
+ select BUILD_BIN2C
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
diff --git a/init/Kconfig b/init/Kconfig
index a291b7ef4738..44f9ed3dae22 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -783,8 +783,13 @@ endchoice
endmenu # "RCU Subsystem"
+config BUILD_BIN2C
+ bool
+ default n
tristate "Kernel .config support"
+ select BUILD_BIN2C
This option enables the complete Linux kernel ".config" file
contents to be saved in the kernel. It provides documentation
diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile
index afbc1cd69ac5..ec10d9345bc2 100644
--- a/scripts/basic/Makefile
+++ b/scripts/basic/Makefile
@@ -9,7 +9,7 @@
# fixdep: Used to generate dependency information during build process
hostprogs-y := fixdep
-hostprogs-$(CONFIG_IKCONFIG) += bin2c
+hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
always := $(hostprogs-y)
# fixdep is needed to compile other host programs