imx8mp uboot logo display on boot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx8mp uboot logo display on boot

跳至解决方案
2,149 次查看
jemish_1990
Contributor V

Hi All,

We are using imx8mp based product. In which I can display logo on uboot using "bmp" utility available at u-boot but I want to display this logo without using any utility, we want to do that via code.

In imx8mq based product we used to do that using './drivers/video/cfb_console.c' 

It was following Uboot

VERSION = 2018
PATCHLEVEL = 03
SUBLEVEL =

But I didn't find similar file imx8mp uboot. I tried to search but didn't find alternate file in imx8mp uboot. Currently it's :

VERSION = 2023
PATCHLEVEL = 04
SUBLEVEL =

Any pointers or suggestion will be appreciated.  

Thanks,

Jemish

0 项奖励
回复
1 解答
2,028 次查看
jemish_1990
Contributor V

Hi Salas,

I modified uboot code as following and with that changes it works fine now. I am putting code as reference that may help to others. We can close this thread as of now.

diff --git a/common/splash.c b/common/splash.c
index 245ff680eb..106261fd21 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -160,10 +160,13 @@ void splash_display_banner(void)
#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP)
int splash_display(void)
{
- ulong addr;
+ ulong addr = CONFIG_SYS_LOAD_ADDR;
char *s;
int x = 0, y = 0, ret;

+#if defined(CONFIG_LOGO_FROM_BITMAP)
+ memcpy((char*)addr, bmp_logo_bitmap, sizeof(bmp_logo_bitmap));
+#else
s = env_get("splashimage");
if (!s)
return -EINVAL;
@@ -174,7 +177,8 @@ int splash_display(void)
return ret;

splash_get_pos(&x, &y);
-
+#endif
+ splash_get_pos(&x, &y);
ret = bmp_display(addr, x, y);

/* Skip banner output on video console if the logo is not at 0,0 */
diff --git a/configs/imx8mp_liveuboard_defconfig b/configs/imx8mp_liveuboard_defconfig
index b80abdf2e5..143339fbfa 100644
--- a/configs/imx8mp_liveuboard_defconfig
+++ b/configs/imx8mp_liveuboard_defconfig
@@ -183,6 +183,7 @@ CONFIG_BMP_24BPP=y
CONFIG_BMP_32BPP=y
CONFIG_IMX8M_BLK_CTRL=y
CONFIG_VIDEO_LOGO=y
+CONFIG_LOGO_FROM_BITMAP=y
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_LCD_HIMAX_HX8399C=y
CONFIG_VIDEO_IMX_SEC_DSI=y
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 5962db1ed0..cbe93fb9d0 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -20,6 +20,7 @@ config VIDEO_LOGO
bool "Show the U-Boot logo on the display"
default y if !SPLASH_SCREEN
select VIDEO_BMP_RLE8
+ select LOGO_FROM_BITMAP
help
This enables showing the U-Boot logo on the display when a video
device is probed. It appears at the top right. The logo itself is at
@@ -959,6 +960,12 @@ config VIDEO_BMP_RLE8
If this option is set, the 8-bit RLE compressed BMP images

在原帖中查看解决方案

3 回复数
2,029 次查看
jemish_1990
Contributor V

Hi Salas,

I modified uboot code as following and with that changes it works fine now. I am putting code as reference that may help to others. We can close this thread as of now.

diff --git a/common/splash.c b/common/splash.c
index 245ff680eb..106261fd21 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -160,10 +160,13 @@ void splash_display_banner(void)
#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP)
int splash_display(void)
{
- ulong addr;
+ ulong addr = CONFIG_SYS_LOAD_ADDR;
char *s;
int x = 0, y = 0, ret;

+#if defined(CONFIG_LOGO_FROM_BITMAP)
+ memcpy((char*)addr, bmp_logo_bitmap, sizeof(bmp_logo_bitmap));
+#else
s = env_get("splashimage");
if (!s)
return -EINVAL;
@@ -174,7 +177,8 @@ int splash_display(void)
return ret;

splash_get_pos(&x, &y);
-
+#endif
+ splash_get_pos(&x, &y);
ret = bmp_display(addr, x, y);

/* Skip banner output on video console if the logo is not at 0,0 */
diff --git a/configs/imx8mp_liveuboard_defconfig b/configs/imx8mp_liveuboard_defconfig
index b80abdf2e5..143339fbfa 100644
--- a/configs/imx8mp_liveuboard_defconfig
+++ b/configs/imx8mp_liveuboard_defconfig
@@ -183,6 +183,7 @@ CONFIG_BMP_24BPP=y
CONFIG_BMP_32BPP=y
CONFIG_IMX8M_BLK_CTRL=y
CONFIG_VIDEO_LOGO=y
+CONFIG_LOGO_FROM_BITMAP=y
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_LCD_HIMAX_HX8399C=y
CONFIG_VIDEO_IMX_SEC_DSI=y
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 5962db1ed0..cbe93fb9d0 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -20,6 +20,7 @@ config VIDEO_LOGO
bool "Show the U-Boot logo on the display"
default y if !SPLASH_SCREEN
select VIDEO_BMP_RLE8
+ select LOGO_FROM_BITMAP
help
This enables showing the U-Boot logo on the display when a video
device is probed. It appears at the top right. The logo itself is at
@@ -959,6 +960,12 @@ config VIDEO_BMP_RLE8
If this option is set, the 8-bit RLE compressed BMP images

2,124 次查看
jemish_1990
Contributor V

Hi All,

I also like to update that I put logo file with board name /tools/logo directory with bmp extension.

<uboot_dir>/tools/logo/<board_name.bmp>

while compiling it also generate required files:

tools/bmp_logo --gen-info ./tools/logos/imx8mp_liveuboard.bmp > include/bmp_logo.h
tools/bmp_logo --gen-bmp ./tools/logos/imx8mp_liveuboard.bmp > include/bmp_logo_data.h

But seems like no file is using this information to display logo on uboot. While I can display same logo using bmp utility. It's strange.

Can anyone help me regarding this?

Thanks,

Jemish

0 项奖励
回复
2,103 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @jemish_1990 

I hope you are doing very well.

 

You can take this as reference:
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Patch-to-support-uboot-logo-keep-from-ub...

 

Best regards,

Salas.

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2080888%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimx8mp%20uboot%20%E5%BC%80%E6%9C%BA%E6%98%BE%E7%A4%BAlogo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2080888%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E4%BB%AC%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E5%9F%BA%E4%BA%8E%20imx8mp%20%E7%9A%84%E4%BA%A7%E5%93%81%E3%80%82%E6%88%91%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%20u-boot%20%E4%B8%8A%E5%8F%AF%E7%94%A8%E7%9A%84%E2%80%9Cbmp%E2%80%9D%E5%AE%9E%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9C%A8%20uboot%20%E4%B8%8A%E6%98%BE%E7%A4%BA%E5%BE%BD%E6%A0%87%EF%BC%8C%E4%BD%86%E6%88%91%E6%83%B3%E5%9C%A8%E4%B8%8D%E4%BD%BF%E7%94%A8%E4%BB%BB%E4%BD%95%E5%AE%9E%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%E6%98%BE%E7%A4%BA%E6%AD%A4%E5%BE%BD%E6%A0%87%EF%BC%8C%E6%88%91%E4%BB%AC%E6%83%B3%E9%80%9A%E8%BF%87%E4%BB%A3%E7%A0%81%E6%9D%A5%E5%AE%9E%E7%8E%B0%E3%80%82%3C%2FP%3E%3CP%3E%E5%9C%A8%E5%9F%BA%E4%BA%8E%20imx8mq%20%E7%9A%84%E4%BA%A7%E5%93%81%E4%B8%AD%EF%BC%8C%E6%88%91%E4%BB%AC%E6%9B%BE%E7%BB%8F%E4%BD%BF%E7%94%A8%E2%80%9C.%2Fdrivers%2Fvideo%2Fcfb_console.c%E2%80%9D%E6%9D%A5%E5%AE%9E%E7%8E%B0%E8%BF%99%E4%B8%80%E7%82%B9%3C%2FP%3E%3CP%3E%E5%AE%83%E6%AD%A3%E5%9C%A8%E9%81%B5%E5%BE%AAUboot%3C%2FP%3E%3CP%3E%E7%89%88%E6%9C%AC%20%3D%202018%3CBR%20%2F%3E%E8%A1%A5%E4%B8%81%E7%BA%A7%E5%88%AB%20%3D%2003%3CBR%20%2F%3E%E5%AD%90%E7%BA%A7%E5%88%AB%20%3D%3C%2FP%3E%3CP%3E%E4%BD%86%E6%98%AF%E6%88%91%E6%B2%A1%E6%9C%89%E6%89%BE%E5%88%B0%E7%B1%BB%E4%BC%BC%E7%9A%84%E6%96%87%E4%BB%B6imx8mp%20uboot%E3%80%82%E6%88%91%E5%B0%9D%E8%AF%95%E6%90%9C%E7%B4%A2%EF%BC%8C%E4%BD%86%E6%B2%A1%E6%9C%89%E5%9C%A8%20imx8mp%20uboot%20%E4%B8%AD%E6%89%BE%E5%88%B0%E6%9B%BF%E4%BB%A3%E6%96%87%E4%BB%B6%E3%80%82%E7%9B%AE%E5%89%8D%E6%98%AF%EF%BC%9A%3C%2FP%3E%3CP%3E%E7%89%88%E6%9C%AC%20%3D%202023%3CBR%20%2F%3E%E8%A1%A5%E4%B8%81%E7%BA%A7%E5%88%AB%20%3D%2004%3CBR%20%2F%3E%E5%AD%90%E7%BA%A7%E5%88%AB%20%3D%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9C%89%E4%BB%BB%E4%BD%95%E6%8C%87%E7%82%B9%E6%88%96%E5%BB%BA%E8%AE%AE%EF%BC%8C%E6%88%91%E4%BB%AC%E5%B0%86%E4%B8%8D%E8%83%9C%E6%84%9F%E6%BF%80%E3%80%82%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%3CP%3E%E7%8A%B9%E5%A4%AA%E6%95%99%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081711%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9Aimx8mp%20uboot%20%E5%90%AF%E5%8A%A8%E6%97%B6%E6%98%BE%E7%A4%BA%E5%BE%BD%E6%A0%87%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081711%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E8%BF%98%E6%83%B3%E6%9B%B4%E6%96%B0%E4%B8%80%E4%B8%8B%EF%BC%8C%E6%88%91%E5%B0%86%E5%B8%A6%E6%9C%89%E6%9D%BF%E5%90%8D%20%2Ftools%2Flogo%20%E7%9B%AE%E5%BD%95%E7%9A%84%E5%BE%BD%E6%A0%87%E6%96%87%E4%BB%B6%E6%94%BE%E5%9C%A8%E5%B8%A6%E6%9C%89%20bmp%20%E6%89%A9%E5%B1%95%E5%90%8D%E7%9A%84%E7%9B%AE%E5%BD%95%E4%B8%AD%E3%80%82%3C%2FP%3E%3CP%3E%3CUBOOT_DIR%3E%2Ftools%2Flogo%2F%3CBOARD_NAME.BMP%3E%3C%2FBOARD_NAME.BMP%3E%3C%2FUBOOT_DIR%3E%3C%2FP%3E%3CP%3E%E7%BC%96%E8%AF%91%E6%97%B6%E8%BF%98%E4%BC%9A%E7%94%9F%E6%88%90%E6%89%80%E9%9C%80%E7%9A%84%E6%96%87%E4%BB%B6%EF%BC%9A%3C%2FP%3E%3CP%3E%E5%B7%A5%E5%85%B7%2Fbmp_logo%20--gen-info%20.%2Ftools%2Flogos%2Fimx8mp_liveuboard.bmp%20%26gt%3B%20include%2Fbmp_logo.h%3CBR%20%2F%3E%E5%B7%A5%E5%85%B7%2Fbmp_logo%20--gen-bmp%20.%2Ftools%2Flogos%2Fimx8mp_liveuboard.bmp%20%26gt%3B%20include%2Fbmp_logo_data.h%3C%2FP%3E%3CP%3E%E4%BD%86%E4%BC%BC%E4%B9%8E%E6%B2%A1%E6%9C%89%E6%96%87%E4%BB%B6%E4%BD%BF%E7%94%A8%E6%AD%A4%E4%BF%A1%E6%81%AF%E5%9C%A8%20uboot%20%E4%B8%8A%E6%98%BE%E7%A4%BA%E5%BE%BD%E6%A0%87%E3%80%82%E8%99%BD%E7%84%B6%E6%88%91%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%20bmp%20%E5%AE%9E%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%98%BE%E7%A4%BA%E7%9B%B8%E5%90%8C%E7%9A%84%E5%BE%BD%E6%A0%87%E3%80%82%E8%BF%99%E5%BE%88%E5%A5%87%E6%80%AA%E3%80%82%3C%2FP%3E%3CP%3E%E6%9C%89%E4%BA%BA%E8%83%BD%E5%B8%AE%E6%88%91%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%E5%90%97%EF%BC%9F%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%3CP%3E%E7%8A%B9%E5%A4%AA%E6%95%99%3C%2FP%3E%3C%2FLINGO-BODY%3E