修改linux内核logo

/opt/s5pv210/kernel/drivers/video/logo

我用的是GIMP把PNG图片改成224色保存(打开GIMP,选图片,画像-模式-索引-224色—保存—ASCII,OK)

在到存放图片目录执行

pngtopnm default_wallpaper.png >logo_linux_clut224.pnm
pnmtoplainpnm logo_linux_clut224.pnm > logo_linux_clut224.ppm

将logo_linux_clut224.ppm放到linux-2.6.29/drivers/video/logo,
删除logo_linux_clut224.c和logo_linux_clut224.o
然后make zImage就可以了.

linux-2.6.29/drivers/video/fbmem.c
fb_do_show_logo函数:
 393 static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
 394                 int rotate, unsigned int num)
 395 {
 396     unsigned int x;
 397
 398     int xoff,yoff;
 399     xoff=(info->var.xres - num*fb_logo.logo->width+8)>>1;
 400     yoff=(info->var.yres - num*fb_logo.logo->height+8)>>1;
 401
 402     if (rotate == FB_ROTATE_UR) {
 403         for (x = 0;
 404              x < num && image->dx + image->width <= info->var.xres;
 405              x++) {
 406             image->dx = xoff;
 407             image->dy = yoff;
 408             info->fbops->fb_imageblit(info, image);
 409             image->dy += image->height + 8;
上述修改后有可能不能显示,解决办法修改显示logo的高度。
drivers/video/console/fbcon.c
fbcon_prepare_logo函数:
修改logo_height = fb_prepare_logo(info, ops->rotate);
logo_height = fb_prepare_logo(info, ops->rotate)+200;

你可能感兴趣的:(linux,职场,kernel,休闲)