Mathieu, > On 16 Mar 2018, at 9:43 PM, Mathieu Malaterre <malat@xxxxxxxxxx> wrote: > > Jaedon, > > On Fri, Mar 16, 2018 at 3:59 AM, Jaedon Shin <jaedon.shin@xxxxxxxxx> wrote: >> Due to commit 8ce355cf2e38 ("MIPS: Setup boot_command_line before >> plat_mem_setup"), the value of arcs_command by prom_init is removed. >> boot_command_line is initialized with __dt_setup_arch from >> plat_mem_setup, but arcs_command is copied to boot_command_line before >> plat_mem_setup by previous commit. This commit recover missing >> arcs_command by prom_init. > > If I cherry-pick your commit into my local branch I can no longer boot > my MIPS Creator CI20. The sad part is that nothing shows up in the log > (screen + tty) to indicate what the issue might be. Did it work before this patch was cherry-picked? But I find this patch has problem that didn't work CONFIG_CMDLINE with __dt_setup_arch. I have problem that bootloader argument (applied in prom_init) are removed. Other MIPS_CMDLINE_* options may have also. The previous patch 8ce355cf2e38 ("MIPS: Setup boot_command_line before plat_mem_setup") fixes only duplicating in NO bootargs and CONFIG_CMDLINE. It cause problems MIPS_CMDLINE_* options and CONFIG_CMDLINE_{BOOL,OVERRIDE}+__dt_setup_arch. So we'll have to revert it and change the CONFIG_CMDLINE_{BOOL,OVERRIDE} or append the CONFIG_CMDLINE_{BOOL,OVERRIDE} to fdt.c. Thanks, Jaedon > >> Fixes: 8ce355cf2e38 ("MIPS: Setup boot_command_line before plat_mem_setup") >> Signed-off-by: Jaedon Shin <jaedon.shin@xxxxxxxxx> >> --- >> arch/mips/kernel/setup.c | 36 +++++++++++++++++------------------- >> 1 file changed, 17 insertions(+), 19 deletions(-) >> >> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c >> index 5f8b0a9e30b3..e87f468f76dc 100644 >> --- a/arch/mips/kernel/setup.c >> +++ b/arch/mips/kernel/setup.c >> @@ -836,30 +836,12 @@ static void __init arch_mem_init(char **cmdline_p) >> >> #if defined(CONFIG_CMDLINE_BOOL) && defined(CONFIG_CMDLINE_OVERRIDE) >> strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); >> -#else >> - if ((USE_PROM_CMDLINE && arcs_cmdline[0]) || >> - (USE_DTB_CMDLINE && !boot_command_line[0])) >> - strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); >> - >> - if (EXTEND_WITH_PROM && arcs_cmdline[0]) { >> - if (boot_command_line[0]) >> - strlcat(boot_command_line, " ", COMMAND_LINE_SIZE); >> - strlcat(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); >> - } >> - >> -#if defined(CONFIG_CMDLINE_BOOL) >> +#elif defined(CONFIG_CMDLINE_BOOL) >> if (builtin_cmdline[0]) { >> if (boot_command_line[0]) >> strlcat(boot_command_line, " ", COMMAND_LINE_SIZE); >> strlcat(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); >> } >> - >> - if (BUILTIN_EXTEND_WITH_PROM && arcs_cmdline[0]) { >> - if (boot_command_line[0]) >> - strlcat(boot_command_line, " ", COMMAND_LINE_SIZE); >> - strlcat(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); >> - } >> -#endif >> #endif >> >> /* call board setup routine */ >> @@ -881,6 +863,22 @@ static void __init arch_mem_init(char **cmdline_p) >> pr_info("Determined physical RAM map:\n"); >> print_memory_map(); >> >> + if ((USE_PROM_CMDLINE && arcs_cmdline[0]) || >> + (USE_DTB_CMDLINE && !boot_command_line[0])) >> + strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); >> + >> + if (EXTEND_WITH_PROM && arcs_cmdline[0]) { >> + if (boot_command_line[0]) >> + strlcat(boot_command_line, " ", COMMAND_LINE_SIZE); >> + strlcat(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); >> + } >> + >> + if (BUILTIN_EXTEND_WITH_PROM && arcs_cmdline[0]) { >> + if (boot_command_line[0]) >> + strlcat(boot_command_line, " ", COMMAND_LINE_SIZE); >> + strlcat(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE); >> + } >> + >> strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); >> >> *cmdline_p = command_line; >> -- >> 2.16.2 >>