製作logo的方法:
首先選擇一個自己喜歡的圖片,然後通過GIMP軟體將該圖片儲存為.png格式,
變換方式這個就不說了(very easy),比如儲存為linuxlogo.png.
然後將該圖片傳入到裝有Linux PC比如(ubuntu),按照以下順序你就可以製作一個你喜歡logo
前提你必須安裝以下的工具(pngtopnm,pnmquant,pnmtoplainpnm)
$ pngtopnm linuxlogo.png > linuxlogo.pnm
$ pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
$ pnmtoplainpnm linuxlogo224.pnm > linuxlogo224.ppm
或者
$bmptoppm pic.bmp > temp1.ppm //產生ppm
$ppmquant 224 temp1.ppm > temp2.ppm //轉換成224顏色
$pnmnoraw temp2.ppm > logo.ppm //轉換成ascii格式
這樣您製作的logo就已經成功了,將linuxlogo224.ppm
拷貝到/drivers/video/logo檔案夾中的根據你的平台具體使用的哪個logo進行命名,
由與我用的是RedHat linux,所以我取的名字為logo_linux_clut224.ppm,友情提醒將原有的logo儲存。
這樣你的logo就完全製作好了,但是有這一點還是不夠的,你必須在核心中選擇logo,接下來我們來看如何配置核心
2、配置logo選項
在核心路徑下執行make menuconfig
開發板上開啟logo顯示的選項
Device Drivers --->Character devices ---》Bootup logo
a、選擇虛擬控制台為控制台顯示驅動做準備
Device Drivers --->Character devices ---> Virtual terminal
[*] Support for console on virtual terminal
b、選擇虛擬控制台顯示驅動
Device Drivers --->Graphics support --->下有這個選項Console display driver support --->
根據你的硬體選擇由Framebuffer還是VGA
[*] Framebuffer Console support或者
[*] VGA text console
c、Device Drivers --->Graphics support --->
<*> Support for frame buffer devices
<*> MXC Framebuffer support下選擇是VGA還是TVOUT
[*] tvout CH7024 on MX27 //TVOUT
[*]support VGA daughter //VGA
當然以上的配置選項,因平台而異會有些小的差別。
做好以上兩個步驟,你就可以重新編譯核心,將其燒到開發板,接VGA或者TVOUT顯示。
這樣你可以看到你自己製作的logo,你可以發現在logo的左上方有一個閃動的游標,接下來我們說說如何將這個游標去除。
3、如何將開機logo中的游標去除
在核心的目前的目錄進入到drivers/video/console/fbcon.c檔案
將static void fb_flashcursor(void *private)製成空函數如下
386 static void fb_flashcursor(void *private)
387 {
388 #if 0 //modify by yejj for clear cursor of lcdc
389 struct fb_info *info = private;
390 struct fbcon_ops *ops = info->fbcon_par;
391 struct display *p;
392 struct vc_data *vc = NULL;
393 int c;
394 int mode;
395
396 acquire_console_sem();
397 if (ops && ops->currcon != -1)
398 vc = vc_cons[ops->currcon].d;
399
400 if (!vc || !CON_IS_VISIBLE(vc) ||
401 registered_fb[con2fb_map[vc->vc_num]] != info ||
402 vc->vc_deccm != 1) {
403 release_console_sem();
404 return;
405 }
406
407 p = &fb_display[vc->vc_num];
408 c = scr_readw((u16 *) vc->vc_pos);
409 mode = (!ops->cursor_flash || ops->cursor_state.enable) ?
410 CM_ERASE : CM_DRAW;
411 ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1),
412 get_color(vc, info, c, 0));
413 release_console_sem();
414 #endif
415 }
同樣的方法將函數static void fbcon_cursor(struct vc_data *vc, int mode)用空函數替換如下
1304 static void fbcon_cursor(struct vc_data *vc, int mode)
1305 {
1306 #if 0 //modify by yejj for clear cursor of lcdc
1307 struct fb_info *info
另一種禁止游標的方法:
drivers/video/console/Makefile
#obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o font.o softcursor.oobj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o font.o編譯遇到一個soft_cursor沒有定義的問題問題,注釋代碼:drivers/video/console/bitblit.c//ABING// if (err)// soft_cursor(info, &cursor);