Message ID | 1374030601-13568-1-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
Hi Tom, On Tue, Jul 16, 2013 at 9:09 PM, Simon Glass <sjg@chromium.org> wrote: > Before the bootm refactor, fixup_silent_linux() was done only in the > monolithic bootm case, not in the subcommand case. With the refactor, it > is done always, which is good. Unfortunately it is done too late, since it > is the PREP or CMDLINE stages that set up the command line for Linux. > > Move fixup_silent_linux() into the LOADOS stage, which is where we find > out the OS being used, and can thus decide whether to perform this step. > > Signed-off-by: Simon Glass <sjg@chromium.org> > I think this one should be considered for the release (the others in the series are for later). I found the problem while testing this feature. Regards, Simon
On Tue, Jul 16, 2013 at 08:09:59PM -0700, Simon Glass wrote: > Before the bootm refactor, fixup_silent_linux() was done only in the > monolithic bootm case, not in the subcommand case. With the refactor, it > is done always, which is good. Unfortunately it is done too late, since it > is the PREP or CMDLINE stages that set up the command line for Linux. > > Move fixup_silent_linux() into the LOADOS stage, which is where we find > out the OS being used, and can thus decide whether to perform this step. > > Signed-off-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks!
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index c18157c..c0eabd2 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -542,10 +542,6 @@ static int boot_selected_os(int argc, char * const argv[], int state, bootm_start_standalone(argc, argv); return 0; } -#ifdef CONFIG_SILENT_CONSOLE - if (images->os.os == IH_OS_LINUX) - fixup_silent_linux(); -#endif arch_preboot_os(); boot_fn(state, argc, argv, images); if (state == BOOTM_STATE_OS_FAKE_GO) /* We expect to return */ @@ -656,6 +652,10 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, goto err; else if (ret == BOOTM_ERR_OVERLAP) ret = 0; +#ifdef CONFIG_SILENT_CONSOLE + if (images->os.os == IH_OS_LINUX) + fixup_silent_linux(); +#endif } /* Relocate the ramdisk */
Before the bootm refactor, fixup_silent_linux() was done only in the monolithic bootm case, not in the subcommand case. With the refactor, it is done always, which is good. Unfortunately it is done too late, since it is the PREP or CMDLINE stages that set up the command line for Linux. Move fixup_silent_linux() into the LOADOS stage, which is where we find out the OS being used, and can thus decide whether to perform this step. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/cmd_bootm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)