Skip to content

Commit

Permalink
kernel: build bin2c based on config option CONFIG_BUILD_BIN2C
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: Yinghai Lu <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Dave Young <[email protected]>
Cc: WANG Chao <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rhvgoyal authored and torvalds committed Aug 8, 2014
1 parent 8370ede commit de5b56b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,7 @@ source kernel/Kconfig.hz

config KEXEC
bool "kexec system call"
select BUILD_BIN2C
---help---
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
Expand Down
5 changes: 5 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,13 @@ endchoice

endmenu # "RCU Subsystem"

config BUILD_BIN2C
bool
default n

config IKCONFIG
tristate "Kernel .config support"
select BUILD_BIN2C
---help---
This option enables the complete Linux kernel ".config" file
contents to be saved in the kernel. It provides documentation
Expand Down
2 changes: 1 addition & 1 deletion scripts/basic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de5b56b

Please sign in to comment.