Sie sind nicht angemeldet.

1

14.03.2006, 06:10

Linux Bootup Logo Hack

###########################
# HowTo Linux Bootup Logo Hack #
##########################


BENUTZUNG AUF EIGENER GEFAHR! ;)

Letztes Update: 14.03.2006

Für Kernel: 2.6.x


Beschreibung:

Dieses HowTo ist für solche die das Linux Bootup Logo verändern wollen.



1.0 Kernel Konfiguration
2.0 Customize The Logo
3.0 Anlagen für dieses Howto
4.0 Bemerkungen & Quellen
MfG MyD

2

14.03.2006, 06:11

1.0 Kernel Konfiguration

Jetzt ist es an der Zeit den Kernel richtig einzustellen für unseren kleinen Hack *g

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Device Drivers ->
    Graphics Support ->
        [*] Support for frame buffer devices
        [*] VESA VGA graphics support

    Console display driver support ->
        [*] Video mode selection support
        <*> Framebuffer Console support
        [*]Select compiled-in fonts
        [*]VGA 8x16 font

    Logo configuration->
        [*]Bootup logo
        [ ] Standard 224-color Linux logo


Achtung: Die Kernel noch nicht kompilieren - am Ende des HowTo's muss nochmals die .config des Kernels geändert werden!

Wer das nicht kann sollte sich lieber mal dieses HowTo durchlesen oder sich mit dem genkernel Leitfaden auseinandersetzen! :tongue:
MfG MyD

3

14.03.2006, 06:11

2.0 Customize The Logo

Wie am Anfang des HowTo's schon geschrieben kommen wir nun dazu das wir uns ein Logo mittels des Programmes netpbm zu erstellen.

Zitat

* media-libs/netpbm
Size of files: 7,687 kB
Homepage: http://netpbm.sourceforge.net/
Description: A set of utilities for converting to/from the netpbm (and related) formats
License: GPL-2


Um es zu installieren müsst ihr einfach nur folgenden Befehl ausführen:

Quellcode

1
# emerge -av netpbm


Als nächstes müssen wir nun das Logo in das richtige Format bringen damit der Kernel damit auch was anfangen kann. ;)

Quellcode

1
2
3
4
5
6
# pngtopnm -plain gentoo_logo.png >logo_gentoo_clut.ppm 
# ppmquant -plain 224 logo_gentoo_clut.ppm >logo_gentoo_clut224.ppm 
          ppmquant: making histogram... 
          ppmquant: 10153 colors found 
          ppmquant: choosing 224 colors... 
          ppmquant: mapping image to new colors... 


Wenn alles richtig funktioniert hat, was es auch sollte, muss nur noch die modifizierte Datei an ihren richtigen Platz kopiert werden:

Quellcode

1
# cp logo_gentoo_clut224.ppm /usr/src/linux/drivers/video/logo 


Bevor wir weiter machen ist es am besten die bestehenden Dateien zu sichern:

Quellcode

1
2
3
4
# cd /usr/src/linux/drivers/video/logo
# cp Kconfig Kconfig.old
# cp Makefile makefile.old
# cp logo.c logo.c.old



Nun müssen nur noch diese 3 Dateien mit unseren Erweiterungen editiert werden...
--> (Erweiterungen sind in der Farbe ROT dargestellt)
__________________________________________________________________________

In die Kconfig kommt folgendes hinein (rot):


# Logo configuration
#

menu "Logo configuration"

config LOGO
bool "Bootup logo"
depends on FB || SGI_NEWPORT_CONSOLE

config LOGO_LINUX_MONO
bool "Standard black and white Linux logo"
depends on LOGO
default y

config LOGO_LINUX_VGA16
bool "Standard 16-color Linux logo"
depends on LOGO
default y

config LOGO_LINUX_CLUT224
bool "Standard 224-color Linux logo"
depends on LOGO
default y

config LOGO_GENTOO_CLUT224
bool "Gentoo 224-color Linux logo"
depends on LOGO
default y


config LOGO_DEC_CLUT224
bool "224-color Digital Equipment Corporation Linux logo"
depends on LOGO && DECSTATION
default y

