]> git.sur5r.net Git - u-boot/commitdiff
bootm: Move fixup_silent_linux() earlier in the bootm stages
authorSimon Glass <sjg@chromium.org>
Wed, 17 Jul 2013 03:09:59 +0000 (20:09 -0700)
committerTom Rini <trini@ti.com>
Wed, 17 Jul 2013 14:37:11 +0000 (10:37 -0400)
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

index c18157cd4c20a4b74dbced08ecc89465cc7a8be6..c0eabd259e876b05fa00f17930e0323b542fe1ba 100644 (file)
@@ -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 */