uboot启动时默认选择LCD屏幕显示

imx6的uboot启动时默认选择LCD屏幕显示
首先我们需要改/uboot/board/freescale/mx6sabresd/mx6sabresd.c文件,如图所示:
修改如下部分:
struct display_info_t const displays[] = {{

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = enable_lvds,
.mode    = {
    .name           = "Hannstar-XGA",
    .refresh        = 60,
    .xres           = 1920,
    .yres           = 1080,
    .pixclock       = 6734,
    .left_margin    = 90,
    .right_margin   = 50,
    .upper_margin   = 30,
    .lower_margin   = 6,
    .hsync_len      = 24,
    .vsync_len      = 3,
    .sync           = FB_SYNC_EXT,
    .vmode          = FB_VMODE_NONINTERLACED

} }, {

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = do_enable_hdmi,
.mode    = {
    .name           = "HDMI",
    .refresh        = 60,
    .xres           = 640,
    .yres           = 480,
    .pixclock       = 39721,
    .left_margin    = 48,
    .right_margin   = 16,
    .upper_margin   = 33,
    .lower_margin   = 10,
    .hsync_len      = 96,
    .vsync_len      = 2,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} }, {

.bus    = 0,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = enable_rgb,
.mode    = {
    .name           = "SEIKO-WVGA",
    .refresh        = 60,
    .xres           = 800,
    .yres           = 480,
    .pixclock       = 29850,
    .left_margin    = 89,
    .right_margin   = 164,
    .upper_margin   = 23,
    .lower_margin   = 10,
    .hsync_len      = 10,
    .vsync_len      = 10,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} } };
size_t display_count = ARRAY_SIZE(displays);

修改完成后如下图所示:

struct display_info_t const displays[] = {{

.bus    = 0,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = enable_rgb,
.mode    = {
    .name           = "CLAA-WVGA",
    .refresh        = 57,
    .xres           = 800,
    .yres           = 480,
    .pixclock       = 37037,
    .left_margin    = 40,
    .right_margin   = 60,
    .upper_margin   = 10,
    .lower_margin   = 10,
    .hsync_len      = 20,
    .vsync_len      = 10,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} },{

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB666,
.detect    = NULL,
.enable    = enable_lvds,
.mode    = {
    .name           = "Hannstar-XGA",
    .refresh        = 60,
    .xres           = 1024,
    .yres           = 768,
    .pixclock       = 15385,
    .left_margin    = 220,
    .right_margin   = 40,
    .upper_margin   = 21,
    .lower_margin   = 7,
    .hsync_len      = 60,
    .vsync_len      = 10,
    .sync           = FB_SYNC_EXT,
    .vmode          = FB_VMODE_NONINTERLACED

} }, {

.bus    = -1,
.addr    = 0,
.pixfmt    = IPU_PIX_FMT_RGB24,
.detect    = NULL,
.enable    = do_enable_hdmi,
.mode    = {
    .name           = "HDMI",
    .refresh        = 60,
    .xres           = 640,
    .yres           = 480,
    .pixclock       = 39721,
    .left_margin    = 48,
    .right_margin   = 16,
    .upper_margin   = 33,
    .lower_margin   = 10,
    .hsync_len      = 96,
    .vsync_len      = 2,
    .sync           = 0,
    .vmode          = FB_VMODE_NONINTERLACED

} } };
size_t display_count = ARRAY_SIZE(displays);

你可能感兴趣的:(android)