config LOGO_MAC_CLUT224
bool "224-color Macintosh Linux logo"
depends on LOGO && MAC
default y

config LOGO_PARISC_CLUT224
bool "224-color PA-RISC Linux logo"
depends on LOGO && PARISC
default y

config LOGO_SGI_CLUT224
bool "224-color SGI Linux logo"
depends on LOGO && (SGI_IP22 || SGI_IP27 || SGI_IP32 || X86_VISWS)
default y

config LOGO_SUN_CLUT224
bool "224-color Sun Linux logo"
depends on LOGO && (SPARC || SPARC64)
default y

config LOGO_SUPERH_MONO
bool "Black and white SuperH Linux logo"
depends on LOGO && SUPERH
default y

config LOGO_SUPERH_VGA16
bool "16-color SuperH Linux logo"
depends on LOGO && SUPERH
default y

config LOGO_SUPERH_CLUT224
bool "224-color SuperH Linux logo"
depends on LOGO && SUPERH
default y

endmenu
__________________________________________________________________________

In die Makefile kommt folgendes hinein (rot):


# Makefile for the Linux logos

obj-$(CONFIG_LOGO) += logo.o
obj-$(CONFIG_LOGO_LINUX_MONO) += logo_linux_mono.o
obj-$(CONFIG_LOGO_LINUX_VGA16) += logo_linux_vga16.o
obj-$(CONFIG_LOGO_LINUX_CLUT224) += logo_linux_clut224.o
obj-$(CONFIG_LOGO_GENTOO_CLUT224) += logo_gentoo_clut224.o
obj-$(CONFIG_LOGO_DEC_CLUT224) += logo_dec_clut224.o
obj-$(CONFIG_LOGO_MAC_CLUT224) += logo_mac_clut224.o
obj-$(CONFIG_LOGO_PARISC_CLUT224) += logo_parisc_clut224.o
obj-$(CONFIG_LOGO_SGI_CLUT224) += logo_sgi_clut224.o
obj-$(CONFIG_LOGO_SUN_CLUT224) += logo_sun_clut224.o
obj-$(CONFIG_LOGO_SUPERH_MONO) += logo_superh_mono.o
obj-$(CONFIG_LOGO_SUPERH_VGA16) += logo_superh_vga16.o
obj-$(CONFIG_LOGO_SUPERH_CLUT224) += logo_superh_clut224.o
obj-$(CONFIG_LOGO_SUPERH_CLUT224) += logo_superh_clut224.o
# Dependencies on generated files need to be listed explicitly

$(obj)/%_mono.o: $(src)/%_mono.c

$(obj)/%_vga16.o: $(src)/%_vga16.c

$(obj)/%_clut224.o: $(src)/%_clut224.c

$(obj)/%_gray256.o: $(src)/%_gray256.c

# How to generate them

$(obj)/%_mono.c: $(src)/%_mono.pbm
$(objtree)/scripts/pnmtologo -t mono -n $*_mono -o $@ $<

$(obj)/%_vga16.c: $(src)/%_vga16.ppm
$(objtree)/scripts/pnmtologo -t vga16 -n $*_vga16 -o $@ $<

$(obj)/%_clut224.c: $(src)/%_clut224.ppm
$(objtree)/scripts/pnmtologo -t clut224 -n $*_clut224 -o $@ $<

$(obj)/%_gray256.c: $(src)/%_gray256.pgm
$(objtree)/scripts/pnmtologo -t gray256 -n $*_gray256 -o $@ $<


# Files generated that shall be removed upon make clean
clean-files := *_mono.c *_vga16.c *_clut224.c *_gray256.c

__________________________________________________________________________


Die Syntax lautet immer : obj-$(CONFIG_OPZIONE_KERNEL) += nome_file_logo.o

__________________________________________________________________________

In die logo.c kommt folgendes hinein (rot):



/*
* Linux logo to be displayed on boot
*
* Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu)
* Copyright (C) 1996,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 2001 Greg Banks <gnb@alphalink.com.au>
* Copyright (C) 2001 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* Copyright (C) 2003 Geert Uytterhoeven <geert@linux-m68k.org>
*/

