Skip to content

Commit

Permalink
bootconfig: Set CONFIG_BOOT_CONFIG=n by default
Browse files Browse the repository at this point in the history
Set CONFIG_BOOT_CONFIG=n by default. This also warns
user if CONFIG_BOOT_CONFIG=n but "bootconfig" is given
in the kernel command line.

Link: http://lkml.kernel.org/r/158220111291.26565.9036889083940367969.stgit@devnote2

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Masami Hiramatsu authored and Steven Rostedt (VMware) committed Feb 20, 2020
1 parent 7ab215f commit d8a953d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,6 @@ endif
config BOOT_CONFIG
bool "Boot config support"
depends on BLK_DEV_INITRD
default y
help
Extra boot config allows system admin to pass a config file as
complemental extension of kernel cmdline when booting.
Expand Down
8 changes: 8 additions & 0 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,14 @@ static void __init setup_boot_config(const char *cmdline)
}
#else
#define setup_boot_config(cmdline) do { } while (0)

static int __init warn_bootconfig(char *str)
{
pr_warn("WARNING: 'bootconfig' found on the kernel command line but CONFIG_BOOTCONFIG is not set.\n");
return 0;
}
early_param("bootconfig", warn_bootconfig);

#endif

/* Change NUL term back to "=", to make "param" the whole string. */
Expand Down
3 changes: 2 additions & 1 deletion kernel/trace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ if FTRACE

config BOOTTIME_TRACING
bool "Boot-time Tracing support"
depends on BOOT_CONFIG && TRACING
depends on TRACING
select BOOT_CONFIG
default y
help
Enable developer to setup ftrace subsystem via supplemental
Expand Down

0 comments on commit d8a953d

Please sign in to comment.