AnsweredAssumed Answered

u-boot-2015.04 logo problem

Question asked by fulin chen on Apr 21, 2016
Latest reply on Apr 22, 2016 by fulin chen

你好,

我准备移植最新版本的u-boot,现在u-boot已经可以跑起来了,如log所示:

U-Boot 2015.04-14469-gd3ef2ab-dirty (Apr 21 2016 - 01:50:53)

 

 

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz

CPU:   Temperature 24 C

Reset cause: POR

Board: MX6-SabreSD

I2C:   ready

DRAM:  3.8 GiB

MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3

No panel detected: default to Hannstar-XGA

Display: Hannstar-XGA (1024x768)

In:    serial

Out:   serial

Err:   serial

switch to partitions #0, OK

mmc0(part 0) is current device

Net:   Phy 1 not found

PHY reset timed out

FEC [PRIME]

Normal Boot

Hit any key to stop autoboot:  0

=>

我现在想实现u-boot启动logo,我们的board使用的是samsung的LTM230HL08屏,这是屏的资料:【三星液晶屏LTM230HL08概况】-全球液晶屏交易中心-屏库

下面这个是借口的电路图:

{6D77EBE8-250C-4340-ACE7-40F3488824BB}.png

现在我做的工作是在include/configs/mx6sabresd.h文件中:

94 #define CONFIG_SPLASH_SCREEN

95 #define CONFIG_CMD_BMP

96 #define CONFIG_LCD

97 /* #define CONFIG_MXC_EPDC */

98

99 /*

100  * SPLASH SCREEN Configs

101  */

102 #if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_MXC_EPDC)

103     /*

104      * Framebuffer and LCD

105      */

106     #define CONFIG_CMD_BMP

107     #define CONFIG_LCD

108     #define CONFIG_SYS_CONSOLE_IS_IN_ENV

109     #undef LCD_TEST_PATTERN

110     /* #define CONFIG_SPLASH_IS_IN_MMC          1 */

111     #define LCD_BPP                 LCD_MONOCHROME

112     /* #define CONFIG_SPLASH_SCREEN_ALIGN       1 */

113

114     #define CONFIG_WAVEFORM_BUF_SIZE        0x200000

115 #endif /* CONFIG_SPLASH_SCREEN && CONFIG_MXC_EPDC */

116

117 #endif                         /* __MX6QSABRESD_CONFIG_H */

打开了上面红色部分的宏,我是不是我是不是要打开CONFIG_MXC_EPDC宏呢,这个宏是干什么的。是不是只用打开CONFIG_SPLASH_SCREEN宏就可以了呢?因为在board/freescale/mx6sabresd/mx6sabresd.c文件中发现有好的定义了这个:

#if defined(CONFIG_MX6DL) && defined(CONFIG_MXC_EPDC)

vidinfo_t panel_info = {

.....

....

#endif

等于说要同事定义CONFIG_MX6DL宏才能用panel_info。如果我定义了上面的:

94 #define CONFIG_SPLASH_SCREEN

95 #define CONFIG_CMD_BMP

96 #define CONFIG_LCD

在编译的时候又会出现错误:

  LDS     u-boot.lds

  LD      u-boot

common/built-in.o: In function `lcd_get_size':

/home/fulinux/uboot-imx/common/lcd.c:138: undefined reference to `panel_info'

common/built-in.o: In function `lcd_clear':

/home/fulinux/uboot-imx/common/lcd.c:175: undefined reference to `lcd_setcolreg'

/home/fulinux/uboot-imx/common/lcd.c:176: undefined reference to `lcd_setcolreg'

/home/fulinux/uboot-imx/common/lcd.c:177: undefined reference to `lcd_setcolreg'

/home/fulinux/uboot-imx/common/lcd.c:178: undefined reference to `lcd_setcolreg'

/home/fulinux/uboot-imx/common/lcd.c:179: undefined reference to `lcd_setcolreg'

common/built-in.o:/home/fulinux/uboot-imx/common/lcd.c:180: more undefined references to `lcd_setcolreg' follow

common/built-in.o: In function `lcd_clear':

/home/fulinux/uboot-imx/common/lcd.c:227: undefined reference to `panel_info'

common/built-in.o: In function `lcd_init':

/home/fulinux/uboot-imx/common/lcd.c:252: undefined reference to `lcd_ctrl_init'

/home/fulinux/uboot-imx/common/lcd.c:268: undefined reference to `lcd_enable'

common/built-in.o: In function `lcd_set_cmap':

/home/fulinux/uboot-imx/common/lcd.c:566: undefined reference to `panel_info'

common/built-in.o: In function `lcd_display_bitmap':

/home/fulinux/uboot-imx/common/lcd.c:717: undefined reference to `panel_info'

 

我很好奇,在

struct display_info_t const displays[] = {{

762     .bus    = -1,

763     .addr   = 0,

764     .pixfmt = IPU_PIX_FMT_RGB666,

765     .detect = NULL,

766     .enable = enable_lvds,

767     .mode   = {

768         .name           = "Hannstar-XGA",

769         .refresh        = 60,

770         .xres           = 1024,

771         .yres           = 768,

772         .pixclock       = 15385,

773         .left_margin    = 220,

774         .right_margin   = 40,

775         .upper_margin   = 21,

776         .lower_margin   = 7,

777         .hsync_len      = 60,

778         .vsync_len      = 10,

779         .sync           = FB_SYNC_EXT,

780         .vmode          = FB_VMODE_NONINTERLACED

781 } }, {

结构体中定义了这些项,还需要panel_info,以及lcd的初始化吗?

目前displays结构体我还没有修改,在内核中这个设置是不是可以参考一下:

linux/drivers/video/mxc/ldb.c:

static struct fb_videomode ldb_modedb[] = {

107     { "WXGA", 60, 1680, 1048, 6848,//6848

108       280, 104, //280, 104

109       30, 3, //30, 3

110       176, 6,//176,6

111       FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,

112       FB_VMODE_NONINTERLACED,

113       FB_MODE_IS_DETAILED,},

114     {

115      "LDB-WXGA", 60, 1280, 800, 14065,

116      40, 40,

117      10, 3,

118      80, 10,

119      0,

120      FB_VMODE_NONINTERLACED,

121      FB_MODE_IS_DETAILED,},

122     {

123      "LDB-XGA", 60, 1024, 768, 15385,

。。。

 

我在board/freescale/mx6sabresd/mx6sabresd.c文件中发现了好的epdc关键字的函数,这个是什么,和我这个lvds屏有关系吗?

说的内容很乱,现在大脑也是很纠结。希望你们能提供一点指导下的建议和帮助,有没有什么参考下的文档呢。

期待你的回复。

Outcomes