diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-05-29 18:31:15 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-30 20:00:47 -0400 |
commit | 3b6b9293d0f8e1b11630102013ca2a1dcef17d44 (patch) | |
tree | cd1fc0fac98d436b63a6e9062e5fdba72b8c5d17 | |
parent | 23968f71b26ece45ed52895d41b0208b90a516e7 (diff) |
x86: Honor 'quiet' command line option in real mode boot decompressor.
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>
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 13 | ||||
-rw-r--r-- | arch/x86/boot/main.c | 4 | ||||
-rw-r--r-- | include/asm-x86/bootparam.h | 1 |
3 files changed, 15 insertions, 3 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 74ed3c075ee6..d10e7274e1fc 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -189,6 +189,7 @@ static void gzip_release(void **); | |||
189 | * This is set up by the setup-routine at boot-time | 189 | * This is set up by the setup-routine at boot-time |
190 | */ | 190 | */ |
191 | static struct boot_params *real_mode; /* Pointer to real-mode data */ | 191 | static struct boot_params *real_mode; /* Pointer to real-mode data */ |
192 | static int quiet; | ||
192 | 193 | ||
193 | extern unsigned char input_data[]; | 194 | extern unsigned char input_data[]; |
194 | extern int input_len; | 195 | extern int input_len; |
@@ -391,7 +392,8 @@ static void parse_elf(void *output) | |||
391 | return; | 392 | return; |
392 | } | 393 | } |
393 | 394 | ||
394 | putstr("Parsing ELF... "); | 395 | if (!quiet) |
396 | putstr("Parsing ELF... "); | ||
395 | 397 | ||
396 | phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); | 398 | phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); |
397 | if (!phdrs) | 399 | if (!phdrs) |
@@ -426,6 +428,9 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap, | |||
426 | { | 428 | { |
427 | real_mode = rmode; | 429 | real_mode = rmode; |
428 | 430 | ||
431 | if (real_mode->hdr.loadflags & QUIET_FLAG) | ||
432 | quiet = 1; | ||
433 | |||
429 | if (real_mode->screen_info.orig_video_mode == 7) { | 434 | if (real_mode->screen_info.orig_video_mode == 7) { |
430 | vidmem = (char *) 0xb0000; | 435 | vidmem = (char *) 0xb0000; |
431 | vidport = 0x3b4; | 436 | vidport = 0x3b4; |
@@ -461,9 +466,11 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap, | |||
461 | #endif | 466 | #endif |
462 | 467 | ||
463 | makecrc(); | 468 | makecrc(); |
464 | putstr("\nDecompressing Linux... "); | 469 | if (!quiet) |
470 | putstr("\nDecompressing Linux... "); | ||
465 | gunzip(); | 471 | gunzip(); |
466 | parse_elf(output); | 472 | parse_elf(output); |
467 | putstr("done.\nBooting the kernel.\n"); | 473 | if (!quiet) |
474 | putstr("done.\nBooting the kernel.\n"); | ||
468 | return; | 475 | return; |
469 | } | 476 | } |
diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c index 77569a4a3be1..2296164b54d2 100644 --- a/arch/x86/boot/main.c +++ b/arch/x86/boot/main.c | |||
@@ -165,6 +165,10 @@ void main(void) | |||
165 | /* Set the video mode */ | 165 | /* Set the video mode */ |
166 | set_video(); | 166 | set_video(); |
167 | 167 | ||
168 | /* Parse command line for 'quiet' and pass it to decompressor. */ | ||
169 | if (cmdline_find_option_bool("quiet")) | ||
170 | boot_params.hdr.loadflags |= QUIET_FLAG; | ||
171 | |||
168 | /* Do the last things and invoke protected mode */ | 172 | /* Do the last things and invoke protected mode */ |
169 | go_to_protected_mode(); | 173 | go_to_protected_mode(); |
170 | } | 174 | } |
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index f62f4733606b..3e36ba8f288b 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
@@ -40,6 +40,7 @@ struct setup_header { | |||
40 | __u8 type_of_loader; | 40 | __u8 type_of_loader; |
41 | __u8 loadflags; | 41 | __u8 loadflags; |
42 | #define LOADED_HIGH (1<<0) | 42 | #define LOADED_HIGH (1<<0) |
43 | #define QUIET_FLAG (1<<5) | ||
43 | #define KEEP_SEGMENTS (1<<6) | 44 | #define KEEP_SEGMENTS (1<<6) |
44 | #define CAN_USE_HEAP (1<<7) | 45 | #define CAN_USE_HEAP (1<<7) |
45 | __u16 setup_move_size; | 46 | __u16 setup_move_size; |