解析从uboot传过来的关于logo分区的一些参数,然后显示开机图标,进行顺时针及方向旋转
文件下载:
CONFIG_LOGO_LINUX_BMP=y
unsigned int xxxx_logo_width __read_mostly;
EXPORT_SYMBOL(xxxx_logo_width);
unsigned int xxxx_logo_height __read_mostly;
EXPORT_SYMBOL(xxxx_logo_height);
unsigned int xxxx_logo_addr __read_mostly;
EXPORT_SYMBOL(xxxx_logo_addr);
static void __init do_parse_xxxx_logo_param(void){
char * xxxxlogo = "xxxx.logo=";
char * ret = strstr(boot_command_line,xxxxlogo);
char str_logo[40] = {0};
char str_ignore[4] = {0};
xxxx_logo_width = 0;
xxxx_logo_height = 0;
xxxx_logo_addr = 0;
if(ret != NULL){
ret = ret + 9;
snprintf(str_logo,sizeof(str_logo),"%s",ret);
sscanf(str_logo,"%d,%d@%x%s",&xxxx_logo_width,&xxxx_logo_height,&xxxx_logo_addr,str_ignore);
}
}
void __init setup_arch(char **cmdline_p)
{
setup_processor();
setup_machine_fdt(__fdt_pointer);
init_mm.start_code = (unsigned long) _text;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = (unsigned long) _end;
*cmdline_p = boot_command_line;
do_parse_xxxx_logo_param();
config LOGO_LINUX_BMP
bool "Standard Linux BMP logo"
default y
extern unsigned int xxxx_logo_width ;
extern unsigned int xxxx_logo_height ;
extern unsigned int xxxx_logo_addr ;
static void fb_show_bmp_xxxx_logo_ccw(struct fb_info *info, int lWidth,int lHeight,phys_addr_t addr)
{
int i,m;
int x,y;
int needWidth = lWidth;
unsigned char *dst=info->screen_base;
unsigned char *src= (unsigned char*) phys_to_virt(addr);
实现旋转。
}
加QQ讨论 332086424