diff -urN ../grub.orig/configure.in ./configure.in --- ../grub.orig/configure.in Sat Jan 4 18:22:42 2003 +++ ./configure.in Sun Jan 19 18:36:16 2003 @@ -261,6 +261,14 @@ FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_XFS=1" fi +AC_ARG_ENABLE(startup-video, + [ --disable-startup-video disable video output before Stage 2]) + +if test x"$enable_startup_video" = xno; then + STAGE1_CFLAGS="$STAGE1_CFLAGS -DNO_STARTUP_VIDEO=1" + STAGE2_CFLAGS="$STAGE2_CFLAGS -DNO_STARTUP_VIDEO=1" +fi + dnl AC_ARG_ENABLE(tftp, dnl [ --enable-tftp enable TFTP support in Stage 2]) dnl diff -urN ../grub.orig/stage1/stage1.S ./stage1/stage1.S --- ../grub.orig/stage1/stage1.S Tue Dec 10 12:30:28 2002 +++ ./stage1/stage1.S Sun Jan 19 18:32:37 2003 @@ -415,7 +415,9 @@ 1: movw $0x0001, %bx movb $0xe, %ah +#ifndef NO_STARTUP_VIDEO int $0x10 /* display a byte */ +#endif message: lodsb cmpb $0, %al diff -urN ../grub.orig/stage2/asm.S ./stage2/asm.S --- ../grub.orig/stage2/asm.S Fri Dec 20 19:34:33 2002 +++ ./stage2/asm.S Sun Jan 19 18:32:37 2003 @@ -1864,6 +1864,10 @@ * support setting a background attribute. */ ENTRY(console_putchar) +#ifdef NO_STARTUP_VIDEO + cmpb $0, EXT_C(enable_video) + jz 4f +#endif movl 0x4(%esp), %edx pusha #ifdef STAGE1_5 @@ -1935,7 +1939,7 @@ .code32 popa - ret +4: ret #ifndef STAGE1_5 @@ -2337,6 +2341,11 @@ .long 0 #endif +#ifdef NO_STARTUP_VIDEO +VARIABLE(enable_video) + .long 0 +#endif + VARIABLE(install_second_sector) .long 0 diff -urN ../grub.orig/stage2/shared.h ./stage2/shared.h --- ../grub.orig/stage2/shared.h Mon Dec 2 19:02:53 2002 +++ ./stage2/shared.h Sun Jan 19 18:32:37 2003 @@ -539,6 +539,9 @@ extern unsigned long install_partition; extern unsigned long boot_drive; +#ifdef NO_STARTUP_VIDEO +extern unsigned long enable_video; +#endif extern unsigned long install_second_sector; extern struct apm_info apm_bios_info; extern unsigned long boot_part_addr; diff -urN ../grub.orig/stage2/stage2.c ./stage2/stage2.c --- ../grub.orig/stage2/stage2.c Tue Dec 3 19:55:45 2002 +++ ./stage2/stage2.c Sun Jan 19 18:32:37 2003 @@ -989,6 +989,10 @@ while (is_preset); } +#ifdef NO_STARTUP_VIDEO + enable_video = 1; +#endif + if (! num_entries) { /* If no acceptable config file, goto command-line, starting diff -urN ../grub.orig/stage2/start.S ./stage2/start.S --- ../grub.orig/stage2/start.S Sun Dec 30 03:23:16 2001 +++ ./stage2/start.S Sun Jan 19 18:32:37 2003 @@ -365,7 +365,9 @@ 1: movw $0x0001, %bx movb $0xe, %ah +#ifndef NO_STARTUP_VIDEO int $0x10 /* display a byte */ +#endif incw %si message: