* [U-Boot] [PATCH] bootm: fixup silent Linux out of BOOTM_STATE_LOADOS state
@ 2016-07-11 10:34 Hector Palacios
2016-07-16 13:51 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Hector Palacios @ 2016-07-11 10:34 UTC (permalink / raw)
To: u-boot
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>
---
common/bootm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/common/bootm.c b/common/bootm.c
index 81a522eec348..521468c1ecd0 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -668,10 +668,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 */
@@ -711,13 +707,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 */
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] bootm: fixup silent Linux out of BOOTM_STATE_LOADOS state
2016-07-11 10:34 [U-Boot] [PATCH] bootm: fixup silent Linux out of BOOTM_STATE_LOADOS state Hector Palacios
@ 2016-07-16 13:51 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2016-07-16 13:51 UTC (permalink / raw)
To: u-boot
On Mon, Jul 11, 2016 at 12:34:37PM +0200, Hector Palacios wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160716/70bbf913/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-16 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-11 10:34 [U-Boot] [PATCH] bootm: fixup silent Linux out of BOOTM_STATE_LOADOS state Hector Palacios
2016-07-16 13:51 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox