Page 1 of 1

Boot/Splash logo change

Posted: Wed Feb 19, 2020 1:25 pm
by Moud_Sanchez
Hey guys,

Can someone point me in the right direction on how to the OGA boot/splash screen?
Replace the image in SPI Flash?

Re: Boot/Splash logo change

Posted: Wed Feb 19, 2020 1:53 pm
by mad_ady
See the flash layout here: https://wiki.odroid.com/odroid_go_advan ... ery_spirom
Try extracting the hardkernel logo.gz with dd. Get file properties with mediainfo to see resolution + bit depth. Create your own bmp, gzip it, check the size (so it fits in its slot) and flash it with dd.

Re: Boot/Splash logo change

Posted: Wed Feb 19, 2020 2:05 pm
by joy
Hi.
If you want to change only booting LOGO image, you don't need to update SPI flash,
but just copy a bmp image in vfat folder of SD card with name "logo.bmp". ;)

In u-boot logic, a display driver finds (1) logo.bmp in vfat folder of SD card
and then, (2) read a logo section of SPI Flash if there is no available image in sd card.

Please note the image size should be 320x480 (portrait one) and bmp format.
Here is a reference sample, logo_hardkernel.bmp.
https://github.com/hardkernel/u-boot/tr ... hardkernel

Re: Boot/Splash logo change

Posted: Wed Feb 19, 2020 2:56 pm
by mad_ady
Thanks joy, I wasn't aware uboot was so flexible. :)

Re: Boot/Splash logo change

Posted: Wed Feb 19, 2020 3:27 pm
by joy
Hi @mad_ady,
Your guide is also available for OGA users who want to mount their LOGO image in SPI flash permanently. :)
I will make a wiki page this week including two methods.
Thanks!

Re: Boot/Splash logo change

Posted: Wed Feb 19, 2020 11:52 pm
by Moud_Sanchez
Thanks guys!

I'll give it a shot when I get home :)

Re: Boot/Splash logo change

Posted: Thu Feb 20, 2020 1:08 pm
by Moud_Sanchez
joy wrote:
Wed Feb 19, 2020 2:05 pm
Hi.
If you want to change only booting LOGO image, you don't need to update SPI flash,
but just copy a bmp image in vfat folder of SD card with name "logo.bmp". ;)
Hi @Joy, I just tried it and the image does appear but the OS doesn't load. I'm wondering if the issue is due to bmp specs.
W320 x H480
24bit

Also, I tried copying the sample bmp from: https://github.com/hardkernel/u-boot/tr ... hardkernel and get the same result.

This is where it hangs:
Image

Re: Boot/Splash logo change

Posted: Thu Feb 20, 2020 3:36 pm
by joy
Moud_Sanchez wrote:
Thu Feb 20, 2020 1:08 pm
Hi @Joy, I just tried it and the image does appear but the OS doesn't load. I'm wondering if the issue is due to bmp specs.
W320 x H480
24bit

Also, I tried copying the sample bmp from: https://github.com/hardkernel/u-boot/tr ... hardkernel and get the same result.
Hi @Moud_Sanchez,
I can reproduce the same issue with the latest OS image. :o
I will check it and fix it soon.
Could you wait for a couple of days?

So sorry for the inconvenience.

Re: Boot/Splash logo change

