[RFC] Cosmetic Patch to Boot Logo

From: Gerard Sharp (gsharp@ihug.co.nz)
Date: Tue Jun 20 2000 - 08:54:22 EST


Hello

I love my matroxfb (1024x768-8bpp at 85Hz :) ); and I am known to boot
into several different kernels; however, between the speed of modern
computers and the >flash< as the monitor changes resolutions, the kernel
version details, as output by "printk(kernel_banner);" in init/main.c
scroll off the screen even before they register in my vision.

Hence I offer this simple patch; purely cosmetic without any side
effects[1] that I can see, which takes UTS_RELEASE, and displays it on
the screen in the top left corner, above the boot penguin.
Due to it's location, the text persists along with the penguin, while
boot messages scroll past.
Applies cleanly to ac21 and ac22, and 2.2.14 (as ships with RedHat 6.2)

The downsides are a few lines more code, and one line less screen
realestate on boot.

If anyone wants to try the patch and comment / report bugs, I'd be more
than grateful to hear from you.
If anyone wants to flame, well, I believe my /dev/null is empty these
days.

[1] Murphy's Law requires at least one side effect for saying that.

Gerard Sharp
Dual Processor... Twice The Boot Penguins...

=== begin logo.patch ===
diff -dur linux/drivers/video/fbcon.c linux_2/drivers/video/fbcon.c
--- linux/drivers/video/fbcon.c Wed Jun 21 00:33:30 2000
+++ linux_2/drivers/video/fbcon.c Wed Jun 21 01:08:02 2000
@@ -31,6 +31,8 @@
  *
  * Random hacking by Martin Mares <mj@ucw.cz>
  *
+ * Alterations marked G.S. contributed by Gerard Sharp
(gsharp@ihug.co.nz)
+ * Essentially a line of text above the Boot Logo stating kernel
version. :)
  *
  * The low level operations for the various display memory
organizations are
  * now in separate source files.
@@ -609,7 +611,8 @@
        int cnt;
        int step;
     
- logo_lines = (LOGO_H + fontheight(p) - 1) / fontheight(p);
+ /* G.S. Make logo 1 (text) line taller - for version text */
+ logo_lines = (LOGO_H + (fontheight(p)*2) - 1) / fontheight(p);
        q = (unsigned short *)(conp->vc_origin + conp->vc_size_row *
old_rows);
        step = logo_lines * old_cols;
        for (r = q - logo_lines * old_cols; r < q; r++)
@@ -1455,7 +1458,17 @@
     if (p->dispsw->clear_margins && vt_cons[unit]->vc_mode == KD_TEXT)
        p->dispsw->clear_margins(conp, p, 0);
     if (logo_shown == -2) {
- logo_shown = fg_console;
+ /* G.S.: Display a line above the Boot Logo to state what
+ * version of the kernel we are booting.
+ */
+ char welcometext[] = "Linux " UTS_RELEASE;
+ unsigned short welcomestring[ sizeof(welcometext) ];
+ int i;
+ for(i = 0; i < sizeof(welcometext); i++)
+ welcomestring[i] = 0x0700 | welcometext[i];
+ fbcon_putcs( conp, welcomestring, sizeof(welcometext), 0, 0 );
+
+ logo_shown = fg_console;
        fbcon_show_logo(); /* This is protected above by initmem_freed
*/
        update_region(fg_console,
                      conp->vc_origin + conp->vc_size_row *
conp->vc_top,
@@ -2049,7 +2062,8 @@
     /* Return if the frame buffer is not mapped */
     if (!fb)
        return 0;
-
+ /* G.S. : Move Penguin(s) down one line; for version line */
+ fb += fontheight(p) * line;
     /* Set colors if visual is PSEUDOCOLOR and we have enough colors,
or for
      * DIRECTCOLOR */
     if ((p->visual == FB_VISUAL_PSEUDOCOLOR && depth >= 4) ||
=== end logo.patch ===

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:19 EST