Commit 1dff89a9 authored by Michal Simek's avatar Michal Simek

microblaze: Fix early cmdline for CMDLINE_FORCE

This patch fixed parsing early parameters because
current implementation does that early parse DTS
command line and then parse CMDLINE line which is compiled-in.

For case that DTS doesn't contain command line is
copied command line from kernel with is done in prom.c
that's why I can remove it from machine_early_init.
Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent 6e3d4e1d
...@@ -563,7 +563,9 @@ static int __init early_init_dt_scan_chosen(unsigned long node, ...@@ -563,7 +563,9 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
#ifdef CONFIG_CMDLINE #ifdef CONFIG_CMDLINE
#ifndef CONFIG_CMDLINE_FORCE
if (p == NULL || l == 0 || (l == 1 && (*p) == 0)) if (p == NULL || l == 0 || (l == 1 && (*p) == 0))
#endif
strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#endif /* CONFIG_CMDLINE */ #endif /* CONFIG_CMDLINE */
......
...@@ -42,10 +42,6 @@ char cmd_line[COMMAND_LINE_SIZE]; ...@@ -42,10 +42,6 @@ char cmd_line[COMMAND_LINE_SIZE];
void __init setup_arch(char **cmdline_p) void __init setup_arch(char **cmdline_p)
{ {
#ifdef CONFIG_CMDLINE_FORCE
strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#endif
*cmdline_p = cmd_line; *cmdline_p = cmd_line;
console_verbose(); console_verbose();
...@@ -106,10 +102,7 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, ...@@ -106,10 +102,7 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
memset(__bss_start, 0, __bss_stop-__bss_start); memset(__bss_start, 0, __bss_stop-__bss_start);
memset(_ssbss, 0, _esbss-_ssbss); memset(_ssbss, 0, _esbss-_ssbss);
/* /* Copy command line passed from bootloader */
* Copy command line passed from bootloader, or use default
* if none provided, or forced
*/
#ifndef CONFIG_CMDLINE_BOOL #ifndef CONFIG_CMDLINE_BOOL
if (cmdline && cmdline[0] != '\0') if (cmdline && cmdline[0] != '\0')
strlcpy(cmd_line, cmdline, COMMAND_LINE_SIZE); strlcpy(cmd_line, cmdline, COMMAND_LINE_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment