Hi ,everybody
我用的 是 imx6q uboot 版本是 uboot-imx-imx_v2009.08_3.0.35_4.1.0
我公司现在采购了一块lvds屏 单8 的 即 是24 位的 ,分辨率为1024*768
现在的问题是,内核logo显示正常,uboot logo 显示不正常,帮忙支持一下,谢谢。
我的具体操作如下
图片信息如下
按照规格书得出以下信息
HSPW =70
HBPD =160 -70 = 90
HFPD = 160
VSPW 10
VBPD = 23 -10 =13
VFPD = 15
内核logo 显示正常,ubootlogo 显示不正常
具体如下
修改了 uboot
第一处 board/freescale/mx6q_sabresd/mx6q_sabresd.c
static struct fb_videomode lvds_xga = {
93 "XGA", 60, 1024, 768, 15385, 90, 160, 13, 15, 70, 10, // 修改成了以上得出的结果
94 FB_SYNC_EXT,
95 FB_VMODE_NONINTERLACED,
96 0,
97 };
第二处:
ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB24, //原来是rgb666
DI_PCLK_LDB, 65000000);
if (ret)
puts("LCD cannot be configured\n");
修改启动bootargs
bootargs_base=setenv bootargs console=ttymxc0,115200 video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24
显示如下
修改内核:
1,
board-myimx6ek200.c
….
static struct ipuv3_fb_platform_data sabresd_fb_data[] = {
{
.disp_dev = "ldb",
1792 .interface_pix_fmt = IPU_PIX_FMT_RGB24,
1793 .mode_str = "LDB-XGA",
1794 //.default_bpp = 16,
1795 .default_bpp = 32,
1796 .int_clk = false,
1797 {
……..
2,修改 linux-2.6-imx-imx_3.0.35_4.1.0/drivers/video/mxc/ldb.c
中
106 static struct fb_videomode ldb_modedb[] = {
107 {
108 //"LDB-WXGA", 60, 1280, 800, 14065,
109 "LDB-WXGA", 60, 1024,768 , 15385,
110 //40, 40,
111 90, 160,
112 13, 15,
113 //21, 7,
114 70, 10,
115 0,
116 FB_VMODE_NONINTERLACED,
117 FB_MODE_IS_DETAILED,},
118 {
119 "LDB-XGA", 60, 1024, 768, 15385,
120 90, 160,
121 13, 15,
122 70, 10,
123 0,
124 FB_VMODE_NONINTERLACED, //修改
125 FB_MODE_IS_DETAILED,},
内核logo 显示正常
请问该如果修改uboot logo 正常显示 我已经研究2天了还是没有找到解决的方法
我改了一下几个参数还是没有解决,
#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE | |||||||
#define LCD_BPP | LCD_COLOR16 | ||||||
#define CONFIG_BMP_8BPP |
已解决! 转到解答。
Hi zhilin,
You can refer to the thread Patch to support uboot logo keep from uboot to kernel for NXP Linux and Android BSP (HDMI, LCD and L... in our community.
Have a great day,
Dan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
HI,Dan Wang ,补丁我打好了,我改如何显示我的图片呢,现在uboot 显示图片为,现在我不知道如何是好。感觉都没有调
用
setup_splash_image () 这个函数
在 mx6q_sabreauto.c 中 代码如下
............................
#ifdef CONFIG_SPLASH_SCREEN
void setup_splash_image(void)
{
char *s;
ulong addr;
s = getenv("splashimage");
if (s != NULL) {
addr = simple_strtoul(s, NULL, 16);
#if defined(CONFIG_ARCH_MMU)
addr = ioremap_nocache(iomem_to_phys(addr),
fsl_bmp_600x400_size);
#endif
memcpy((char *)addr, (char *)fsl_bmp_600x400,
fsl_bmp_600x400_size);
}
}
#endif
....................
在 patch 中 并没有定义 CONFIG_SPLASH_SCREEN
--- a/include/configs/mx6q_sabresd.h
+++ b/include/configs/mx6q_sabresd.h
@@ -324,7 +324,7 @@
#define CONFIG_ENV_IS_NOWHERE 1
#endif
-#define CONFIG_SPLASH_SCREEN
+//#define CONFIG_SPLASH_SCREEN
#ifdef CONFIG_SPLASH_SCREEN
我也尝试自己定义了 CONFIG_SPLASH_SCREEN 但是显示效果还是一样。
我的配置文件定义如下
.......................
#ifndef CONFIG_SPLASH_SCREEN_myadd
373 #define CONFIG_UBOOT_LOGO_ENABLE
374
375 #ifdef CONFIG_UBOOT_LOGO_ENABLE
376
377
378
379
380 #define CONFIG_VIDEO_MX5 // my modify add
381
382 #define CONFIG_LCD // my add
383 #define CONFIG_CMD_BMP
384 #define CONFIG_SPLASH_SCREEN //my add
385
386
387 // Select one of the output mode
388 // #define IPU_OUTPUT_MODE_HDMI
389 #define IPU_OUTPUT_MODE_LVDS
390 // #define IPU_OUTPUT_MODE_LCD
391
.................................
帮忙支持一下,我改如何是好 谢谢!
Hi Zhilin,
In the script there is the flash screen define:
+#ifndef CONFIG_SPLASH_SCREEN
+#define CONFIG_UBOOT_LOGO_ENABLE
Here you need to modify the script adapt to your board design. Include the board name and configuration. About the u-boot logo you mentioned you can refer to the script you have download, there are .bmp files you can see, and in the script you can also see the
+#ifdef IPU_OUTPUT_MODE_LCD
......................
HDMI, LCD and LVDS different resolution mode. Here recommend you to read the script again.
Have a great day,
Dan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
HI 补充一下, readme 文档,是写到 sd 的,那如果我想写的emmc 那又怎么写呢,uboot 和 和kernel 做如何修改。
dd the logo bmp file to SD card address 0x600000 and skip the 54 bytes bmp file header.
1080P HDMI:
sudo dd if=logo_1920x1080_32bpp.bmp of=/dev/sdc bs=1 seek=6291456 skip=54
1024x768 LVDS:
sudo dd if=logo_1024x768_24bpp.bmp of=/dev/sdc bs=1 seek=6291456 skip=54
800x480 LCD:
sudo dd if=logo_800x480_24bpp.bmp of=/dev/sdc bs=1 seek=6291456 skip=54
Hi Zhilin,
The default download in the patch is to the SD card. About the emmc you can download by mfgtool, but you need to modify and configure the uxl file yourself. Here recommend you to download to SD card as our patch given.
Hope it can help you.
Best Regards
Dan
Hi Zhilin,
About how to download it to emmc I have confirmed for you. You can reference to file "ucl2.xml" in MFGTool, there is example for how to use dd to burn the image files from PC to eMMC.
Have a great day,
Dan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi ,Dan Wang
我补充一下,我发现了个bug ,下面我详细阐述一下
为我研究了很久,用排除法(内心是奔溃的) 发现这个和uboot的 bootargs 传送给内核的参数有关系,
当bootargs 的 video mode 设置为
"video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24 ,bpp=16" 或者
"video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24,bpp=16 fb0base=0x27b00000 "
内核起来后,在文件系统运行Qt程序(强调,和qt程序没有关系,qt是好的)
发现都是正常的 显示如下,光滑正常不会出现晕色 且左右也不会出现抖动。
但是重点来了
同样的uboot, 同样的内核,同样的文件系统,同样的qt 应用
当bootargs 的 video mode 设置为
"video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24,bpp=16 fb0base=0x27b00000 fbmem=28M"
即,里面包含有 fbmem=28M 这个参数是,会出现于杂色和晕色,而已,图片会出现轻微的左右抖动。严重的影响了用户体验
不能理解出现左右抖动的原因。我一直没有找到解决的办法。
在
board-mx6q_sabresd.c 我找到了对应的代码 uboot 传递给内核参数的处理函数
static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags,
2263 char **cmdline, struct meminfo *mi)
2264 {
2265 #ifdef CONFIG_MX6_CLK_FOR_BOOTUI_TRANS
2266 char *str;
2267 struct tag *t;
2268 int i = 0;
2269 struct ipuv3_fb_platform_data *pdata_fb = sabresd_fb_data;
2270
2271 for_each_tag(t, tags) {
2272 if (t->hdr.tag == ATAG_CMDLINE) {
2273 str = t->u.cmdline.cmdline;
2274 str = strstr(str, "fbmem=");
2275 if (str != NULL) {
2276 str += 6;
2277 pdata_fb[i++].res_size[0] = memparse(str, &str);
2278 while (*str == ',' &&
2279 i < ARRAY_SIZE(sabresd_fb_data)) {
2280 str++;
2281 pdata_fb[i++].res_size[0] = memparse(str, &str);
2282 }
2283 }
2284 /* Primary framebuffer base address */
2285 str = t->u.cmdline.cmdline;
2286 str = strstr(str, "fb0base=");
2287 if (str != NULL) {
2288 str += 8;
2289 pdata_fb[0].res_base[0] =
2290 simple_strtol(str, &str, 16);
2291 }
2292 break;
2293 }
2294 }
2295 #endif
Have a good time
Huang
Hi Zhilin,
About the command you mentioned "video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24 ,bpp=16" and
"video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24,bpp=16 fb0base=0x27b00000 ".
The "video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24 ,bpp=16" is used for linux BSP and "video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24,bpp=16 fb0base=0x27b00000 " is for andorid BSP.
Have a nice day
Dan
Hi ,Dan Wang
非常感谢!
我打的补丁是L3.0.35_4.1.0_uboot_logo_keep_patch_2013-11-22.zip
我解压出来看到有个readme 文档
是按照里面的方法操作的。
按照您的意思的,如果linux系统 uoboot logo 是不能一直显示到内核结束了。
因为设置video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24 ,bpp=16 后 内核会重新初始化ipu,uboot 过度到kernel 是会黑屏的 但是显示正常。
那这么解决这个问题呢,我想保持一个logo不变一直显示到内核结束
下个这个参数是可以 但是,运行qt后 会左右抖动。 纠结啊。难道没有办法了吗
video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24,bpp=16 fb0base=0x27b00000
我看到readme 里面描述有介绍
1. Description
1) Support HDMI, LVDS and LCD output in UBoot.
2) Support UBoot logo keep from uboot to Linux rootfs. // 它的意思也是一直显示到rootfs 啊
3) For HDMI, both 720P and 1080P mode were supported.
4) For LVDS, 1024x768 and 1080P dual channel panels were supported.
5) The logo file can be a 32/24/16 bpp bmp file.
我搞这个都搞了2个礼拜了。。。。。。。
Have a good time
Huang
你好,之前就是按照了你说的这种方法,可能每个开发板不一样、,我修改了一些其他的配置,让显示rgb 是正常的。图片如下,but ,我想显示的是一张图片logo,我改做如何修改。
显示 红 绿蓝的代码 如下,
1011 #ifdef CONFIG_UBOOT_LOGO_ENABLE
1012 unsigned int size = DISPLAY_WIDTH * DISPLAY_HEIGHT * (DISPLAY_BPP / 8);
1013 unsigned char * pData;
1014 unsigned int start, count;
1015 int i, bmpReady = 0;
1016 int mmc_dev = get_mmc_env_devno();
1017 struct mmc *mmc = find_mmc_device(mmc_dev);
1018
1019 pData = (unsigned char *)CONFIG_FB_BASE;
1020 // memcpy((char *)pData, (char *)myzr_bmp_logo, \
1021 myzr_bmp_logo_size);
1022
1023
1024 if (mmc) {
1025 if (mmc_init(mmc) == 0) {
1026 start = ALIGN(UBOOT_LOGO_BMP_ADDR, mmc->read_bl_len) / mmc->read_bl_len;
1027 count = ALIGN(size, mmc->read_bl_len) / mmc->read_bl_len;
1028 mmc->block_dev.block_read(mmc_dev, start, count, pData); //这里面是图片的数据吗 ??????????????????????????????????????? 如果我要显示一张图片我改如何做呢,谢谢Dan Wang ,Do you help me ?
1029 bmpReady = 1;
1030 }
1031 }
1032
1033 if (bmpReady == 0) { // 这里是显示 红绿蓝的图片
1034 // Fill RGB frame buffer
1035 // Red
1036 for (i = 0; i < (DISPLAY_WIDTH * DISPLAY_HEIGHT * (DISPLAY_BPP / 8) / 3); i += (DISPLAY_BPP / 8)) {
1037 #if (DISPLAY_BPP == 16)
1038 pData[i + 0] = 0x00;
1039 pData[i + 1] = 0xF8;
1040 #else
1041 pData[i + 0] = 0x00;
1042 pData[i + 1] = 0x00;
1043 pData[i + 2] = 0xFF;
1044 #endif
1045 }
1046
1047 // Green
1048 for (; i < (DISPLAY_WIDTH * DISPLAY_HEIGHT * (DISPLAY_BPP / 8) / 3) * 2; i += (DISPLAY_BPP / 8)) {
1049 #if (DISPLAY_BPP == 16)
1050 pData[i + 0] = 0xE0;
1051 pData[i + 1] = 0x07;
1052 #else
1053 pData[i + 0] = 0x00;
1054 pData[i + 1] = 0xFF;
1055 pData[i + 2] = 0x00;
1056 #endif
Hi Zhilin,
You can read again the patch and all the reply under the thread Patch to support uboot logo keep from uboot to kernel for NXP Linux and Android BSP (HDMI, LCD and L... . And you'd better check your setting on your screen.
Have a nice day
Dan
Hi Zhilin,
In the readme document you can see the introduction on the logo file:
The logo file can be a 32/24/16 bpp bmp file, and you can see the logo bmp file in the patch directory. You can generate your logo file to the format, then modify the information about the logo file in the patch.
For the logo picture display you can refer to the following section of the patch:
+#ifndef CONFIG_SPLASH_SCREEN
+#define CONFIG_UBOOT_LOGO_ENABLE
+
+#ifdef CONFIG_UBOOT_LOGO_ENABLE
+ // Select one of the output mode
+ #define IPU_OUTPUT_MODE_HDMI
+// #define IPU_OUTPUT_MODE_LVDS
+// #define IPU_OUTPUT_MODE_LCD
+
+ #define CONFIG_FB_BASE (TEXT_BASE + 0x300000)
+ #define UBOOT_LOGO_BMP_ADDR 0x00600000
+
+ #define CONFIG_IMX_PWM
+ #define IMX_PWM1_BASE PWM1_BASE_ADDR
+ #define IMX_PWM2_BASE PWM2_BASE_ADDR
+
+#ifdef IPU_OUTPUT_MODE_HDMI
+/*
+ // For HDMI, 1280*720 resolution
+ #define DISPLAY_WIDTH 1280
+ #define DISPLAY_HEIGHT 720
+ #define DISPLAY_BPP 32
+ #define DISPLAY_IF_BPP 24 // RGB24 interface
+
+ #define DISPLAY_HSYNC_START 220
+ #define DISPLAY_HSYNC_END 110
+ #define DISPLAY_HSYNC_WIDTH 40
+
+ #define DISPLAY_VSYNC_START 20
+ #define DISPLAY_VSYNC_END 5
+ #define DISPLAY_VSYNC_WIDTH 5
+
+ #define DISPLAY_PIX_CLOCK 74250000 //(DISPLAY_HSYNC_START + DISPLAY_HSYNC_END + DISPLAY_HSYNC_WIDTH + DISPLAY_WIDTH) * (DISPLAY_VSYNC_START + DISPLAY_VSYNC_END + DISPLAY_VSYNC_WIDTH + DISPLAY_HEIGHT) * refresh rate (60Hz)
..........
Best Regards
Dan
操作