ARM-Linux(内核)修改开机启动logo

一、准备合适的logo图片(比如 logo.png),进入Linux主线目录下,下载netpbm,由其制作成ppm文件

   #cd <your_linux_dir>

   #sudo apt-get install netpbm

   #pngtopnm logo.png > logo_linux_clut2240.pnm

   #pnmquant 224 logo_linux_clut2240.pnm > logo_linux_clut2241.pnm

   #pnmtoplainpnm logo_linux_clut2241.pnm > logo_linux_clut224.ppm

 

二、 将生成的ppm文件替换驱动目录下的同名开机logo文件

   #cp -a logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm

  如logo尺寸较小,想要设置在屏幕居中显示:

        A、修改drivers/video/fbmem.c中两行代码为如下:

                     image.dx = info->var.xres/2 - image.width/2;   //image.dx=0;

                     image.dy = info->var.yres/2 - image.height/2;  //image.dy=y;

       B、修改driver/video/console/fbcon.c中fbcon_prepare_logo()函数中代码为如下:

                     logo_height = fb_preapare_logo(info, ops->rotate) +  info->var.yres/2 - logo_height/2;  //logo_height = fb_preapare_logo(info, ops->rotate);

 

三、修改内核配置参数

   #make ARCH=arm menuconfig

         使能 Device Drivers/Graphics support/Boot logo/Stardard 224-color Linux logo

         使能 Device Drivers/Graphics support/Console display driver support/Framebuffer Console support

 ;保存退出

 

四、重新编译内核,假设编译链为arm-linux-gnueabi-gcc

   #make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- 

 

ARM-Linux(内核)修改开机启动logo

上一篇:PRT(Precomputed Radiance Transfer)&球谐光照(Spherical Harmonic Lighting)


下一篇:球谐光照(Spherical Harmonics Lighting)