[嵌入式学习]开机全屏LOGO,去掉启动打印
本帖最后由 @allen 于 2014-9-1 20:40 编辑更多的基于cubieboard 的学习贴可搜:嵌入式学习
使用的3.4.79内核,ct-lubuntu-server 卡系统,ct nand 板子
1)制作logo的方法:
a. 使用gimp软件
1、打开自己LOGO图片,在image/mode/indexed..中修改最大颜色数为224
2、保存为ppm格式,选择asiic存放格式
3、代替logo目录下相应图形即可
b.linux 工具(pngtopnm,pnmquant,pnmtoplainpnm)
$pngtopnm linuxlogo.png > linuxlogo.pnm
$pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
$pnmtoplainpnm linuxlogo224.pnm > linuxlogo224.ppm
或者
$bmptoppm pic.bmp > temp1.ppm //生成ppm
$ppmquant 224 temp1.ppm > temp2.ppm//转换成224颜色
$pnmnoraw temp2.ppm > logo.ppm //转换成ascii格式
我用gimp,linux 工具没试过,命令不知道正不正确
2)配置logo选项在内核路径下执行make menuconfig
开发板上开启logo显示的选项
a、选择虚拟控制台显示驱动
Device Drivers --->Graphicssupport --->下有
选项Console display driver support---> <*>Framebuffer console support
选项 Bootup logo ---><*> Standart 224-color linux logo
一般都选上了,可以跳过这部分
3)修改文件
1.重命名自己的LOGO文件 为 logo_linux_clut224.ppm ,拷贝到 drivers/video/logo/logo_linux_clut224.ppm ,最好备份原来的
2.
a. 如果只想在左上角显示LOGO,已经做完成了,重新编译内核,丢到板子启动应该能看到LOGO。看不到LOGO的情况是图片格式不是224 ,图片太大了
b. 如果想全屏显示LOGO,
则修改diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index a01317c..6a5999b 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
if (fb_get_color_depth(&info->var, &info->fix) == 1)
erase &= ~0x400;
logo_height = fb_prepare_logo(info, ops->rotate);
+ logo_height += (info->var.yres / 2) - (logo_height / 2);
logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height);
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 5641a22..5163c50 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -493,11 +493,14 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
fb_set_logo(info, logo, logo_new, fb_logo.depth);
}
- image.dx = 0;
- image.dy = y;
image.width = logo->width;
image.height = logo->height;
+ image.dx = (info->var.xres / 2) - (image.width / 2);
+ image.dy = (info->var.yres / 2) - (image.height / 2);
+
if (rotate) {
logo_rotate = kmalloc(logo->width *
logo->height, GFP_KERNEL);
3)去掉启动打印
添加console=null 到第一分区的nEvn.txt
注意改了后,串口会用不了
附件是我 ppm格式的LOGO
最后说下linux 企鹅 LOGO,内核启动会依据检测到cpu核心显示企鹅,A10会显示一只企鹅 ,A20会显示两只企鹅,八核就能看到八只企鹅
非常有用。收藏了
请问去掉启动打印的命令路径是怎样的? 为啥我配置内核后 编译在烧录 A20就不启动了呢 我按照下面的方法设置就不启动了,串口打印到sunxi_rtc_gettime(34): err, losc_err_flag is 1 就停止了
Device Drivers --->Graphicssupport --->下有
选项Console display driver support---> <*>Framebuffer console support
选项 Bootup logo ---><*> Standart 224-color linux logo
以下是串口打印信息
Starting kernel ...
aw_pm_init: not support super standby.
aw_pm_init: script_parser_fetch err.
notice: ir_wakeup = 0.
can't get item for emac_power gpio !
rtc_hw_init(416) err: set clksrc to external losc failed! rtc time will be wrong
sunxi_rtc_gettime(34): err, losc_err_flag is 1 学习了,我使用的是
$pngtopnm linuxlogo.png > linuxlogo.pnm
$pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
$pnmtoplainpnm linuxlogo224.pnm > linuxlogo224.ppm
base bootcmd=run setargs_nand boot_normal
bootcmd set setargs_nand
key 0
recovery key high 6, low 4
cant find fstbt value
to be run cmd=run setargs_nand boot_normal
the user data'magic is bad
WORK_MODE_BOOT
sunxi_bmp_display
WORK_MODE_BOOT
[ 0.847]Hit any key to stop autoboot:0
read boot or recovery all
[ 1.395]sunxi flash read :offset 4000000, 13273337 bytes OK
[ 1.403]ready to boot
NAND_UbootExit
NB1 : NAND_LogicExit
[ 1.406]
Starting kernel ...
aw_pm_init: not support super standby.
can't get item for emac_power gpio !
打印,卡在这里了:dizzy:
求助!
页:
[1]