636
716
2082
初级工程师
{ p = getenv("bootsystem"); if (NULL == p) { printf("*** Warning use default bootsystem:android ***\n"); p = "android"; setenv("bootsystem", (char *)p); saveenv(); } printf("Boot system :%s\n", p); if(!strcmp(p, "android")) { boot_system_flags = 0; } else if(!strcmp(p, "qt")) { boot_system_flags = 1; } else if(!strcmp(p, "ubuntu")) { boot_system_flags = 2; } p = getenv("lcdtype"); if (NULL == p) { printf("*** Warning use default lcdtype:9.7 ***\n"); p = "9.7"; setenv("lcdtype", (char *)p); saveenv(); } printf("LCD type:%s\n", p); if(!strcmp(p, "9.7")) { lcd_type = 0; //sprintf(displayArgs, "video=mxcfb0:dev=ldb,LDB-XGA,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=30M"); sprintf(displayArgs, "video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666,bpp=32 ldb=sin1 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off fbmem=48M"); } else if(!strcmp(p, "7.0")) { lcd_type = 1; //sprintf(displayArgs, "video=mxcfb0:dev=ldb,LDB-7inch,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=30M"); sprintf(displayArgs, "video=mxcfb0:dev=ldb,LDB-7inch,if=RGB666,bpp=32 ldb=sin1 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off fbmem=48M"); } else if(!strcmp(p, "4.3")) { lcd_type = 2; //sprintf(displayArgs, "video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=10M"); sprintf(displayArgs, "video=mxcfb0:dev=lcd,VGA_480272,if=RGB24,bpp=32 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off fbmem=48M"); } /* add by cym 20170814 */ else if(!strcmp(p, "1024x600")) { lcd_type = 3; //sprintf(displayArgs, "video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=10M"); sprintf(displayArgs, "video=mxcfb0:dev=lcd,VGA_1024600,if=RGB24,bpp=32 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off fbmem=48M"); } /* end add */ else if(!strcmp(p, "hdmi")) { sprintf(displayArgs, "video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=48M"); } else { sprintf(displayArgs, "video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=10M"); } if(0 == boot_system_flags)//Android { sprintf(bootargs, "console=ttymxc2,115200 init=/init %s vmalloc=400M androidboot.console=ttymxc2 androidboot.hardware=freescale androidboot.serialno=1a0d39d4e3013411", displayArgs); // setenv("bootargs", bootargs); // sprintf(bootargs, "console=NULL init=/init %s vmalloc=400M androidboot.console=NULL androidboot.hardware=freescale androidboot.serialno=1a0d39d4e3013411", displayArgs); setenv("bootargs", bootargs); p = getenv("bootcmd"); if((p == NULL) || (strstr(p, "booti mmc3")) || (strstr(p, "mmc dev 3; mmc read 0x10800000 0x800 0x3000; bootm"))) { setenv("bootcmd", "booti mmc3"); } } else if(1 == boot_system_flags)//QT { sprintf(bootargs, "console=ttymxc0,115200 %s root=/dev/mmcblk0p1 rootwait", displayArgs); setenv("bootargs", bootargs); p = getenv("bootcmd"); if((p == NULL) || (strstr(p, "booti mmc3")) || (strstr(p, "mmc dev 3; mmc read 0x10800000 0x800 0x3000; bootm"))) { setenv("bootcmd", "mmc dev 3; mmc read 0x10800000 0x800 0x3000; bootm"); } } else if(2 == boot_system_flags)//Ubuntu { sprintf(bootargs, "console=ttymxc0,115200 %s root=/dev/mmcblk0p1 rootwait bootsystem=%s", displayArgs, getenv("bootsystem")); setenv("bootargs", bootargs); p = getenv("bootcmd"); if((p == NULL) || (strstr(p, "booti mmc3")) || (strstr(p, "mmc dev 3; mmc read 0x10800000 0x800 0x3000; bootm"))) { setenv("bootcmd", "mmc dev 3; mmc read 0x10800000 0x800 0x3000; bootm"); } } }
使用特权
发表回复 本版积分规则 回帖后跳转到最后一页
1
扫码关注 21ic 官方微信
扫码关注嵌入式微处理器
扫码关注21ic项目外包
扫码关注21ic视频号
扫码关注21ic抖音号
本站介绍 | 申请友情链接 | 欢迎投稿 | 隐私声明 | 广告业务 | 网站地图 | 联系我们 | 诚聘英才 | 论坛帮助
京公网安备 11010802024343号