#include <linux/config.h>
#include <linux/linux_logo.h>

#ifdef CONFIG_M68K
#include <asm/setup.h>
#endif

#if defined(CONFIG_MIPS) || defined(CONFIG_MIPS64)
#include <asm/bootinfo.h>
#endif

extern const struct linux_logo logo_linux_mono;
extern const struct linux_logo logo_linux_vga16;
extern const struct linux_logo logo_linux_clut224;
extern const struct linux_logo logo_gentoo_clut224;
extern const struct linux_logo logo_dec_clut224;
extern const struct linux_logo logo_mac_clut224;
extern const struct linux_logo logo_parisc_clut224;
extern const struct linux_logo logo_sgi_clut224;
extern const struct linux_logo logo_sun_clut224;
extern const struct linux_logo logo_superh_mono;
extern const struct linux_logo logo_superh_vga16;
extern const struct linux_logo logo_superh_clut224;


const struct linux_logo *fb_find_logo(int depth)
{
const struct linux_logo *logo = 0;

if (depth >= 1) {
#ifdef CONFIG_LOGO_LINUX_MONO
/* Generic Linux logo */
logo = &logo_linux_mono;
#endif
#ifdef CONFIG_LOGO_SUPERH_MONO
/* SuperH Linux logo */
logo = &logo_superh_mono;
#endif
}

if (depth >= 4) {
#ifdef CONFIG_LOGO_LINUX_VGA16
/* Generic Linux logo */
logo = &logo_linux_vga16;
#endif
#ifdef CONFIG_LOGO_SUPERH_VGA16
/* SuperH Linux logo */
logo = &logo_superh_vga16;
#endif
}

if (depth >= 8) {
#ifdef CONFIG_LOGO_LINUX_CLUT224
/* Generic Linux logo */
logo = &logo_linux_clut224;
#endif
#ifdef CONFIG_LOGO_GENTOO_CLUT224
/* Gentoo Linux logo */
logo = &logo_gentoo_clut224;
#endif

#ifdef CONFIG_LOGO_DEC_CLUT224
/* DEC Linux logo on MIPS/MIPS64 */
if (mips_machgroup == MACH_GROUP_DEC)
logo = &logo_dec_clut224;
#endif
#ifdef CONFIG_LOGO_MAC_CLUT224
/* Macintosh Linux logo on m68k */
if (MACH_IS_MAC)
logo = &logo_mac_clut224;
#endif
#ifdef CONFIG_LOGO_PARISC_CLUT224
/* PA-RISC Linux logo */
logo = &logo_parisc_clut224;
#endif
#ifdef CONFIG_LOGO_SGI_CLUT224
/* SGI Linux logo on MIPS/MIPS64 and VISWS */
#ifndef CONFIG_X86_VISWS
if (mips_machgroup == MACH_GROUP_SGI)
#endif
logo = &logo_sgi_clut224;
#endif
#ifdef CONFIG_LOGO_SUN_CLUT224
/* Sun Linux logo */
logo = &logo_sun_clut224;
#endif
#ifdef CONFIG_LOGO_SUPERH_CLUT224
/* SuperH Linux logo */
logo = &logo_superh_clut224;
#endif
}
return logo;
}

__________________________________________________________________________


Nun können sie zurück in die Kernel-Konfiguration gehen und das neue Logo auswählen!

Quellcode

1
2
3
4
5
6
    Logo configuration->
        [*]Bootup logo                                       
        [ ] Standard black and white 
        [ ] Standard 16-color Linux logo                                                    
        [ ] Standard 224-color Linux logo                                                
        [*] Gentoo 224-color Linux logo


Nun kann endlich unser Kernel mit dem modifizierten Bootup Logo kompiliert und anschließend gebootet werden.

Quellcode

1
2
3
# make
# make modules_install
...


Wer das nicht kann sollte sich lieber mal dieses HowTo durchlesen oder sich mit dem genkernel Leitfaden auseinandersetzen! ;)
MfG MyD

4

14.03.2006, 06:12

3.0 Anlagen für dieses HowTo

Ich habe mal als Test folgende Grafiken die hier als Dateianhang sind verwendet!
MfG MyD

