1.首先制作替换的图片
步骤如下:
①将png图片转成pnm
pngtopnm linux_logo.png > linux_logo.pnm
②将pnm图片的颜色数限制在224色
pnmquant 224 linux_logo.pnm > logo_clut224.pnm
③将pnm图片转换成我们需要的ppm
pnmtoplainpnm logo_clut224.pnm > logo_clut224.ppm
2.进入内核源码目录/opt/EmbedSky/TQIMX6/kernel_imx/drivers/video/logo把对应的*.ppm替换掉logo_linux_clut224.ppm:
eg:
- #cp logo_linux_clut224.ppm logo_linux_clut224.ppm_backup
- #cp XXXX.ppm logo_linux_clut224.ppm
复制代码 3.删除:
- #rm logo_linux_clut224.c
- #rm logo_linux_clut224.o
复制代码 4.修改文件:kernel_imx/drivers/video/console/fbcon.c
fbcon_prepare_logo函数:580行附近: if (fb_get_color_depth(&info->var, &info->fix)== 1) erase &= ~0x400; logo_height = fb_prepare_logo(info, ops->rotate); //logo_lines = DIV_ROUND_UP(logo_height,vc->vc_font.height); logo_lines =(logo_height)/vc->vc_font.height; //增加这行!
q = (unsigned short *) (vc->vc_origin + 修改完成重新编译内核烧写zImage即可看到企鹅变成自定义图片。
|