summaryrefslogtreecommitdiff
path: root/common/bootm.c
diff options
context:
space:
mode:
authorHector Palacios <hector.palacios@digi.com>2016-07-11 12:34:37 +0200
committerTom Rini <trini@konsulko.com>2016-07-14 18:22:44 -0400
commit19e8649e59f5632792ecccbf04a2401eddb03e44 (patch)
tree27cfadcbcd9aa2e149e96ee1fbbaf8f7eb55bd6f /common/bootm.c
parent4b2fd720a7b2f78c42d1565edf4c67f378c65440 (diff)
bootm: fixup silent Linux out of BOOTM_STATE_LOADOS state
The function fixup_silent_linux() is called in status BOOTM_STATE_LOADOS to silence Linux if variable 'silent' is set. Currently only the 'bootm' command state machine contains BOOTM_STATE_LOADOS, but others like 'booti' or 'bootz' commands do not. This means silent Linux does not work with these commands. This patch moves the fixup_silent_linux() call out of the BOOTM_STATE_LOADOS state and into BOOTM_STATE_OS_PREP, to silence Linux independently of the used command (booti, bootm or bootz). Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Diffstat (limited to 'common/bootm.c')
-rw-r--r--common/bootm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 2431019b3f..9ed6428281 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -635,10 +635,6 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
goto err;
else if (ret == BOOTM_ERR_OVERLAP)
ret = 0;
-#if defined(CONFIG_SILENT_CONSOLE) && !defined(CONFIG_SILENT_U_BOOT_ONLY)
- if (images->os.os == IH_OS_LINUX)
- fixup_silent_linux();
-#endif
}
/* Relocate the ramdisk */
@@ -678,13 +674,19 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
return 1;
}
+
/* Call various other states that are not generally used */
if (!ret && (states & BOOTM_STATE_OS_CMDLINE))
ret = boot_fn(BOOTM_STATE_OS_CMDLINE, argc, argv, images);
if (!ret && (states & BOOTM_STATE_OS_BD_T))
ret = boot_fn(BOOTM_STATE_OS_BD_T, argc, argv, images);
- if (!ret && (states & BOOTM_STATE_OS_PREP))
+ if (!ret && (states & BOOTM_STATE_OS_PREP)) {
+#if defined(CONFIG_SILENT_CONSOLE) && !defined(CONFIG_SILENT_U_BOOT_ONLY)
+ if (images->os.os == IH_OS_LINUX)
+ fixup_silent_linux();
+#endif
ret = boot_fn(BOOTM_STATE_OS_PREP, argc, argv, images);
+ }
#ifdef CONFIG_TRACE
/* Pretend to run the OS, then run a user command */