Posted: Thu Feb 20, 2020 3:36 pm
by maker_gamer
Hi @Joy, when you update the wiki, please include how to enable the standard linux boot messages -- as in the above picture. (I like having the HK logo on SPI boot. It's cool.) But Ubuntu splash hides important details. Removing the "quiet splash" from BOOT's boot.ini simply blanks the Ubuntu startup logo still no messages. In most linux distros, that would stop suppressing boot messages.

Thanks in advance. MG

Re: Boot/Splash logo change

Posted: Thu Feb 20, 2020 4:14 pm
by joy
maker_gamer wrote:
Thu Feb 20, 2020 3:36 pm
Hi @Joy, when you update the wiki, please include how to enable the standard linux boot messages -- as in the above picture. (I like having the HK logo on SPI boot. It's cool.) But Ubuntu splash hides important details. Removing the "quiet splash" from BOOT's boot.ini simply blanks the Ubuntu startup logo still no messages. In most linux distros, that would stop suppressing boot messages.

Thanks in advance. MG
Hi @maker_gamer,
OK. I see well.
I will add the section in a new wiki page.
Thank you for the valuable comment.

Re: Boot/Splash logo change

Posted: Thu Feb 20, 2020 5:07 pm
by odroid
Please note that the Kernel boot log display may slow down the booting time a couple of seconds.

Re: Boot/Splash logo change

Posted: Thu Feb 20, 2020 10:01 pm
by Etx
Try to put this file in /boot and post the results.
logo.bmp.gz
(2.38 KiB) Downloaded 32 times

Re: Boot/Splash logo change

Posted: Fri Feb 21, 2020 12:30 am
by crashoverride
The messages displayed appears to indicate an issue with the SD card since the root partition can not be mounted.

Re: Boot/Splash logo change

Posted: Fri Feb 21, 2020 1:00 am
by Moud_Sanchez
@joy - thank you for looking into it and anxious to try the result. :D

@Etx - it didn't work. :(

@crashoverride - I thought that too so I've tried multiple SDs on Stock, TheRA and Batocera - all behave the same. Also, please note that it boots up fine in all my SDs and builds without a logo.bmp in vfat. :|

Re: Boot/Splash logo change

Posted: Fri Feb 21, 2020 1:29 am
by Etx
Hmm, strange. Got this file from here.
Based on author's video, it's working fine.

Re: Boot/Splash logo change

Posted: Fri Feb 21, 2020 1:54 am
by Moud_Sanchez
Ya, saw that article before I created this post, I believe he modified the bootloader.

Re: Boot/Splash logo change

Posted: Wed Feb 26, 2020 12:40 pm
by joy
@Moud_Sanchez,
So sorry for late update.
I was not available to look into this issue last week because of other jobs.

For this issue, I found a root cause.
After 'run bootcmd' of u-boot, display driver tries to parse drm parameters and load logo image again
and during this process with 'fatload', it looks ramdisk-related header gets modified abnormally.
https://github.com/hardkernel/u-boot/bl ... ay.c#L1433

Code: Select all

rootfs image is not initramfs (junk in compressed archive); looks like an initrd
Actually I still keep finding the exact address, but I made a patch that makes you load your custom logo image by adding fat folder.
Once I confirm this approach is best, it will be included for a next release.

Here is the u-boot patch.
I attached a diff file, too.
With this patch, you can use your custom logo by just adding "logo.bmp" into fat folder of your sd card.
BMP file format is same as I mentioned before and you used for previous test.

Code: Select all

diff --git a/drivers/video/drm/rockchip_display.c b/drivers/video/drm/rockchip_display.c
index 326ac12..7163f45 100644
--- a/drivers/video/drm/rockchip_display.c
+++ b/drivers/video/drm/rockchip_display.c
@@ -1427,10 +1427,12 @@
 {
 	struct display_state *s;
 	int offset = 0;
+	unsigned long bmp_mem;
 
 	if (fdt_node_offset_by_compatible(blob, 0, "rockchip,drm-logo") >= 0) {
 		list_for_each_entry(s, &rockchip_display_list, head) {
-				if (lcd_show_logo())
+				bmp_mem = get_drm_memory() + DRM_ROCKCHIP_FB_SIZE;
+				if (show_bmp(bmp_mem))
 					return;
 		}
You need to build u-boot with this patch.
If you don't have build environment, I will provide binary files of boot loaders soon for your test.
(*** updated ***) I also attached a test boot loaders. "sd_fuse_20200226_logotest.zip".

Then, update boot loaders of SD card as following.
https://wiki.odroid.com/odroid_go_advan ... ur_sd_card

If you need another guide to update boot loader, please let me know.

Re: Boot/Splash logo change

Posted: Wed Feb 26, 2020 3:59 pm
by Moud_Sanchez
joy wrote:
Wed Feb 26, 2020 12:40 pm
You need to build u-boot with this patch.
If you don't have build environment, I will provide binary files of boot loaders soon for your test.
(*** updated ***) I also attached a test boot loaders. "sd_fuse_20200226_logotest.zip".

Then, update boot loaders of SD card as following.
https://wiki.odroid.com/odroid_go_advan ... ur_sd_card

If you need another guide to update boot loader, please let me know.
Hi @joy, this is amazing - thank you for looking into it.

Unfortunately, I'm traveling for work until the end of March and don't have access to a build environment.

Also, it'll be awesome if you can provide another guide. I can study it while I'm away :)

Thank you!

Re: Boot/Splash logo change

Posted: Wed Feb 26, 2020 6:09 pm
by joy
Moud_Sanchez wrote:
Wed Feb 26, 2020 3:59 pm
Unfortunately, I'm traveling for work until the end of March and don't have access to a build environment.

Also, it'll be awesome if you can provide another guide. I can study it while I'm away :)
Hi @Moud_Sanchez,
Thank you for the feedback.
I've attached pre-built boot loaders in my previous post, so you don't need to build u-boot, but just use the binaries. ;)
Please find an attachment, "sd_fuse_20200226_logotest.zip".

And are you familiar with running 'dd' utility as described in this wiki page?
https://wiki.odroid.com/odroid_go_advan ... ur_sd_card
I will find another way to update u-boot of SD card.
Or anybody here who has idea to update u-boot without 'dd' unitlity?

Let me check if there is any plan for a next new image or other methods like using package update.

Re: Boot/Splash logo change

Posted: Fri Feb 28, 2020 2:19 am
by Moud_Sanchez
joy wrote:
Wed Feb 26, 2020 6:09 pm
Hi @Moud_Sanchez,
Thank you for the feedback.
I've attached pre-built boot loaders in my previous post, so you don't need to build u-boot, but just use the binaries. ;)
Please find an attachment, "sd_fuse_20200226_logotest.zip".
Hi @joy,