5

14.03.2006, 06:29

4.0 Bemerkungen & Quellen

Also ich DISTANZIERE mich hier nochmal ausdrücklich bei auftretenden Fehlern, Problemen, Gefahren etc.
Zudem weiss ich nicht ob es erlaubt ist dieses Bootup Logo zu ändern.
Deswegen ist jeder für sich selbst verantwortlich und trägt die vielleicht auftretenden Folgen!


Falls mir jemand nen Screenshot zaubern könnte mit einem geänderten Linux Bootup Logo wäre das echt super!


Vielleicht ist es euch bisher nicht aufgefallen - aber das hier ist das einzigste HowTo das es momentan dazu gibt -
die bisherigen sind alle für den 2.0.x - 2.4.x Kernel oder funktionieren überhaupt nicht mehr!
MfG MyD

6

30.07.2009, 10:46

Ich habe es gerade gestet und es funktioniert.
"Erst nachdem wir alles verloren haben, haben wir die Freiheit, alles zu tun."
"It's only after we've lost everything, that we're free to do anything!"

Jabber: Die ID kann via PN erfragt werden.

7

10.03.2010, 12:38

Hinweis für Kernel >=2.6.31.

Der Deklaration

Quellcode

1
extern const struct linux_logo  logo_gentoo_clut224;
steht ab nun in der Datei include/linux/linux_logo.h

Also:

Zitat

#ifndef _LINUX_LINUX_LOGO_H
#define _LINUX_LINUX_LOGO_H

/*
* Linux logo to be displayed on boot
*
* Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu)
* Copyright (C) 1996,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 2001 Greg Banks <gnb@alphalink.com.au>
* Copyright (C) 2001 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* Copyright (C) 2003 Geert Uytterhoeven <geert@linux-m68k.org>
*
* Serial_console ascii image can be any size,
* but should contain %s to display the version
*/

#include <linux/init.h>


#define LINUX_LOGO_MONO 1 /* monochrome black/white */
#define LINUX_LOGO_VGA16 2 /* 16 colors VGA text palette */
#define LINUX_LOGO_CLUT224 3 /* 224 colors */
#define LINUX_LOGO_GRAY256 4 /* 256 levels grayscale */


struct linux_logo {
int type; /* one of LINUX_LOGO_* */
unsigned int width;
unsigned int height;
unsigned int clutsize; /* LINUX_LOGO_CLUT224 only */
const unsigned char *clut; /* LINUX_LOGO_CLUT224 only */
const unsigned char *data;
};

extern const struct linux_logo logo_linux_mono;
extern const struct linux_logo logo_linux_vga16;
extern const struct linux_logo logo_linux_clut224;
extern const struct linux_logo logo_gentoo_clut224;
extern const struct linux_logo logo_blackfin_vga16;
extern const struct linux_logo logo_blackfin_clut224;
extern const struct linux_logo logo_dec_clut224;
extern const struct linux_logo logo_mac_clut224;
extern const struct linux_logo logo_parisc_clut224;
extern const struct linux_logo logo_sgi_clut224;
extern const struct linux_logo logo_sun_clut224;
extern const struct linux_logo logo_superh_mono;
extern const struct linux_logo logo_superh_vga16;
extern const struct linux_logo logo_superh_clut224;
extern const struct linux_logo logo_m32r_clut224;
extern const struct linux_logo logo_spe_clut224;

extern const struct linux_logo *fb_find_logo(int depth);
#ifdef CONFIG_FB_LOGO_EXTRA
extern void fb_append_extra_logo(const struct linux_logo *logo,
unsigned int n);
#else
static inline void fb_append_extra_logo(const struct linux_logo *logo,
unsigned int n)
{}
#endif

#endif /* _LINUX_LINUX_LOGO_H */


Dank @spooky_mulder der in http://www.gentooforum.de/post/130387/an…html#post130387 darauf hinweis.
http://www.dyle.org
IM-Account (Jabber!) sind auf meiner HP ...
There is no place like /home

http://www.gentooforum.de
http://www.gentoofreunde.org

<div>how to annoy a web developer?</span>

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »dyle« (11.03.2010, 09:27)