android系统开发小问题-启动过程中android字符没有显示出来

来源:互联网 发布:发饰品牌 知乎 编辑:程序博客网 时间:2024/05/22 07:34

android目标平台可以正常启动,但是启动过程中的android字符没有显示出来,这个是linux内核配置的问题
打开内核framebuffer控制台即可。
(1)make menuconifg后选择Device Drivers->Graphics support->Console display driver support->Framebuffer Console support
然后打开相关的几个配置选项即可。
(2)直接修改内核配置文件,如下:
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_FONT_6x11=y
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
(3)android启动过程中的android字符显示在源代码的system/core/init.c中,如下:
    if( load_565rle_image(INIT_IMAGE_FILE) ) {
    fd = open("/dev/tty0", O_WRONLY);
    if (fd >= 0) {
        const char *msg;
            msg = "/n"
        "/n"
        "/n"
        "/n"
        "/n"
        "/n"
        "/n"  // console is 40 cols x 30 lines
        "/n"
        "/n"
        "/n"
        "/n"
        "/n"
        "/n"
        "/n"
        "             A N D R O I D ";
        write(fd, msg, strlen(msg));
        close(fd);
    }
    }

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/jiajie961/archive/2010/11/11/6002215.aspx

原创粉丝点击