Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99581
b: refs/heads/master
c: 3b6b929
h: refs/heads/master
i:
  99579: 7880742
v: v3
  • Loading branch information
Kristian Høgsberg authored and H. Peter Anvin committed May 31, 2008
1 parent 7625035 commit 57e7c48
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23968f71b26ece45ed52895d41b0208b90a516e7
refs/heads/master: 3b6b9293d0f8e1b11630102013ca2a1dcef17d44
13 changes: 10 additions & 3 deletions trunk/arch/x86/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
4 changes: 4 additions & 0 deletions trunk/arch/x86/boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
1 change: 1 addition & 0 deletions trunk/include/asm-x86/bootparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 57e7c48

Please sign in to comment.