玩 Gentoo 的人,一定會對Gentoo live CD 漂亮的畫面心怡不已,今天我們就來談談 Bootsplash 吧 要玩 bootsplash 之前,我們先要了解 framebuffer 什麼是framebuffer 呢? framebuffer 驅動影像卡進入圖形 mode ,以 圖形模式 模擬文字模式 在這種模式下,我們就可以在 console 下看圖,看電影,看中文。 可是呢,這只是看起來是文字模式,其實所有的東西都是用畫出來的。 而要一開機就進入這種模式,必定要 kernel 的支援,所以啦,要設定kernel 的config 。在這�塈琱ㄦ|提 framebuffer 和 bootsplash 在kernel 內的細結,只會談如何看 menuconfig 的設定檔。 在這,我們用 linux-2.6.7-gentoo-r14 使用 bootsplash-3.1.4-spock-0.1-r2-2.6.7.patch.bz2 用 make menuconfig 設定好: 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   和一些你想要的字型 這樣,就可以有framebuffer 了。 再來到 Bootsplash configuration -> 選擇 可惜的是,不一定能選,那怎麼辦呢? 到 /usr/src/linux/arch/i386/Kconfig 依著 menuconfig 的設定順序找到 source "drivers/Kconfig" 發現driver 的部分在於 driver Kconfig 下 所以就到了 /usr/src/linux/drivers/Kconfig 找 source "drivers/video/Kconfig" 再去 /usr/src/linux/drivers/video/Kconfig 發現了 代碼: if FB source "drivers/video/bootsplash/Kconfig" endif 再去 /usr/src/linux/drivers/video/bootsplash/Kconfig 終於找到了源頭了。 代碼: config BOOTSPLASH bool "Bootup splash screen" depends on FRAMEBUFFER_CONSOLE=y && (REGPARM=n || X86_64 || !X86) && BLK_DEV_INITRD=y && (!SPARC32) && (!SPARC64) default n ---help--- This option enables the Linux bootsplash screen. For more information on the bootsplash screen have a look at http://www.bootsplash.org/. If you are unsure, say N endmenu 喔~~~ 原來是要 FRAMEBUFFER_CONSOLE=y , (REGPARM=n || X86_64 || !X86), BLK_DEV_INITRD=y, (!SPARC32), 以及 (!SPARC64) 都要成立,才可以選 Bootsplash configuration 啊,BLK_DEV_INITRD 在 driver 的 block device �� 如此選好後,就可以 make 了 再去 lilo 或 grub 設定 bootsplash 而 bootsplash 的 initrd 檔的設定例子如下 代碼: splash -s -f /etc/bootsplash/gentoo/config/bootsplash-1024x768.cfg \ > /boot/initrd-1024x768 代碼: image=/boot/bzImage vga=0x317 root = /dev/hda3 label = gentoo read-only initrd=/boot/initrd-1024x768 append="video=vesafb:ywrap,mtrr splash=verbose" 代碼: image=/boot/bzImage vga=0x317 root = /dev/hda3 label = gentoo read-only initrd=/boot/initrd-1024x768 append="video=vesafb:ywrap,mtrr splash=verbose" image=/boot/bzImage vga=0x317 root = /dev/hda3 label = gentoo read-only initrd=/boot/initrd-1024x768 append="video=vesafb:ywrap,mtrr splash=verbose" >>這個似乎可以不用ㄝ 我用2.6.7的kernel可以成功\r 可是2.6.8之後的kernel我要patch才有選項 但沒有成功 看起來似乎RAMDISK initial 錯誤導致 已經放棄中