Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

Suggestion for 2.2 ...

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


vallat at essi

Apr 29, 1998, 7:50 AM

Post #1 of 1 (82 views)
Permalink
Suggestion for 2.2 ...

Hello all,
one thing Linux lacks compared to most of the commercial unices, is a nice
logo displayed during the boot sequence. With a friend, I designed a little
patch (Intel only) which displays a nice pinguin before booting the kernel.
(And contrary to the other logo patch, it does not hide boot messages and
doesn't require modification of the startup scripts)
Experience has shown that it impresses the novices and pleases confirmed Linux
users... Tell us what you think !
1. Patch for 2.0.33 and any recent 2.0
diff -u --recursive --new-file linux/Documentation/Configure.help linux-2.0.33/Documentation/Configure.help
--- linux/Documentation/Configure.help Thu Dec 11 03:21:47 1997
+++ linux-2.0.33/Documentation/Configure.help Tue Apr 7 21:08:36 1998
@@ -37,6 +37,12 @@
# in your own kernel configuration tools. The texts are copyrighted
# (c) 1995,1996 by Axel Boldt and governed by the GNU Public License.

+Display boot logo
+CONFIG_VIDEO_LOGO
+ Displays the Linux logo at boot time. Enabling this gadget does not
+ take off memory and does not hide the boot messages. It is recommended
+ not to use it if you want to put your kernel on a floppy disk.
+
Prompt for development and/or incomplete code/drivers
CONFIG_EXPERIMENTAL
Some of the various things that Linux supports (such as network
Binary files linux/arch/i386/boot/LinuxLogo.bmp and linux-2.0.33/arch/i386/boot/LinuxLogo.bmp differ
diff -u --recursive --new-file linux/arch/i386/boot/Makefile linux-2.0.33/arch/i386/boot/Makefile
--- linux/arch/i386/boot/Makefile Wed Jul 17 13:59:14 1996
+++ linux-2.0.33/arch/i386/boot/Makefile Mon Apr 20 12:09:15 1998
@@ -16,6 +16,10 @@
HOSTCFLAGS := $(HOSTCFLAGS) -D__SMP__
endif

+ifdef CONFIG_VIDEO_LOGO
+VIDEO_INCL = linuxlogo.S bitmap.S
+endif
+
zImage: $(CONFIGURE) bootsect setup compressed/vmlinux tools/build
ifdef CONFIG_KERNEL_ELF
if hash $(ENCAPS) 2> /dev/null; then \
@@ -73,7 +77,7 @@
setup.o: setup.s
$(AS86) -o $@ $<

-setup.s: setup.S video.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
+setup.s: setup.S video.S $(VIDEO_INCL) $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
$(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@

bootsect: bootsect.o
@@ -94,10 +98,17 @@
bbootsect.s: bootsect.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
$(CPP) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@

+bitmap.S: tools/MakeLinuxLogo LinuxLogo.bmp
+ tools/MakeLinuxLogo LinuxLogo.bmp
+
+tools/MakeLinuxLogo: tools/MakeLinuxLogo.c
+ $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include
+
dep:

clean:
rm -f bootsect setup
+ rm -f tools/MakeLinuxLogo bitmap.S
rm -f bbootsect
rm -f zImage tools/build compressed/vmlinux.out
rm -f bzImage tools/bbuild compressed/bvmlinux.out
diff -u --recursive --new-file linux/arch/i386/boot/linuxlogo.S linux-2.0.33/arch/i386/boot/linuxlogo.S
--- linux/arch/i386/boot/linuxlogo.S Thu Jan 1 01:00:00 1970
+++ linux-2.0.33/arch/i386/boot/linuxlogo.S Sat Jan 31 15:22:14 1998
@@ -0,0 +1,247 @@
+!
+! LinuxLogo.S : Kernel extension to display the Linux logo at boot time, to
+! look more like other Unices or OSes, and to make Sergio happy.
+!
+! Copyright (c) 1997 Serge "Sergio" Tellene (idea) and Miodrag Vallat (code).
+! <tells [at] mygale> <miodrag [at] mygale>
+!
+!
+! This code will display the image dumped in bitmap.S, in 640x480x16 VGA mode,
+! if the current display is VGA color or better.
+! It would be easier to display the image in 320x200x256 mode, but the image
+! data would be too large, and it would look ugly (pixels are too large).
+!
+! For more information on how to set up your own custom logo, please look
+! in MakeLinuxLogo.c
+!
+
+novga:
+ pop es
+ ret
+linuxlogo:
+ push es
+!Look for a VGA-compatible adapter
+ ! 1. Standard method
+ mov ax,#0x1a00
+ int 0x10
+ cmp al,#0x1a
+ jnz novga
+ inc bl
+ cmp bl,#9
+ jb novga
+ jz perhaps
+ cmp bl,#0x0d
+ jb novga
+perhaps:
+ ! 2. verification (some late ega cards aren't rejected by previous test)
+ mov ax,#0x1c00
+ mov cx,#3
+ int 0x10
+ cmp al,#0x1c
+ jnz novga
+!clear screen and set up graphics mode
+ mov ax,#0x0012
+ int 0x10
+ mov dx,#0x03ce
+ mov ax,#0x0205
+ out dx,ax
+ .word 0x00eb
+!set up black palette
+ xor bx,bx
+setcolor:
+ mov dx,#0x3c8
+ mov al,bl
+ out dx,al
+ .word 0x00eb
+ inc dx
+ xor ax,ax
+ out dx,al
+ .word 0x00eb
+ out dx,al
+ .word 0x00eb
+ out dx,al
+ .word 0x00eb
+ mov bh,bl
+ mov ah,#0x10
+ int 0x10
+ inc bx
+ cmp bl,#0x10
+ jb setcolor
+!display image centered
+ lea si,bitmap
+ mov di,#640
+ sub di,[bmwidth]
+ mov cl,#4
+ shr di,cl
+ mov cx,[bmheight]
+ mov ax,#480
+ sub ax,cx
+ shr ax,#1
+ mov bx,#80
+ mul bx
+ add di,ax
+ mov ax,#0xa000
+ mov es,ax
+ cld
+ xor ax,ax
+displayimage:
+ push cx
+ push di
+ mov dx,#0x3ce
+ mov bx,[bmwidth]
+ xor cx,cx
+displayline:
+ push ax
+ mov ax,#0x8008
+ shr ah,cl
+ out dx,ax
+ .word 0x00eb
+ pop ax
+ cmpb [rlecount],#0
+ jnz disp
+ call getn
+ or al,al
+ jz encoded
+!unencoded nibbles follow
+ movb [rlecount],al
+ movb [rlemode],#0
+ jmp disp
+encoded:
+!repeat the same nibble
+ call getn
+ shl al,#1
+ shl al,#1
+ shl al,#1
+ shl al,#1
+ movb [rlecount],al
+ call getn
+ addb al,[rlecount]
+ add al,#4
+ movb [rlecount],al
+ movb [rlemode],#1
+ call getn
+ movb [rlepix],al
+disp:
+ decb [rlecount]
+ cmpb [rlemode],#0
+ jz query
+ movb al,[rlepix]
+ jmp displaypixel
+query:
+ call getn
+displaypixel:
+ push ax
+ seg es
+ movb ah,(di)
+ seg es
+ movb (di),al
+ pop ax
+ inc cx
+ cmp cl,#8
+ jnz disp2
+ inc di
+ xor cx,cx
+disp2:
+ dec bx
+ jnz displayline
+ pop di
+ pop cx
+ add di,#80
+ loop displayimage
+!fade bitmap palette
+ mov cl,#1
+setpalette:
+ lea si,bmcolors
+ xor ch,ch
+!wait for retrace
+ mov dx,#0x3da
+waitretrace0:
+ in al,dx
+ test al,#8
+ jnz waitretrace0
+waitretrace1:
+ in al,dx
+ test al,#8
+ jz waitretrace1
+setcolor0:
+ mov dx,#0x3c8
+ mov al,ch
+ out dx,al
+ .word 0x00eb
+ inc dx
+ lodsb
+ call convert
+ out dx,al
+ .word 0x00eb
+ lodsb
+ call convert
+ out dx,al
+ .word 0x00eb
+ lodsb
+ call convert
+ out dx,al
+ .word 0x00eb
+ inc ch
+ cmp ch,#0x10
+ jb setcolor0
+!wait around 45ms - delay code written by my friend Ciriaco Garcia de Celis.
+ push cx
+ mov cx,#3000
+pmicro:
+ .word 0x00eb
+ .word 0x00eb
+ in al,#0x61
+ and al,#0x10
+ cmp al,ah
+ jz pmicro
+ mov ah,al
+ loop pmicro
+ pop cx
+ inc cl
+ cmp cl,#64
+ jbe setpalette
+!wait one more second after the image is correctly displayed
+ mov cx,#0xffff
+pmicro2:
+ .word 0x00eb
+ .word 0x00eb
+ in al,#0x61
+ and al,#0x10
+ cmp al,ah
+ jz pmicro2
+ mov ah,al
+ loop pmicro2
+!back to work !
+ mov ax,#0x0003
+ int 0x10
+ pop es
+ ret
+convert:
+ xor ah,ah
+ mov bl,cl
+ mul bl
+ mov al,ah
+ ret
+getn:
+ lodsb
+ or ah,ah
+ jnz oddnibble
+ dec si
+ shr al,#1
+ shr al,#1
+ shr al,#1
+ shr al,#1
+oddnibble:
+ not ah
+ and al,#0x0f
+ ret
+
+!data area
+rlecount:
+ db 0
+rlepix:
+ db 0
+rlemode:
+ db 0
+
+#include "bitmap.S"
diff -u --recursive --new-file linux/arch/i386/boot/tools/MakeLinuxLogo.c linux-2.0.33/arch/i386/boot/tools/MakeLinuxLogo.c
--- linux/arch/i386/boot/tools/MakeLinuxLogo.c Thu Jan 1 01:00:00 1970
+++ linux-2.0.33/arch/i386/boot/tools/MakeLinuxLogo.c Mon Apr 20 20:14:38 1998
@@ -0,0 +1,304 @@
+/*
+
+ Nibble-encodes (RLE variant) a 4 bit/pixel bitmap, and dumps it in a
+ suitable form to create the kernel image.
+
+ Copyright (c) 1997-1998 Serge "Sergio" Tellene and Miodrag Vallat
+ <tells [at] mygale> <miodrag [at] mygale>
+*/
+
+/*
+ Using this program, you can store in bitmap.S any image which meets the
+ following requirements :
+ - 16 colors (palette can be redefined, but color 0 will be the background
+ color, so try to set it to black)
+ - less than 640x480 pixels : display code does not check if the image fits
+ in the screen )-8
+
+ Try to keep your images small. We didn't store them as GIF or similar because
+ the decompressor size would be too large, but instead the image is stored
+ nibble-encoded (a better RLE variant for 4bit/pixel images).
+
+ If you want to include the image on a bare bootable Linux floppy (without
+ LILO), remember that the "setup" module will be loaded in *one call* by the
+ "bootsect" module, and thus can not be very large.
+ More precisely :
+ - if your BIOS does not support floppy multitrack (i.e. reading sectors on
+ multiple heads), the maximum size of the setup module is :
+ 3"ED=>17920 bytes, 3"HD=>8704 bytes, 5"HD=>7168 bytes, 3"DD=>4096 bytes.
+ - if your BIOS supports floppy multitrack (most BIOSes do), the maximum
+ size of the setup module is :
+ 3"ED=>36352 bytes, 3"HD=>17920 bytes, 5"HD=>14848 bytes, 3"DD=>8704 bytes
+
+ Now, the base size of the setup module, without your image, is close to
+ 5000 bytes. In the average case (3"HD+multitrack), there can only be 12Kb
+ for the encoded image. FYI the default Linux 2 logo is 5639 bytes encoded.
+
+ With newer 2.1 kernels, you can reduce the size of the setup module even more
+ by undefining CONFIG_VIDEO_SELECT
+
+*/
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+/* prevents gcc from aligning record fields to 4 bytes boundaries - very sad
+ with Bitmap header structure beginning with a 16 bit field... */
+#pragma pack(1)
+
+/* Bitmap file tables */
+
+struct BitmapHeader
+{
+ unsigned short Signature;
+ unsigned long SizeHeaders;
+ unsigned long Reserved;
+ unsigned long DataOffset;
+};
+
+struct BitmapInfoHeader
+{
+ unsigned long Size;
+ unsigned long Width;
+ unsigned long Height;
+ unsigned short Planes;
+ unsigned short BitCnt;
+ unsigned long Compression;
+ unsigned long SizeImage;
+ unsigned long XRes;
+ unsigned long YRes;
+ unsigned long ClrUsed;
+ unsigned long ClrImportant;
+} Info;
+
+/* Color table */
+struct RGBQuad
+{
+ char B,G,R,Pad;
+} *Colors;
+
+/* Bitmap variables */
+char *Datas, /* bitmap bits */
+ *EncodedDatas; /* bitmap encoded bits */
+unsigned long DataSize, /* bitmap bits size */
+ EncodedSize; /* bitmap bits encoded size */
+
+int read_bitmap(char *srcfile)
+{
+ FILE* src=fopen(srcfile,"rb");
+ struct BitmapHeader Header;
+
+ if (src==NULL)
+ { puts("Unable to open bitmap file !"); return 0; }
+
+ if (fread(&Header,1,sizeof(Header),src)!=sizeof(Header))
+ { puts("Unable to load bitmap header !"); return 0; }
+
+ if (Header.Signature!=0x4D42)
+ { puts("The bitmap file is not a .BMP file."); return 0; }
+
+ if (fread(&Info,1,sizeof(Info),src)!=sizeof(Info))
+ { puts("Unable to load bitmap secondary header !"); return 0; }
+
+ if ((Info.Size<0x28)||(Info.Size+sizeof(Header)>Header.SizeHeaders))
+ { puts("The bitmap file is not a Windows 3+ or OS/2 2+ bitmap file.");
+ return 0; }
+
+ if (Info.Compression)
+ { puts("The bitmap file must not be compressed !"); return 0; }
+
+ if (Info.BitCnt!=4)
+ { puts("The bitmap file must be 4bit/pixel (16 colors)."); return 0; }
+
+ if ((Info.Width>640)||(Info.Height>480))
+ { puts("The bitmap image is too big and won't fit in the screen !");
+ return 0; }
+
+ if (fseek(src,Header.SizeHeaders,SEEK_SET))
+ { puts("Unable to seek to bitmap color table !"); return 0; }
+
+ Colors=malloc(0x10*4);
+ if (Colors==NULL)
+ { puts("Not enough memory to read the bitmap color table !"); return 0; }
+
+ if (fread(Colors,1,0x10*4,src)!=0x10*4)
+ { puts("Unable to read the bitmap color table !");
+ free(Colors); return 0; }
+
+ /* compute real data size */
+
+ DataSize=((((Info.Width+1)>>1)+3)&~3)*Info.Height;
+ Datas=malloc(DataSize);
+ if (Datas==NULL)
+ { puts("Not enough memory to read the bitmap bits !");
+ free(Colors); return 0; }
+
+ if (fread(Datas,1,DataSize,src)!=DataSize)
+ { puts("Unable to read the bitmap bits !");
+ free(Datas); free(Colors); return 0; }
+
+ fclose(src);
+ return 1;
+}
+
+void dump_byte(char byte,int prefix,FILE *where)
+#define putbyte(b) ((b)<10?'0'+(b):'a'-10+(b))
+{
+ if (prefix) fputs("0x",where);
+ fputc(putbyte((byte>>4)&0xf),where);
+ fputc(putbyte(byte&0xf),where);
+}
+#undef putbyte
+
+int dump_bitmap(char *dstfile)
+{
+ FILE *dst=fopen(dstfile,"wt");
+ unsigned long I;
+
+ if (dst==NULL)
+ { puts("Unable to create dump file !"); return 0; }
+
+ /* header */
+ fputs("! Generated file - do not edit, use MakeLinuxLogo instead !\n",dst);
+
+ /* bitmap size */
+ fputs("\nbmwidth:\n\tdw\t",dst);
+ dump_byte((char)(Info.Width>>8),1,dst);dump_byte((char)Info.Width,0,dst);
+ fputs("\nbmheight:\n\tdw\t",dst);
+ dump_byte((char)(Info.Height>>8),1,dst);dump_byte((char)Info.Height,0,dst);
+
+ /* bitmap colors */
+ fputs("\nbmcolors:\n",dst);
+ for (I=0;I<0x10;I++)
+ {
+ fputs("\tdb\t",dst);
+ dump_byte((Colors+I)->R,1,dst);fputc(',',dst);
+ dump_byte((Colors+I)->G,1,dst);fputc(',',dst);
+ dump_byte((Colors+I)->B,1,dst);fputs("\n",dst);
+ }
+
+ if ((Colors->R)||(Colors->G)||(Colors->B))
+ { puts("Warning ! Screen background won't be black !"); }
+
+ /* bitmap bits */
+ fputs("bitmap:",dst);
+
+ for (I=0;I<EncodedSize;I++)
+ {
+ if (!(I % 10)) fputs("\n\tdb\t",dst);
+ dump_byte((*(EncodedDatas+I)),1,dst);
+ if ((I % 10!=9)&&(I!=EncodedSize-1)) fputc(',',dst);
+ }
+
+ fputs("\n",dst);
+
+ fclose(dst);
+ return 1;
+}
+
+char GetNibble(int X,int Y)
+{
+ char T=*(Datas+((X>>1)+(Info.Height-Y)*((((Info.Width+1)>>1)+3)&~3)));
+ if (X&1) T&=0xf; else T>>=4;
+ return T;
+}
+
+void PutNibble(char N)
+{
+ N&=0xf;
+ if (EncodedSize&1)
+ {
+ *(EncodedDatas+(EncodedSize>>1))&=0xf0;
+ *(EncodedDatas+(EncodedSize>>1))|=N;
+ } else {
+ *(EncodedDatas+(EncodedSize>>1))&=0x0f;
+ *(EncodedDatas+(EncodedSize>>1))|=(N<<4);
+ }
+ EncodedSize++;
+}
+
+int Encode(void)
+{
+ unsigned int X,Y,TempX,SomeX,LastX;
+ char Current;
+
+ EncodedSize=0;
+ /* At worst, we'll use less than twice the size of the bitmap */
+ EncodedDatas=malloc(DataSize<<1);
+ if (EncodedDatas==NULL)
+ { puts("Not enough memory to encode the bitmap !"); return 0; }
+
+ for (Y=1;Y<=Info.Height;Y++)
+ {
+ LastX=X=0;
+ while (X<Info.Width)
+ {
+ Current=GetNibble(X,Y);
+ SomeX=X;
+ while ((SomeX<Info.Width)&&(SomeX-X<(0x100-4))&&(GetNibble(SomeX,Y)==Current)) SomeX++;
+ /* found a sequence */
+ /* NOTE: At first it was decided to code the sequence length with a nibble,
+ thus avoiding wasting too much nibbles for short sequences. But the
+ default logo is 600 bytes smaller using two nibbles, so I choose the
+ latter solution. */
+ if (SomeX-X>4)
+ {
+ /* emit the beginning */
+ while (LastX!=X)
+ {
+ if (X>LastX+0xf) TempX=LastX+0xf; else TempX=X;
+ PutNibble(TempX-LastX);
+ while (LastX!=TempX) PutNibble(GetNibble(LastX++,Y));
+ }
+ /* emit the match */
+ PutNibble(0);PutNibble((SomeX-X-4)>>4);PutNibble((SomeX-X-4)&0xf);
+ PutNibble(Current);
+ LastX=X=SomeX;
+ } else X++;
+ }
+ /* emit the remainder */
+ while (LastX!=X)
+ {
+ if (X>LastX+0xf) TempX=LastX+0xf; else TempX=X;
+ PutNibble(TempX-LastX);
+ while (LastX!=TempX) PutNibble(GetNibble(LastX++,Y));
+ }
+ }
+ /* use even number of nibbles */
+ if (EncodedSize&1) PutNibble(0);
+ /* back to bytes... */
+ EncodedSize>>=1;
+
+ return 1;
+}
+
+int main(int argc,char *argv[])
+{
+ puts("MakeLinuxLogo - converts a 16 color bitmap file to asm dump for linux boot\n" \
+ "Copyright (c) 1997-1998 Serge \"Sergio\" Tellene and Miodrag Vallat\n" \
+ " <tells [at] mygale> <miodrag [at] mygale>\n");
+
+ if (argc!=2)
+ { puts("Usage: MakeLinuxLogo bitmap_file"); return 1; }
+
+ if (read_bitmap(argv[1]))
+ {
+ puts("Bitmap file was succesfully read.");
+ if (Encode())
+ {
+ printf((EncodedSize<=DataSize)? \
+ "Bitmap bits size reduced from %u bytes to %u bytes.\n": \
+ "Bitmap bits size increased from %u bytes to %u bytes. Sorry !\n",\
+ DataSize,EncodedSize);
+ if (dump_bitmap("bitmap.S"))
+ {
+ EncodedSize+=2+2+0x10*3;
+ printf("Dump file bitmap.S was successfully written, representing %u bytes of memory.\n"\
+ "Now recreate your kernel image with \"make zImage.\"\n",EncodedSize);
+ return 0; }
+ else return 1;
+ } else return 1;
+ } else return 1;
+}
diff -u --recursive --new-file linux/arch/i386/boot/video.S linux-2.0.33/arch/i386/boot/video.S
--- linux/arch/i386/boot/video.S Sat May 18 10:15:10 1996
+++ linux-2.0.33/arch/i386/boot/video.S Sat Jan 31 15:23:18 1998
@@ -4,6 +4,8 @@
! Copyright (C) 1995, 1996 Martin Mares <mj [at] k332>
! Based on the original setup.S code (C) Linus Torvalds
!
+! Logo display code copyright (C) 1997 Miodrag Vallat
+! <miodrag [at] mygale>

! Enable autodetection of SVGA adapters and modes
#define CONFIG_VIDEO_SVGA
@@ -191,7 +193,16 @@
je defmd1 ! no - repeat
call beep
jmp nokey
-defmd1: ret ! No mode selected => use the 80x25 default
+defmd1:
+#ifdef CONFIG_VIDEO_LOGO
+!Display logo before continuing
+ cmpb [logo_displayed],#0
+ jnz no_more_logo
+ call linuxlogo ! and make Sergio happy (-8
+ incb [logo_displayed]
+no_more_logo:
+#endif
+ ret ! No mode selected => use the 80x25 default

listm: call mode_table ! We need a mode table to be listed
listm0: lea si,name_bann ! Print adapter name
@@ -354,6 +365,16 @@
!

mode_set:
+#ifdef CONFIG_VIDEO_LOGO
+!Display logo before continuing
+ cmpb [logo_displayed],#0
+ jnz no_more_logo2
+ push ax
+ call linuxlogo ! and make Sergio happy (-8
+ pop ax
+ incb [logo_displayed]
+no_more_logo2:
+#endif
mov bx,ax
cmp ah,#0xff
jz setalias
@@ -412,7 +433,12 @@
cmp si,di
jnc setbad
mov ax,(si) ! Fetch mode ID
-_m_s: jmp mode_set
+_m_s:
+#ifdef CONFIG_VIDEO_LOGO
+ br mode_set
+#else
+ jmp mode_set
+#endif

setres:
push bx ! Set mode chosen by its resolution
@@ -1738,6 +1764,10 @@
pop ax
ret

+#ifdef CONFIG_VIDEO_LOGO
+#include "linuxlogo.S"
+#endif
+
! Variables:

adapter: .byte 0 ! Video adapter: 0=CGA/MDA/HGA,1=EGA,2=VGA
@@ -1749,6 +1779,9 @@
svga_prefix: .byte VIDEO_FIRST_BIOS>>8 ! Default prefix for BIOS modes
video_segment: .word 0xb800 ! Video memory segment
force_size: .word 0 ! Use this size instead of the one in BIOS vars
+#ifdef CONFIG_VIDEO_LOGO
+logo_displayed: .byte 0 ! Logo has been displayed ?
+#endif

! Messages:

diff -u --recursive --new-file linux/arch/i386/config.in linux-2.0.33/arch/i386/config.in
--- linux/arch/i386/config.in Mon May 13 06:17:23 1996
+++ linux-2.0.33/arch/i386/config.in Tue Apr 7 21:08:39 1998
@@ -5,6 +5,11 @@
mainmenu_name "Linux Kernel Configuration"

mainmenu_option next_comment
+comment 'Gadgets'
+bool 'Display boot logo' CONFIG_VIDEO_LOGO
+endmenu
+
+mainmenu_option next_comment
comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
endmenu
diff -u --recursive --new-file linux/arch/i386/defconfig linux-2.0.33/arch/i386/defconfig
--- linux/arch/i386/defconfig Mon Sep 22 22:44:01 1997
+++ linux-2.0.33/arch/i386/defconfig Tue Apr 7 21:08:41 1998
@@ -3,6 +3,11 @@
#

#
+# Gadgets
+#
+CONFIG_VIDEO_LOGO=y
+
+#
# Code maturity level options
#
# CONFIG_EXPERIMENTAL is not set
2. Patch for 2.1.96 and any recent 2.1
diff -u --recursive --new-file linux/Documentation/Configure.help linux-2.1.96/Documentation/Configure.help
--- linux/Documentation/Configure.help Mon Apr 20 21:13:08 1998
+++ linux-2.1.96/Documentation/Configure.help Mon Apr 20 11:07:07 1998
@@ -58,6 +58,12 @@
# 1995-1998 by Axel Boldt and many others and are governed by the GNU
# Public License.

+Display boot logo
+CONFIG_VIDEO_LOGO
+ Displays the Linux logo at boot time. Enabling this gadget does not
+ take off memory and does not hide the boot messages. It is recommended
+ not to use it if you want to put your kernel on a floppy disk with dd.
+
Prompt for development and/or incomplete code/drivers
CONFIG_EXPERIMENTAL
Some of the various things that Linux supports (such as network
diff -u --recursive --new-file linux/arch/i386/boot/Makefile linux-2.1.96/arch/i386/boot/Makefile
--- linux/arch/i386/boot/Makefile Thu Apr 24 04:01:14 1997
+++ linux-2.1.96/arch/i386/boot/Makefile Mon Apr 20 12:20:54 1998
@@ -12,6 +12,10 @@
HOSTCFLAGS := $(HOSTCFLAGS) -D__SMP__
endif

+ifdef CONFIG_VIDEO_LOGO
+VIDEO_INCL = linuxlogo.S bitmap.S
+endif
+
BOOT_INCL = $(TOPDIR)/include/linux/config.h \
$(TOPDIR)/include/linux/autoconf.h \
$(TOPDIR)/include/asm/boot.h
@@ -52,7 +56,7 @@
setup.o: setup.s
$(AS86) -o $@ $<

-setup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h
+setup.s: setup.S video.S $(VIDEO_INCL) Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h
$(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@

bsetup: bsetup.o
@@ -61,7 +65,7 @@
bsetup.o: bsetup.s
$(AS86) -o $@ $<

-bsetup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h
+bsetup.s: setup.S video.S $(VIDEO_INCL) Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h
$(CPP) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@

bootsect: bootsect.o
@@ -82,10 +86,17 @@
bbootsect.s: bootsect.S Makefile $(BOOT_INCL)
$(CPP) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@

+bitmap.S: tools/MakeLinuxLogo LinuxLogo.bmp
+ tools/MakeLinuxLogo LinuxLogo.bmp
+
+tools/MakeLinuxLogo: tools/MakeLinuxLogo.c
+ $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include
+
dep:

clean:
rm -f tools/build
+ rm -f tools/MakeLinuxLogo bitmap.S
rm -f setup bootsect zImage compressed/vmlinux.out
rm -f bsetup bbootsect bzImage compressed/bvmlinux.out
@$(MAKE) -C compressed clean
diff -u --recursive --new-file linux/arch/i386/boot/linuxlogo.S linux-2.1.96/arch/i386/boot/linuxlogo.S
--- linux/arch/i386/boot/linuxlogo.S Thu Jan 1 01:00:00 1970
+++ linux-2.1.96/arch/i386/boot/linuxlogo.S Mon Apr 20 12:18:19 1998
@@ -0,0 +1,264 @@
+!
+! LinuxLogo.S : Kernel extension to display the Linux logo at boot time, to
+! look more like other Unices or OSes, and to make Sergio happy.
+!
+! Copyright (c) 1997 Serge "Sergio" Tellene (idea) and Miodrag Vallat (code).
+! <tells [at] mygale> <miodrag [at] mygale>
+!
+!
+! This code will display the image dumped in bitmap.S, in 640x480x16 VGA mode,
+! if the current display is VGA color or better.
+! It would be easier to display the image in 320x200x256 mode, but the image
+! data would be too large, and it would look ugly (pixels are too large).
+!
+! For more information on how to set up your own custom logo, please look
+! in MakeLinuxLogo.c
+!
+
+#define delay \
+ .word 0x00eb
+
+novga:
+ pop es
+ ret
+linuxlogo:
+ push es
+
+!Look for a VGA-compatible adapter
+
+ ! 1. Standard method
+ mov ax,#0x1a00
+ int 0x10
+ cmp al,#0x1a
+ jnz novga
+ inc bl
+ cmp bl,#9
+ jb novga
+ jz perhaps
+ cmp bl,#0x0d
+ jb novga
+perhaps:
+
+ ! 2. verification (some late ega cards aren't rejected by previous test)
+ mov ax,#0x1c00
+ mov cx,#3
+ int 0x10
+ cmp al,#0x1c
+ jnz novga
+
+!Clear screen and set up graphics mode
+
+ mov ax,#0x0012
+ int 0x10
+ mov dx,#0x03ce
+ mov ax,#0x0205
+ out dx,al
+ delay
+
+!Set up black palette
+
+ xor bx,bx
+setcolor:
+ mov dx,#0x3c8
+ mov al,bl
+ out dx,al
+ delay
+ inc dx
+ xor ax,ax
+ out dx,al
+ delay
+ out dx,al
+ delay
+ out dx,al
+ delay
+ mov bh,bl
+ mov ah,#0x10
+ int 0x10
+ inc bx
+ cmp bl,#0x10
+ jb setcolor
+
+!Display image centered
+
+ lea si,bitmap
+ mov di,#640
+ sub di,[bmwidth]
+ mov cl,#4
+ shr di,cl
+ mov cx,[bmheight]
+ mov ax,#480
+ sub ax,cx
+ shr ax,#1
+ mov bx,#80
+ mul bx
+ add di,ax
+ mov ax,#0xa000
+ mov es,ax
+ cld
+ xor ax,ax
+displayimage:
+ push cx
+ push di
+ mov dx,#0x3ce
+ mov bx,[bmwidth]
+ xor cx,cx
+displayline:
+ push ax
+ mov ax,#0x8008
+ shr ah,cl
+ out dx,ax
+ delay
+ pop ax
+ cmpb [rlecount],#0
+ jnz disp
+ call getn
+ or al,al
+ jz encoded
+!unencoded nibbles follow
+ movb [rlecount],al
+ movb [rlemode],#0
+ jmp disp
+encoded:
+!repeat the same nibble
+ call getn
+ shl al,#1
+ shl al,#1
+ shl al,#1
+ shl al,#1
+ movb [rlecount],al
+ call getn
+ addb al,[rlecount]
+ add al,#4
+ movb [rlecount],al
+ movb [rlemode],#1
+ call getn
+ movb [rlepix],al
+disp:
+ decb [rlecount]
+ cmpb [rlemode],#0
+ jz query
+ movb al,[rlepix]
+ jmp displaypixel
+query:
+ call getn
+displaypixel:
+ push ax
+ seg es
+ movb ah,(di)
+ seg es
+ movb (di),al
+ pop ax
+ inc cx
+ cmp cl,#8
+ jnz disp2
+ inc di
+ xor cx,cx
+disp2:
+ dec bx
+ jnz displayline
+ pop di
+ pop cx
+ add di,#80
+ loop displayimage
+!fade bitmap palette
+ mov cl,#1
+setpalette:
+ lea si,bmcolors
+ xor ch,ch
+
+!Wait for retrace
+
+waitretrace:
+ mov dx,#0x3da
+waitretrace0:
+ in al,dx
+ test al,#8
+ jnz waitretrace0
+waitretrace1:
+ in al,dx
+ test al,#8
+ jz waitretrace1
+setcolor0:
+ mov dx,#0x3c8
+ mov al,ch
+ out dx,al
+ delay
+ inc dx
+ lodsb
+ call convert
+ out dx,al
+ delay
+ lodsb
+ call convert
+ out dx,al
+ delay
+ lodsb
+ call convert
+ out dx,al
+ delay
+ inc ch
+ cmp ch,#0x10
+! jb setcolor0
+ jb waitretrace
+
+!Wait around 45ms - delay code written by my friend Ciriaco Garcia de Celis.
+ push cx
+ mov cx,#3000
+pmicro:
+ delay
+ delay
+ in al,#0x61
+ and al,#0x10
+ cmp al,ah
+ jz pmicro
+ mov ah,al
+ loop pmicro
+ pop cx
+ inc cl
+ cmp cl,#64
+ jbe setpalette
+!wait one more second after the image is correctly displayed
+ mov cx,#0xffff
+pmicro2:
+ delay
+ delay
+ in al,#0x61
+ and al,#0x10
+ cmp al,ah
+ jz pmicro2
+ mov ah,al
+ loop pmicro2
+!back to work !
+ mov ax,#0x0003
+ int 0x10
+ pop es
+ ret
+convert:
+ xor ah,ah
+ mov bl,cl
+ mul bl
+ mov al,ah
+ ret
+getn:
+ lodsb
+ or ah,ah
+ jnz oddnibble
+ dec si
+ shr al,#1
+ shr al,#1
+ shr al,#1
+ shr al,#1
+oddnibble:
+ not ah
+ and al,#0x0f
+ ret
+
+!data area
+rlecount:
+ db 0
+rlepix:
+ db 0
+rlemode:
+ db 0
+
+#include "bitmap.S"
diff -u --recursive --new-file linux/arch/i386/boot/tools/MakeLinuxLogo.c linux-2.1.96/arch/i386/boot/tools/MakeLinuxLogo.c
--- linux/arch/i386/boot/tools/MakeLinuxLogo.c Thu Jan 1 01:00:00 1970
+++ linux-2.1.96/arch/i386/boot/tools/MakeLinuxLogo.c Sat Jan 31 15:21:52 1998
@@ -0,0 +1,304 @@
+/*
+
+ Nibble-encodes (RLE variant) a 4 bit/pixel bitmap, and dumps it in a
+ suitable form to create the kernel image.
+
+ Copyright (c) 1997-1998 Serge "Sergio" Tellene and Miodrag Vallat
+ <tells [at] mygale> <miodrag [at] mygale>
+*/
+
+/*
+ Using this program, you can store in bitmap.S any image which meets the
+ following requirements :
+ - 16 colors (palette can be redefined, but color 0 will be the background
+ color, so try to set it to black)
+ - less than 640x480 pixels : display code does not check if the image fits
+ in the screen )-8
+
+ Try to keep your images small. We didn't store them as GIF or similar because
+ the decompressor size would be too large, but instead the image is stored
+ nibble-encoded (a better RLE variant for 4bit/pixel images).
+
+ If you want to include the image on a bare bootable Linux floppy (without
+ LILO), remember that the "setup" module will be loaded in *one call* by the
+ "bootsect" module, and thus can not be very large.
+ More precisely :
+ - if your BIOS does not support floppy multitrack (i.e. reading sectors on
+ multiple heads), the maximum size of the setup module is :
+ 3"ED=>17920 bytes, 3"HD=>8704 bytes, 5"HD=>7168 bytes, 3"DD=>4096 bytes.
+ - if your BIOS supports floppy multitrack (most BIOSes do), the maximum
+ size of the setup module is :
+ 3"ED=>36352 bytes, 3"HD=>17920 bytes, 5"HD=>14848 bytes, 3"DD=>8704 bytes
+
+ Now, the base size of the setup module, without your image, is close to
+ 5000 bytes. In the average case (3"HD+multitrack), there can only be 12Kb
+ for the encoded image. FYI the default Linux 2 logo is 5639 bytes encoded.
+
+ With newer 2.1 kernels, you can reduce the size of the setup module even more
+ by undefining CONFIG_VIDEO_SELECT
+
+*/
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+/* prevents gcc from aligning record fields to 4 bytes boundaries - very sad
+ with Bitmap header structure beginning with a 16 bit field... */
+#pragma pack(1)
+
+/* Bitmap file tables */
+
+struct BitmapHeader
+{
+ unsigned short Signature;
+ unsigned long SizeHeaders;
+ unsigned long Reserved;
+ unsigned long DataOffset;
+};
+
+struct BitmapInfoHeader
+{
+ unsigned long Size;
+ unsigned long Width;
+ unsigned long Height;
+ unsigned short Planes;
+ unsigned short BitCnt;
+ unsigned long Compression;
+ unsigned long SizeImage;
+ unsigned long XRes;
+ unsigned long YRes;
+ unsigned long ClrUsed;
+ unsigned long ClrImportant;
+} Info;
+
+/* Color table */
+struct RGBQuad
+{
+ char B,G,R,Pad;
+} *Colors;
+
+/* Bitmap variables */
+char *Datas, /* bitmap bits */
+ *EncodedDatas; /* bitmap encoded bits */
+unsigned long DataSize, /* bitmap bits size */
+ EncodedSize; /* bitmap bits encoded size */
+
+int read_bitmap(char *srcfile)
+{
+ FILE* src=fopen(srcfile,"rb");
+ struct BitmapHeader Header;
+
+ if (src==NULL)
+ { puts("Unable to open bitmap file !"); return 0; }
+
+ if (fread(&Header,1,sizeof(Header),src)!=sizeof(Header))
+ { puts("Unable to load bitmap header !"); return 0; }
+
+ if (Header.Signature!=0x4D42)
+ { puts("The bitmap file is not a .BMP file."); return 0; }
+
+ if (fread(&Info,1,sizeof(Info),src)!=sizeof(Info))
+ { puts("Unable to load bitmap secondary header !"); return 0; }
+
+ if ((Info.Size<0x28)||(Info.Size+sizeof(Header)>Header.SizeHeaders))
+ { puts("The bitmap file is not a Windows 3+ or OS/2 2+ bitmap file.");
+ return 0; }
+
+ if (Info.Compression)
+ { puts("The bitmap file must not be compressed !"); return 0; }
+
+ if (Info.BitCnt!=4)
+ { puts("The bitmap file must be 4bit/pixel (16 colors)."); return 0; }
+
+ if ((Info.Width>640)||(Info.Height>480))
+ { puts("The bitmap image is too big and won't fit in the screen !");
+ return 0; }
+
+ if (fseek(src,Header.SizeHeaders,SEEK_SET))
+ { puts("Unable to seek to bitmap color table !"); return 0; }
+
+ Colors=malloc(0x10*4);
+ if (Colors==NULL)
+ { puts("Not enough memory to read the bitmap color table !"); return 0; }
+
+ if (fread(Colors,1,0x10*4,src)!=0x10*4)
+ { puts("Unable to read the bitmap color table !");
+ free(Colors); return 0; }
+
+ /* compute real data size */
+
+ DataSize=((((Info.Width+1)>>1)+3)&~3)*Info.Height;
+ Datas=malloc(DataSize);
+ if (Datas==NULL)
+ { puts("Not enough memory to read the bitmap bits !");
+ free(Colors); return 0; }
+
+ if (fread(Datas,1,DataSize,src)!=DataSize)
+ { puts("Unable to read the bitmap bits !");
+ free(Datas); free(Colors); return 0; }
+
+ fclose(src);
+ return 1;
+}
+
+void dump_byte(char byte,int prefix,FILE *where)
+#define putbyte(b) ((b)<10?'0'+(b):'a'-10+(b))
+{
+ if (prefix) fputs("0x",where);
+ fputc(putbyte((byte>>4)&0xf),where);
+ fputc(putbyte(byte&0xf),where);
+}
+#undef putbyte
+
+int dump_bitmap(char *dstfile)
+{
+ FILE *dst=fopen(dstfile,"wt");
+ unsigned long I;
+
+ if (dst==NULL)
+ { puts("Unable to create dump file !"); return 0; }
+
+ /* header */
+ fputs("! Generated file - do not edit, use MakeLinuxLogo instead !\n",dst);
+
+ /* bitmap size */
+ fputs("\nbmwidth:\n\tdw\t",dst);
+ dump_byte((char)(Info.Width>>8),1,dst);dump_byte((char)Info.Width,0,dst);
+ fputs("\nbmheight:\n\tdw\t",dst);
+ dump_byte((char)(Info.Height>>8),1,dst);dump_byte((char)Info.Height,0,dst);
+
+ /* bitmap colors */
+ fputs("\nbmcolors:\n",dst);
+ for (I=0;I<0x10;I++)
+ {
+ fputs("\tdb\t",dst);
+ dump_byte((Colors+I)->R,1,dst);fputc(',',dst);
+ dump_byte((Colors+I)->G,1,dst);fputc(',',dst);
+ dump_byte((Colors+I)->B,1,dst);fputs("\n",dst);
+ }
+
+ if ((Colors->R)||(Colors->G)||(Colors->B))
+ { puts("Warning ! Screen background won't be black !"); }
+
+ /* bitmap bits */
+ fputs("bitmap:",dst);
+
+ for (I=0;I<EncodedSize;I++)
+ {
+ if (!(I % 10)) fputs("\n\tdb\t",dst);
+ dump_byte((*(EncodedDatas+I)),1,dst);
+ if ((I % 10!=9)&&(I!=EncodedSize-1)) fputc(',',dst);
+ }
+
+ fputs("\n",dst);
+
+ fclose(dst);
+ return 1;
+}
+
+char GetNibble(int X,int Y)
+{
+ char T=*(Datas+((X>>1)+(Info.Height-Y)*((((Info.Width+1)>>1)+3)&~3)));
+ if (X&1) T&=0xf; else T>>=4;
+ return T;
+}
+
+void PutNibble(char N)
+{
+ N&=0xf;
+ if (EncodedSize&1)
+ {
+ *(EncodedDatas+(EncodedSize>>1))&=0xf0;
+ *(EncodedDatas+(EncodedSize>>1))|=N;
+ } else {
+ *(EncodedDatas+(EncodedSize>>1))&=0x0f;
+ *(EncodedDatas+(EncodedSize>>1))|=(N<<4);
+ }
+ EncodedSize++;
+}
+
+int Encode(void)
+{
+ unsigned int X,Y,TempX,SomeX,LastX;
+ char Current;
+
+ EncodedSize=0;
+ /* At worst, we'll use less than twice the size of the bitmap */
+ EncodedDatas=malloc(DataSize<<1);
+ if (EncodedDatas==NULL)
+ { puts("Not enough memory to encode the bitmap !"); return 0; }
+
+ for (Y=1;Y<=Info.Height;Y++)
+ {
+ LastX=X=0;
+ while (X<Info.Width)
+ {
+ Current=GetNibble(X,Y);
+ SomeX=X;
+ while ((SomeX<Info.Width)&&(SomeX-X<(0x100-4))&&(GetNibble(SomeX,Y)==Current)) SomeX++;
+ /* found a sequence */
+ /* NOTE: At first it was decided to code the sequence length with a nibble,
+ thus avoiding wasting too much nibbles for short sequences. But the
+ default logo is 600 bytes smaller using two nibbles, so I choose the
+ latter solution. */
+ if (SomeX-X>4)
+ {
+ /* emit the beginning */
+ while (LastX!=X)
+ {
+ if (X>LastX+0xf) TempX=LastX+0xf; else TempX=X;
+ PutNibble(TempX-LastX);
+ while (LastX!=TempX) PutNibble(GetNibble(LastX++,Y));
+ }
+ /* emit the match */
+ PutNibble(0);PutNibble((SomeX-X-4)>>4);PutNibble((SomeX-X-4)&0xf);
+ PutNibble(Current);
+ LastX=X=SomeX;
+ } else X++;
+ }
+ /* emit the remainder */
+ while (LastX!=X)
+ {
+ if (X>LastX+0xf) TempX=LastX+0xf; else TempX=X;
+ PutNibble(TempX-LastX);
+ while (LastX!=TempX) PutNibble(GetNibble(LastX++,Y));
+ }
+ }
+ /* use even number of nibbles */
+ if (EncodedSize&1) PutNibble(0);
+ /* back to bytes... */
+ EncodedSize>>=1;
+
+ return 1;
+}
+
+int main(int argc,char *argv[])
+{
+ puts("MakeLinuxLogo - converts a 16 color bitmap file to asm dump for linux boot\n" \
+ "Copyright (c) 1997-1998 Serge \"Sergio\" Tellene and Miodrag Vallat\n" \
+ " <tells [at] mygale> <miodrag [at] mygale>\n");
+
+ if (argc!=2)
+ { puts("Usage: MakeLinuxLogo bitmap_file"); return 1; }
+
+ if (read_bitmap(argv[1]))
+ {
+ puts("Bitmap file was succesfully read.");
+ if (Encode())
+ {
+ printf((EncodedSize<=DataSize)? \
+ "Bitmap bits size reduced from %u bytes to %u bytes.\n": \
+ "Bitmap bits size increased from %u bytes to %u bytes. Sorry !\n",\
+ DataSize,EncodedSize);
+ if (dump_bitmap("bitmap.S"))
+ {
+ EncodedSize+=2+2+0x10*3;
+ printf("Dump file bitmap.S was successfully written, representing %u bytes of memory.\n"\
+ "Now recreate your kernel image with \"make zImage.\"\n",EncodedSize);
+ return 0; }
+ else return 1;
+ } else return 1;
+ } else return 1;
+}
diff -u --recursive --new-file linux/arch/i386/boot/video.S linux-2.1.96/arch/i386/boot/video.S
--- linux/arch/i386/boot/video.S Sat Feb 21 03:28:21 1998
+++ linux-2.1.96/arch/i386/boot/video.S Sat Feb 21 19:13:25 1998
@@ -4,6 +4,8 @@
! Copyright (C) 1995 -- 1997 Martin Mares <mj [at] k332>
! Based on the original setup.S code (C) Linus Torvalds and Mats Anderson
!
+! Logo display code copyright (C) 1997 Miodrag Vallat
+! <miodrag [at] mygale>

#include <linux/config.h> /* for CONFIG_VIDEO_* */

@@ -115,6 +117,11 @@
#ifdef CONFIG_VIDEO_RETAIN
call restore_screen ! Restore screen contents
#endif /* CONFIG_VIDEO_RETAIN */
+#else
+#ifdef CONFIG_VIDEO_LOGO
+!Display logo before continuing
+ call linuxlogo ! and make Sergio happy (-8
+#endif /* CONFIG_VIDEO_LOGO */
#endif /* CONFIG_VIDEO_SELECT */
call mode_params ! Store mode parameters
pop ds ! Restore original DS
@@ -211,7 +218,16 @@
je defmd1 ! no - repeat
call beep
jmp nokey
-defmd1: ret ! No mode selected => use the 80x25 default
+defmd1:
+#ifdef CONFIG_VIDEO_LOGO
+!Display logo before continuing
+ cmpb [logo_displayed],#0
+ jnz no_more_logo
+ call linuxlogo ! and make Sergio happy (-8
+ incb [logo_displayed]
+no_more_logo:
+#endif /* CONFIG_VIDEO_LOGO */
+ ret ! No mode selected => use the 80x25 default

listm: call mode_table ! We need a mode table to be listed
listm0: lea si,name_bann ! Print adapter name
@@ -376,6 +392,16 @@
!

mode_set:
+#ifdef CONFIG_VIDEO_LOGO
+!Display logo before continuing
+ cmpb [logo_displayed],#0
+ jnz no_more_logo2
+ push ax
+ call linuxlogo ! and make Sergio happy (-8
+ pop ax
+ incb [logo_displayed]
+no_more_logo2:
+#endif /* CONFIG_VIDEO_LOGO */
mov bx,ax
cmp ah,#0xff
jz setalias
@@ -436,7 +462,7 @@
cmp si,di
jnc setbad
mov ax,(si) ! Fetch mode ID
-_m_s: jmp mode_set
+_m_s: br mode_set

setres:
push bx ! Set mode chosen by its resolution
@@ -1833,6 +1859,10 @@

#endif /* CONFIG_VIDEO_SELECT */

+#ifdef CONFIG_VIDEO_LOGO
+#include "linuxlogo.S"
+#endif /* CONFIG_VIDEO_LOGO */
+
!
! Other variables:
!
@@ -1840,3 +1870,6 @@
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
+#ifdef CONFIG_VIDEO_LOGO
+logo_displayed: .byte 0 ! Logo has been displayed ?
+#endif /* CONFIG_VIDEO_LOGO */
diff -u --recursive --new-file linux/arch/i386/config.in linux-2.1.96/arch/i386/config.in
--- linux/arch/i386/config.in Mon Apr 20 21:11:48 1998
+++ linux-2.1.96/arch/i386/config.in Mon Apr 20 11:07:09 1998
@@ -5,6 +5,11 @@
mainmenu_name "Linux Kernel Configuration"

mainmenu_option next_comment
+comment 'Gadgets'
+bool 'Display boot logo' CONFIG_VIDEO_LOGO
+endmenu
+
+mainmenu_option next_comment
comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
endmenu
diff -u --recursive --new-file linux/arch/i386/defconfig linux-2.1.96/arch/i386/defconfig
--- linux/arch/i386/defconfig Mon Apr 20 21:08:52 1998
+++ linux-2.1.96/arch/i386/defconfig Mon Apr 20 11:07:11 1998
@@ -3,6 +3,11 @@
#

#
+# Gadgets
+#
+CONFIG_VIDEO_LOGO=y
+
+#
# Code maturity level options
#
# CONFIG_EXPERIMENTAL is not set
3. Uuencoded logo, rename to $(SRCDIR)/arch/i386/boot/LinuxLogo.bmp
begin 600 LinuxLogo.bmp.gz
M'XL("%>H.S4" TQI;G5X3&]G;RYB;7 S5I?;!/)&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LFYZS/^(&DAB[\;.?GC>*<YVYD)APBY/9,W6.5
M:L=WV>\JI[6ELDLV1/[VU<I-Q.9@=()'Z=EI6U6+F?EFNQ5=\T.FG;%WDK(S
M&K?7;=YU/4>=8%O2UC9H=H1W5[,_6X1H]D8O5BA1C [at] RDA;S$"YH?-4)PH+0
M_.:-LNBP5N5]Q@Y@")TY;6-+7,\(.]).XJD*W3S6^#/"#C4H>/@HI%Q"1HV=
MPA G-!(L!(G6\DP0[<\(@IO5.??A]WQ,2"$8S-T0=K)Y)Y=R>L80=K:%.\>%
,_\/V7\Z_&?G"-@

end
PS : This patch is for Intel only, sorry. When I'll buy an Alpha (in a few months),
I'll make an Alpha version, too.
-- "Miod" (Christophe M. Vallat) - 2M and X1 teams member
miodrag [at] mygale (preferred) or vallat [at] essi
http://www.mygale.org/~miodrag/indexeng.shtml
"ALIENS ARE GENERATING INTERRUPTS ! CALL BOB" (BeOS kernel panic)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.