]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: Honor 'quiet' command line option in real mode boot decompressor.
authorKristian Høgsberg <krh@redhat.com>
Thu, 29 May 2008 22:31:15 +0000 (18:31 -0400)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 31 May 2008 00:00:47 +0000 (17:00 -0700)
This patch lets the early real mode code look for the 'quiet' option
on the kernel command line and pass a loadflag to the decompressor.
When this flag is set, we suppress the "Decompressing Linux... Parsing
ELF... done." messages.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/boot/compressed/misc.c
arch/x86/boot/main.c
include/asm-x86/bootparam.h

index 74ed3c075ee60ebdef14c95e6021005cec0fa4ae..d10e7274e1fc22facf9fcc044532c5c29b92efd1 100644 (file)
@@ -189,6 +189,7 @@ static void gzip_release(void **);
  * This is set up by the setup-routine at boot-time
  */
 static struct boot_params *real_mode;          /* Pointer to real-mode data */
+static int quiet;
 
 extern unsigned char input_data[];
 extern int input_len;
@@ -391,7 +392,8 @@ static void parse_elf(void *output)
                return;
        }
 
-       putstr("Parsing ELF... ");
+       if (!quiet)
+               putstr("Parsing ELF... ");
 
        phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum);
        if (!phdrs)
@@ -426,6 +428,9 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
 {
        real_mode = rmode;
 
+       if (real_mode->hdr.loadflags & QUIET_FLAG)
+               quiet = 1;
+
        if (real_mode->screen_info.orig_video_mode == 7) {
                vidmem = (char *) 0xb0000;
                vidport = 0x3b4;
@@ -461,9 +466,11 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
 #endif
 
        makecrc();
-       putstr("\nDecompressing Linux... ");
+       if (!quiet)
+               putstr("\nDecompressing Linux... ");
        gunzip();
        parse_elf(output);
-       putstr("done.\nBooting the kernel.\n");
+       if (!quiet)
+               putstr("done.\nBooting the kernel.\n");
        return;
 }
index 77569a4a3be114aaca948d04b060ebd28c80c1a9..2296164b54d2abc3ad8edc343af2b76c830d6693 100644 (file)
@@ -165,6 +165,10 @@ void main(void)
        /* Set the video mode */
        set_video();
 
+       /* Parse command line for 'quiet' and pass it to decompressor. */
+       if (cmdline_find_option_bool("quiet"))
+               boot_params.hdr.loadflags |= QUIET_FLAG;
+
        /* Do the last things and invoke protected mode */
        go_to_protected_mode();
 }
index f62f4733606bfa9388ad98dce4a0c72fec7e9b2f..3e36ba8f288bed13dc9c525398161eecd557d608 100644 (file)
@@ -40,6 +40,7 @@ struct setup_header {
        __u8    type_of_loader;
        __u8    loadflags;
 #define LOADED_HIGH    (1<<0)
+#define QUIET_FLAG     (1<<5)
 #define KEEP_SEGMENTS  (1<<6)
 #define CAN_USE_HEAP   (1<<7)
        __u16   setup_move_size;