From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Anderson Date: Wed, 19 Oct 2011 15:30:59 -0700 Subject: [U-Boot] [PATCH 4/4] bootm: Add earlyprintk to fixup_silent_linux In-Reply-To: <1319063459-4804-1-git-send-email-dianders@chromium.org> References: <1319063459-4804-1-git-send-email-dianders@chromium.org> Message-ID: <1319063459-4804-5-git-send-email-dianders@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Doug Anderson --- 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