]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
RFC: bootm: Add silent_linux environment variable
authorSimon Glass <sjg@chromium.org>
Wed, 17 Jul 2013 03:10:00 +0000 (20:10 -0700)
committerTom Rini <trini@ti.com>
Fri, 16 Aug 2013 17:45:15 +0000 (13:45 -0400)
At present the console for linux is silent if the U-Boot console is silent,
unless CONFIG_SILENT_U_BOOT_ONLY is set. I wonder if a better way would be
to have an environment variable to control this? Then we can control the
verbosity from scripts, and set the variable to 'no' for those boards that
want Linux to boot with console output.

Signed-off-by: Simon Glass <sjg@chromium.org>
README
common/cmd_bootm.c

diff --git a/README b/README
index 391880765a0865f05a71efc6dedf40d99e61d7fe..96cc4668e0c219731c318d0bb577012d6c8d08a4 100644 (file)
--- a/README
+++ b/README
@@ -4627,6 +4627,12 @@ List of environment variables (most likely not complete):
 
   npe_ucode    - set load address for the NPE microcode
 
+  silent_linux  - If set then linux will be told to boot silently, by
+                 changing the console to be empty. If "yes" it will be
+                 made silent. If "no" it will not be made silent. If
+                 unset, then it will be made silent if the U-Boot console
+                 is silent.
+
   tftpsrcport  - If this is set, the value is used for TFTP's
                  UDP source port.
 
index 046e22ff48f57efd4e9957d311b64377c2e048dd..31ec0f4bbcd5aa8a0435da7c8c55553456db9391 100644 (file)
@@ -1384,9 +1384,19 @@ static void fixup_silent_linux(void)
        char *buf;
        const char *env_val;
        char *cmdline = getenv("bootargs");
+       int want_silent;
 
-       /* Only fix cmdline when requested */
-       if (!(gd->flags & GD_FLG_SILENT))
+       /*
+        * Only fix cmdline when requested. The environment variable can be:
+        *
+        *      no - we never fixup
+        *      yes - we always fixup
+        *      unset - we rely on the console silent flag
+        */
+       want_silent = getenv_yesno("silent_linux");
+       if (want_silent == 0)
+               return;
+       else if (want_silent == -1 && !(gd->flags & GD_FLG_SILENT))
                return;
 
        debug("before silent fix-up: %s\n", cmdline);