I have ever toke a long time to understand how Linux parameter "CONFIG_CMDLINE" be added into Kernel.
today I just got it:(arch/arm/kernel/setup.c)
static char default_command_line[COMMAND_
LINE_SIZE-1] __initdata= CONFIG_CMDLINE
You know, start_kernel(...) in init/main.c has a param named "command_line",
it's empty before start_kernel(...) call setup_arch(&command_line);
setup_arch(char ** cmdline_p) defined in arch/arm/kernel/setup.c
the function just copy "default_command_line" to "command_line"
You know, start_kernel(...) in init/main.c has a param named "command_line",
it's empty before start_kernel(...) call setup_arch(&command_line);
setup_arch(char ** cmdline_p) defined in arch/arm/kernel/setup.c
the function just copy "default_command_line" to "command_line"