Signed-off-by: Doug Anderson <diand...@chromium.org>
---
 common/cmd_bootm.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index f426e2f..c259bfb 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -1203,7 +1203,7 @@ U_BOOT_CMD(
 #ifdef CONFIG_SILENT_CONSOLE
 
 /**
- * Remove "console=blah" and from cmdline, replace w/ "console=".
+ * Remove "console=blah" and "earlyprintk" from cmdline, replace w/ "console=".
  *
  * This has the effect of telling Linux that we'd like it to have a silent
  * console.
@@ -1241,6 +1241,7 @@ static char *do_fixup_silent_linux(const char *cmdline)
        strcpy(buf, cmdline);
        do {
                did_remove  = remove_cmdline_param(buf, "console");
+               did_remove |= remove_cmdline_param(buf, "earlyprintk");
        } while (did_remove);
        add_cmdline_param(buf, "console=", bufsize);
 
@@ -1313,6 +1314,13 @@ void do_fixup_silent_linux_unittest(void)
        assert(strcmp(result, expected_str) == 0);
        free(result);
 
+       /* Add in earlyprintk */
+       original_str = "console=ttyS0,115200n8 root=/dev/mmcblk0p3 earlyprintk";
+       expected_str = "root=/dev/mmcblk0p3 console=";
+       result = do_fixup_silent_linux(original_str);
+       assert(strcmp(result, expected_str) == 0);
+       free(result);
+
        debug("do_fixup_silent_linux_unittest: pass\n");
 }
 #endif /* RUN_UNITTESTS */
-- 
1.7.3.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to