|
前段时间见到论坛里有这个话题,好象搞的人不多,今天有时间,发一篇文章,希望广大debian人自己动手,DIY出精美的开机画面。
以下参考 http://www.bootsplash.org/kernel.html:
一、打内核补丁并编译内核
以内核2.4.20为例,假设内核源文件安装在/usr/src/linux/。下载bootsplash 3.07(地址:ftp://ftp.suse.com/pub/people/st ... 2.4.20-vanilla.diff ),然后:
- yourbox:~ # cd /usr/src/linux
- yourbox:/usr/src/linux # patch -p1 < /path/to/bootsplash-3.0.7-2.4.20-vanilla.diff
- patching file drivers/char/console.c
- patching file drivers/char/keyboard.c
- patching file drivers/char/n_tty.c
- patching file drivers/video/Config.in
- patching file drivers/video/Makefile
- patching file drivers/video/fbcon-jpegdec.c
- patching file drivers/video/fbcon-jpegdec.h
- patching file drivers/video/fbcon-splash.c
- patching file drivers/video/fbcon-splash.h
- patching file drivers/video/fbcon-splash16.c
- patching file drivers/video/fbcon.c
- patching file include/video/fbcon.h
- patching file kernel/panic.c
- yourbox:/usr/src/linux #
复制代码
配置内核,如make menuconfig或make xconfig,在"Console drivers" -> "Frame-Buffer support" 选择 "VESA VGA graphics console" 或其他与你的显卡相应的驱动。打开 "Use splash screen instead of boot logo". 在 "Block Devices"中打开"Initial Ramdisk support",保存配置并编译内核,将生成的内核拷到/boot 下,并修改lilo或grub的配置文件以使用新的内核来启动。
二、加入图片
下载并安装splash工具:ftp://ftp.suse.com/pub/people/st ... splashutils.tar.bz2
- # cd ~/splash
- # tar xvjf splashutils.tar.bz2
- splashutils/
- splashutils/Makefile
- splashutils/splash.c
- [..]
- splashutils/ChangeLog
- splashutils/COPYING
- # cd splashutils
- # make splash
- gcc -Os -Wall -c -o splash.o splash.c
- gcc -Os -Wall -o splash splash.o
- strip splash
- # cp splash /sbin/
- # cd ..
复制代码
将图片及相关的信息加入到initrd中去:
- /sbin/splash -s -f /etc/bootsplash/themes/yourtheme/config/bootsplash-1024x768.cfg >> /boot/initrd.splash
复制代码
图片等可以从http://www.bootsplash.org/themes.html 下载
三、运行lilo更新配置文件(grub就不用更新了),重新启动,如果一切正常,就可以看到启动画面了。同时会有这样一些信息:
- vesafb: framebuffer at 0xf0000000, mapped to 0xdc816000, size 65472k
- vesafb: mode is 1024x768x16, linelength=2048, pages=41
- vesafb: protected mode interface info at c000:5137
- vesafb: scrolling: redraw
- vesafb: directcolor: size=0:5:6:5, shift=0:11:5:0
- Looking for splash picture.... silenjpeg size 11165 bytes, found (1024x768, 4912 bytes, v3)
- Got silent jpeg.
复制代码
如果不幸你失败了,请将启动时的这些信息贴出来以便debug。 |
|