linux 製作logo的方法

來源:互聯網
上載者:User

製作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);

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.