I only have my work laptop which is win10. I went ahead built an environment anyway 😁 - just don't tell my work 😜

Your patch worked, thank you!
Hopefully it'll be added in the next release.


Re: Boot/Splash logo change

Posted: Fri Feb 28, 2020 3:29 am
by mad_ady
Hooray for abusing work laptops! :D

Re: Boot/Splash logo change

Posted: Fri Feb 28, 2020 4:52 am
by Moud_Sanchez
mad_ady wrote:
Fri Feb 28, 2020 3:29 am
Hooray for abusing work laptops! :D
Haha
I'm not a dev by profession but in IT infrastructure so I have admin rights :)

Re: Boot/Splash logo change

Posted: Fri Feb 28, 2020 5:14 am
by joy
Moud_Sanchez wrote:
Fri Feb 28, 2020 2:19 am
Hi @joy,

I only have my work laptop which is win10. I went ahead built an environment anyway 😁 - just don't tell my work 😜

Your patch worked, thank you!
Hopefully it'll be added in the next release.
Hi @Moud_Sanchez,
Thank you for your confirmation and sharing the result. :D
That's a cool logo image!

Glad to hear it works.
This patch will be included in a next image.

Re: Boot/Splash logo change

Posted: Mon Mar 02, 2020 11:28 am
by joy
Hi.
Related commit is merged in hardkernel github.
https://github.com/hardkernel/u-boot/co ... 5721e49ef5

And a wiki page is ready.
https://wiki.odroid.com/odroid_go_advan ... e/bootlogo