1.修改kernel/drivers/video/fbmem.c
int fb_show_logo(struct fb_info *info, int rotate)
{
#ifdef TRUE_COLOR
fb_show_truecolor_logo(info);
return 1;
#else
int y;
y = fb_show_logo_line(info, rotate, fb_logo.logo, 0,
num_online_cpus());
y = fb_show_extra_logos(info, y, rotate);
return y;
#endif
void fb_show_truecolor_logo(struct fb_info *info)
{
unsigned int i = 0,j=0,tmp;
unsigned char pixel[4];
tmp = ((info->var.yres)*(info->var.xres))*4-((info->var.xres)*4)*i;
for(m=0;m<((info->var.xres)*4);m+=4)
{
pixel[0] = truecolor_logo_data[tmp+m+2];
pixel[1] = truecolor_logo_data[tmp+m+3];
pixel[2] = truecolor_logo_data[tmp+m+0];
pixel[3] = truecolor_logo_data[tmp+m+1];
*(addr+(j++)) = pixel[0];
*(addr+(j++)) = pixel[1];
*(addr+(j++)) = pixel[2];
*(addr+(j++)) = pixel[3];
}
int fb_show_logo(struct fb_info *info, int rotate)
{
#ifdef TRUE_COLOR
fb_show_truecolor_logo(info);
return 1;
#else
int y;
y = fb_show_logo_line(info, rotate, fb_logo.logo, 0,
num_online_cpus());
y = fb_show_extra_logos(info, y, rotate);
return y;
#endif
void fb_show_truecolor_logo(struct fb_info *info)
{
unsigned int i = 0,j=0,tmp;
unsigned char pixel[4];
unsigned char* addr = (unsigned char*)info->screen_base;
tmp = ((info->var.yres)*(info->var.xres))*4-((info->var.xres)*4)*i;
for(m=0;m<((info->var.xres)*4);m+=4)
{
pixel[0] = truecolor_logo_data[tmp+m+2];
pixel[1] = truecolor_logo_data[tmp+m+3];
pixel[2] = truecolor_logo_data[tmp+m+0];
pixel[3] = truecolor_logo_data[tmp+m+1];
*(addr+(j++)) = pixel[0];
*(addr+(j++)) = pixel[1];
*(addr+(j++)) = pixel[2];
*(addr+(j++)) = pixel[3];
}
}
}