浙林龙哥

   :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

HOWTO FB

GOT Wiki - 文件開發資源站

目錄 [隱藏]

簡介

不知道大家有沒有看過 Fedora Core 的開機畫面?它與 Gentoo 的純文字畫面不同,反倒跟 M$ Wind0ws 有點類似,一個全螢幕的圖片外加一個開機進度的顯示條。 這個 HOWTO 的目的就是要教大家如何把自已的 Gentoo 改成也有美美的開機畫面,愛現族也可以好好的現一下了 (像我一樣 :P)。

畫面抓圖

  • Self Portrait (http://dhruba.codewordt.co.uk/images/2.6-bs.jpg) (Kernel 2.6.4)

已修正過的核心

這裡列出所有已加入 (我試過的) 修正的核心: 2.6.9 nitro-sources

設定

下面的設定教學以在 2.6.9-rc3-nitro2 下試過沒問題,所以我們也先以該核心當範例: 先是更新你的 Portage:

emerge sync

再來安裝 splashutils 套件 (讓 Console 以圖片當背景):

emerge splashutils

更新你的設定檔:

etc-update

更新核心

為了讓核心支援這些功能,我們必需加入新的設定然後重新編譯系統核心,下面的範例還是以 ck-sources 為主 (因為 ck-sources 已經加入此功能的修正,某些其它的核心仍然需要手動進行更新修正才能使用此功能。

使用 menuconfig 設定核心:

cd /usr/src/linux
make mrproper
make menuconfig

請確定下列選項已被選取:

Code maturity level options  --->
    [*] Prompt for development and/or incomplete code/drivers
Processor type and features  --->
    [*] MTRR (Memory Type Range Register) support
Device Drivers  --->
    Block devices  --->
        <*> Loopback device support
        <*> RAM disk support
        (4096) Default RAM disk size
        [*]   Initial RAM disk (initrd) support
    Graphics support  --->
    [*] Support for frame buffer devices
    [*]   VESA VGA graphics support
           VESA driver type (vesafb) --->
    [*]   Support for the framebuffer splash
        Console display driver support  --->
        [*]   Video mode selection support
        <*> Framebuffer Console support
        Bootsplash configuration  --->


注意! 請勿選取下列的選項,不然可能會導至畫面不正常:

Device Drivers  --->
    Graphics support  --->
            < >   nVidia Riva support  (do not enable!)
        Logo configuration  --->
            [ ] Bootup logo  (do not enable!)


如果你仍然有遇到問題,也請取消選取下面的選項:

Device Drivers  --->
    Character devices  --->
        < > /dev/agpgart (AGP Support)

And add the following line to your /etc/X11/XF86Config[-4] file.

Option          "NvAGP"         "1"


編譯你的核心:

make && make modules_install

安裝你新的核心,安裝完後請先不要卸載 boot 分割區:

mount /boot
mv /boot/bzImage /boot/bzImage.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/


假設你的 /boot 已經載入,設定會在開機時顯示在 Console 的圖片:

/sbin/splash -s -f /etc/bootsplash/default/config/bootsplash-1280x1024.cfg > /boot/initrd-1280x1024

或是直接套用附在 bootsplash 套件裡的 initrd 圖片檔:

cp /usr/share/bootsplash/initrd-1280x1024 /boot/

編輯你的 /boot/grub/grub.conf 檔案,我們在下面提供一些範例讓你做個參考。 各參數的說明:

video= 放在與 kernel 同一行,用來控制顯示選項如:ywrap 和 mtrr 等等,它們是用來加速在 framebuffer 下的畫面更新速度。
vga= 放在與 kernel 同一行,用來控制 framebuffer 的解析度以及色彩品質。
splash= 放在與 kernel 同一行,它可以使用「silent」或是「verbose」參數,但「silent」有時候會無效。
initrd= 放在 kernel 下面的一行,用來設定開機時要顯示的圖片。


default 0
timeout 10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
# With both framebuffer and bootsplash
title=Gentoo GNU/Linux 1.4 (+fb +splash)
root=(hd0,0)
kernel=(hd0,0)/boot/bzImage root=/dev/hda3 video=vesafb:ywrap,mtrr vga=0x31A splash=silent
initrd=(hd0,0)/boot/initrd-1280x1024
# With framebuffer but without bootsplash
title=Gentoo GNU/Linux 1.4 (+fb -splash)
root=(hd0,0)
kernel=(hd0,0)/boot/bzImage root=/dev/hda3 video=vesafb:ywrap,mtrr vga=0x31A
# Without both framebuffer and bootsplash
title=Gentoo GNU/Linux 1.4 (-fb -splash)
root=(hd0,0)
kernel=(hd0,0)/boot/bzImage root=/dev/hda3

下面的列表為可以放置於「VGA=」參數的值:

顏色      640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
--------+--------------------------------------------------------------
4 bits |  ?  ? 0x302  ?  ?  ?  ?
8 bits | 0x300 0x301 0x303 0x305 0x161 0x307 0x31C
15 bits |  ? 0x310 0x313 0x316 0x162 0x319 0x31D
16 bits |  ? 0x311 0x314 0x317 0x163 0x31A 0x31E
24 bits |  ? 0x312 0x315 0x318  ? 0x31B 0x31F
32 bits |  ?  ?  ?  ? 0x164  ?

註:32-bit 的畫面模式並不支援 bootsplash 圖型。

如果你想要更詳細的資訊,這裡我們建議你參考下面的說明文件:

  • /usr/src/linux/Documentation/fb/vesafb.txt
  • /usr/src/linux/Documentation/svga.txt

將 splash 放到 default 的 run level,這樣每次開機便會自動執行:

rc-update add splash default

設定使用 framebuffer 但不使用 splash!

如果你只想要使用 framebuffer(可以顯示更多的字在畫面上)而不想要用 splash 的話,將 splash 從你的 default run level 中移除再重開機:

rc-update del bootsplash default

刪掉或是註解 grub.conf 裡的這行:

initrd=/boot/initrd-1280x1024


在 framebuffer 設定使用比較小的字型!

編輯你的 /etc/rc.conf 然後修改下面的設定:

CONSOLEFONT="default8x9"

你可以參考下面的目錄來找個你喜歡的字型:

/usr/share/consolefonts

參考來源

(本翻譯文章與原始文件有些許不同)

翻譯人員

  • [Rick Lan (http://wiki.gentoo.org.tw/index.php/%E7%94%A8%E6%88%B6:Eternity)]
posted on 2005-04-22 22:19  浙林龙哥  阅读(914)  评论(0编辑  收藏  举报