intel penguin bootlogo

Gerd Knorr (kraxel@cs.tu-berlin.de)
Tue, 8 Jul 1997 09:24:11 +0200 (MET DST)


Hi !

Well, sparclinux boxes display a nice penguin at startup, but intel pc's
do not. I think this is not acceptable. Here comes a patch to change this.

This works by changing the vga font (chars 0xc0 - 0xdf, the range where
these box characters reside) and displaying these chars as 8x4 block. This
gives a nice penguin in text mode(!). Works only if you have a vga, and if
the vga font is 16 pixel high.

As this works in text mode, you'll still see all the boot messages. But
the penguin gets scrolled off the screen quickly, linux boots to fast :-)

Becauce this screws up the font a bit, you'll probably want to add a call
to 'setfont' to your rc-files, unless you already load your favorite font.

Gerd

PS: this is against 2.1.42
------------------------------------------------------------------------
diff -u linux/arch/i386/boot/video.S.orig linux/arch/i386/boot/video.S
--- linux/arch/i386/boot/video.S.orig Thu May 15 00:01:20 1997
+++ linux/arch/i386/boot/video.S Tue Jul 8 00:05:31 1997
@@ -114,6 +114,7 @@
call restore_screen ! Restore screen contents
#endif /* CONFIG_VIDEO_RETAIN */
#endif /* CONFIG_VIDEO_SELECT */
+ call penguin ! display logo
call mode_params ! Store mode parameters
pop ds ! Restore original DS
ret
@@ -192,6 +193,34 @@
movb [PARAM_VIDEO_LINES],al
ret

+!
+! nice penguin for intel boxes too :-)
+!
+
+penguin:
+ incb [PARAM_HAVE_VGA] ! make sure we have a vga...
+ decb [PARAM_HAVE_VGA]
+ jz logo_skip
+
+ seg gs ! ... and a video mode with
+ mov ax,[0x485] ! 16-line fonts
+ cmp ax,#16
+ jnz logo_skip
+
+ mov ax,#0x1100 ! load the font piece using bios functions
+ mov bx,#0x1000
+ mov cx,#32
+ mov dx,#0x00c0
+ lea bp,logofont
+ int 0x10
+
+ lea si,penguin_msg ! print the string with the logo
+ call prtstr
+
+logo_skip:
+ ret
+
+
#ifdef CONFIG_VIDEO_SELECT

!
@@ -1838,3 +1867,16 @@
adapter: .byte 0 ! Video adapter: 0=CGA/MDA/HGA,1=EGA,2=VGA
video_segment: .word 0xb800 ! Video memory segment
force_size: .word 0 ! Use this size instead of the one in BIOS vars
+
+! logo string
+penguin_msg: .ascii " ÀÁÂÃÄÅÆÇ "
+ db 0x0d,0x0a
+ .ascii " ÈÉÊËÌÍÎÏ "
+ db 0x0d,0x0a
+ .ascii " ÐÑÒÓÔÕÖ× "
+ db 0x0d,0x0a
+ .ascii " ØÙÚÛÜÝÞß "
+ db 0x0d,0x0a,0
+
+! logo font data
+#include "logofont.asm"
diff -u linux/arch/i386/boot/logofont.asm.orig linux/arch/i386/boot/logofont.asm
--- linux/arch/i386/boot/logofont.asm.orig Mon Jul 7 23:59:32 1997
+++ linux/arch/i386/boot/logofont.asm Mon Jul 7 23:59:32 1997
@@ -0,0 +1,33 @@
+logofont:
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x00,0x00,0x00,0x01,0x01,0x03,0x03,0x03,0x07,0x07,0x07,0x07,0x06,0x02,0x02,0x03
+ db 0x03,0x1f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x4f,0xef,0xef,0xe1,0x40
+ db 0xc0,0xf8,0xfe,0xff,0xf3,0xf1,0xff,0xff,0xff,0xff,0x03,0x33,0x79,0x79,0x79,0x39
+ db 0x00,0x00,0x00,0x80,0xc0,0xc0,0xe0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf8
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01
+ db 0x03,0x03,0x02,0x03,0x03,0x03,0x03,0x06,0x0e,0x1c,0x3c,0x38,0x78,0xf8,0xf8,0x70
+ db 0x80,0x00,0x00,0x80,0xc1,0xde,0x61,0x7f,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x0f,0x01,0x09,0x31,0xc3,0x33,0xc1,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0xf8,0xf8,0xf8,0xf8,0x9c,0xce,0xfe,0xff,0xff,0x7f,0x7f,0x3f,0x3f,0x3f,0x1f,0x0f
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0x7c
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x03,0x03,0x07,0x07,0x0f,0x0f,0x1b,0x1b,0x3b,0x7b,0x7f,0x7d,0x6e,0x03,0x81,0x80
+ db 0xf0,0xe0,0xc0,0xc0,0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0xc0,0xe0
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+ db 0x07,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x03,0x0f,0x1b,0x11
+ db 0xfe,0xbf,0xbf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0x1f,0xe7,0xff,0xff,0xff,0xfe
+ db 0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x80,0x00,0x00
+ db 0x01,0x3f,0x40,0x40,0x40,0x40,0x40,0x60,0x60,0x40,0xc0,0x60,0x1f,0x01,0x00,0x00
+ db 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x0f,0x01
+ db 0x78,0x7c,0x3e,0x1f,0x0f,0x0f,0x07,0x02,0x01,0x01,0x00,0x00,0x01,0x01,0x87,0xfe
+ db 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x60,0xb0,0xbf,0xff,0xff,0xf8,0x80,0x00
+ db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x3f,0xff,0xff,0xff,0x00,0x00,0x00
+ db 0x10,0x10,0x10,0x10,0x10,0x10,0x58,0xd8,0xd0,0xd0,0xf0,0xb0,0xf8,0xf8,0x3c,0x1f
+ db 0xfc,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x0c,0x78,0xf0
+ db 0x20,0x20,0x20,0x30,0x1c,0x06,0x01,0x01,0x03,0x0c,0x70,0xc0,0x00,0x00,0x00,0x00