imx8mp uboot logo display on boot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8mp uboot logo display on boot

ソリューションへジャンプ
2,159件の閲覧回数
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,038件の閲覧回数
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,039件の閲覧回数
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,134件の閲覧回数
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,113件の閲覧回数
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%3E%E8%B5%B7%E5%8B%95%E6%99%82%E3%81%ABimx8mp%20uboot%E3%81%AE%E3%83%AD%E3%82%B4%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2080888%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%81%E7%9A%86%E3%81%95%E3%82%93%E3%80%82%3C%2FP%3E%3CP%3Eimx8mp%E3%83%99%E3%83%BC%E3%82%B9%E3%81%AE%E8%A3%BD%E5%93%81%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82u-boot%E3%81%A7%E5%88%A9%E7%94%A8%E5%8F%AF%E8%83%BD%E3%81%AA%E3%80%8Cbmp%E3%80%8D%E3%83%A6%E3%83%BC%E3%83%86%E3%82%A3%E3%83%AA%E3%83%86%E3%82%A3%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6uboot%E3%81%AB%E3%83%AD%E3%82%B4%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%83%A6%E3%83%BC%E3%83%86%E3%82%A3%E3%83%AA%E3%83%86%E3%82%A3%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%9B%E3%81%9A%E3%81%AB%E3%81%93%E3%81%AE%E3%83%AD%E3%82%B4%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%97%E3%81%9F%E3%81%84%E3%81%AE%E3%81%A7%E3%80%81%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E4%BB%8B%E3%81%97%E3%81%A6%E3%81%9D%E3%82%8C%E3%82%92%E8%A1%8C%E3%81%84%E3%81%9F%E3%81%84%E3%81%A8%E8%80%83%E3%81%88%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3Eimx8mq%E3%83%99%E3%83%BC%E3%82%B9%E3%81%AE%E8%A3%BD%E5%93%81%E3%81%A7%E3%81%AF%E3%80%81%E3%80%8C%E3%80%8D%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%9D%E3%82%8C%E3%82%92%E8%A1%8C%E3%81%A3%E3%81%A6%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%2F%E3%83%89%E3%83%A9%E3%82%A4%E3%83%90%E3%83%BC%2F%E3%83%93%E3%83%87%E3%82%AA%2Fcfb_console.c%20'%3C%2FP%3E%3CP%3EUboot%E3%82%92%E3%83%95%E3%82%A9%E3%83%AD%E3%83%BC%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%3C%2FP%3E%3CP%3E%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%20%3D%202018%20%3CBR%20%2F%3E%20%E3%83%91%E3%83%83%E3%83%81%E3%83%AC%E3%83%99%E3%83%AB%20%3D%2003%20%3CBR%20%2F%3E%20%E3%82%B5%E3%83%96%E3%83%AC%E3%83%99%E3%83%AB%20%3D%3C%2FP%3E%3CP%3E%E3%81%97%E3%81%8B%E3%81%97%E3%80%81imx8mp%20uboot%E3%81%AB%E4%BC%BC%E3%81%9F%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AF%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%E6%A4%9C%E7%B4%A2%E3%81%97%E3%82%88%E3%81%86%E3%81%A8%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81imx8mp%20uboot%E3%81%AB%E4%BB%A3%E6%9B%BF%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%8C%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%E7%8F%BE%E5%9C%A8%E3%81%AF%EF%BC%9A%3C%2FP%3E%3CP%3E%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%20%3D%202023%20%3CBR%20%2F%3E%20%E3%83%91%E3%83%83%E3%83%81%E3%83%AC%E3%83%99%E3%83%AB%20%3D%2004%20%E3%82%B5%E3%83%96%E3%83%AC%E3%83%99%E3%83%AB%20%3D%20%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%E3%81%A9%E3%82%93%E3%81%AA%E6%8C%87%E9%87%9D%E3%82%84%E6%8F%90%E6%A1%88%E3%82%82%E3%81%84%E3%81%9F%E3%81%A0%E3%81%91%E3%82%8C%E3%81%B0%E5%B9%B8%E3%81%84%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%E3%82%B8%E3%82%A7%E3%83%9F%E3%83%83%E3%82%B7%E3%83%A5%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081711%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%E8%B5%B7%E5%8B%95%E6%99%82%E3%81%ABimx8mp%20uboot%E3%81%AE%E3%83%AD%E3%82%B4%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081711%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%81%E7%9A%86%E3%81%95%E3%82%93%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%BE%E3%81%9F%E3%80%81%E3%83%AD%E3%82%B4%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E3%83%9C%E3%83%BC%E3%83%89%E5%90%8D%2Ftools%2Flogo%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%ABbmp%E6%8B%A1%E5%BC%B5%E5%AD%90%E3%82%92%E4%BB%98%E3%81%91%E3%81%A6%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%82%82%E6%9B%B4%E6%96%B0%E3%81%99%E3%82%8B%E3%81%AE%E3%81%8C%E5%A5%BD%E3%81%8D%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CUBOOT_DIR%3E%20%2Ftools%2Flogo%2F%20%3CBOARD_NAME.BMP%3E%3C%2FBOARD_NAME.BMP%3E%3C%2FUBOOT_DIR%3E%3C%2FP%3E%3CP%3E%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E4%B8%AD%E3%81%AB%E5%BF%85%E8%A6%81%E3%81%AA%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%82%E7%94%9F%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%83%84%E3%83%BC%E3%83%AB%2Fbmp_logo--gen-info%E3%80%82%2Ftools%2Flogos%2Fimx8mp_liveuboard.bmp%20%26gt%3B%20include%2Fbmp_logo.h%20%3CBR%20%2F%3E%E3%83%84%E3%83%BC%E3%83%AB%2Fbmp_logo--gen-bmp%E3%80%82%2Ftools%2Flogos%2Fimx8mp_liveuboard.bmp%20%26gt%3B%20include%2Fbmp_logo_data.h%3C%2FP%3E%3CP%3E%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E3%81%93%E3%81%AE%E6%83%85%E5%A0%B1%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6uboot%E3%81%AB%E3%83%AD%E3%82%B4%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AF%E3%81%AA%E3%81%84%E3%82%88%E3%81%86%E3%81%A7%E3%81%99%E3%80%82bmp%E3%83%A6%E3%83%BC%E3%83%86%E3%82%A3%E3%83%AA%E3%83%86%E3%82%A3%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E5%90%8C%E3%81%98%E3%83%AD%E3%82%B4%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AF%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%81%8C%E3%80%82%E3%81%9D%E3%82%8C%E3%81%AF%E5%A5%87%E5%A6%99%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E8%AA%B0%E3%81%8B%E3%81%8C%E3%81%93%E3%82%8C%E3%81%AB%E9%96%A2%E3%81%97%E3%81%A6%E7%A7%81%E3%82%92%E5%8A%A9%E3%81%91%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%E3%82%B8%E3%82%A7%E3%83%9F%E3%83%83%E3%82%B7%E3%83%A5%3C%2FP%3E%3C%2FLINGO-BODY%3E