Update default boot logo with a custom one

Hello ,
I tried to change the default boot logo to a custom one. I checked the similar topics and found the required tools.
I created a .jpg file with 1920*1080 dimensions, this file is 76 kb, I also created a monochrome version.
I followed the these steps:

  1. sudo apt install liblz4-tool
  2. git clone GitHub - VladimirSazonov/jw-boot-logo-for-Jetson-Nano: This is a modified jw-boot-logo for creation bmp.blob for JetsonNano. You must have lz4c installed for use this
  3. cd jw-boot-logo-for-Jetson-Nano
  4. git clone GitHub - nothings/stb: stb single-file public domain libraries for C/C++
  5. g++ -o jw_boot_image main.cpp
  6. ./jw_boot_image [path_to_your_logo]
  7. Make sure there is an output file named “bmp.blob”
  8. Copy “bmp.blob” into [path_to_your_bsp]/Linux_for_Tegra/bootloader/
  9. cd [path_to_your_bsp]/Linux_for_Tegra/
  10. Finish installation by the command: sudo ./flash.sh -k BMP --image bootloader/bmp.blob jetson-nano-qspi-sd mmcblk0p1

But after the 6. step, I got the following response:
created tmp.bin
Compressed 9907520 bytes into 375559 bytes ==> 3.79%
tmp.bin was compressed
Final size of bmp.blob will too big!
It should not be more than 81920 bytes!
Please try to simplify your logo.
Use a minimum of colors.
Avoid gradients and smoothing whenever possible.
Use a small image on a monochrome background.
The image should compress well.

I am a bit lost because my image is quiet small. is it a known issue or I missed something?

I think it’s clear that the file size is too large.

Yes you are right, but if I save a low quality gray image with the given dimensions the minimum size I could achieve is 25 kb.
How can I further decrease the file size with the given dimensions? The default NVIDIA boot logo looks sharp and color rich.

Can you explain to me the following values?

Compressed 9907520 bytes into 375559 bytes ==> 3.79%
tmp.bin was compressed
Final size of bmp.blob will too big!
It should not be more than 81920 bytes!

I thought 81920 that means I can create images until they are not bigger than 80kb. But if I create for example a 31 kB image it display a value which is ten times bigger 375559 bytes

Maybe its a trivial problem, but hard to imagine how to decrease the size without change the resolution. I would grateful any insight or hint.

Okay, I overcome this problem. I could create a small enough image to generate the required file, but for that I had to dramatically reduce the quality.

I found posts about the official tool in the source files, now I am experimenting with that in the /tools/bmp-splash folder I could generate the blob file based on the README file instructions, but when I flash the BMP on the board it always returns with an error:

[ 9.4178 ] Writing partition
[ 9.4227 ] tegradevflash --write BMP /home/medresnuc/nvidia/nvidia_sdk/JetPack_4.6.4_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/bootloader/bmp.blob
[ 9.4253 ] Cboot version 00.01.0000
[ 9.6545 ] Writing partition BMP with /home/medresnuc/nvidia/nvidia_sdk/JetPack_4.6.4_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/bootloader/bmp.blob
[ 9.6580 ] 00000004: Filesize is bigger than partition size
[ 9.6803 ]
Error: Return value 4
Command tegradevflash --write BMP /home/medresnuc/nvidia/nvidia_sdk/JetPack_4.6.4_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/bootloader/bmp.blob
Failed to flash/read t210ref. I found the following in the README file "Once you’ve created your own bmp.blob, place it in your BSP’s bootloader
directory (Linux_for_Tegra/bootloader/bmp.blob) and reflash your board
to have the blob written to flash and used by CBoot on the next boot.

My current blob file is 211kb and it is still too big. I used the lz4c lib when i run the python script. So I not really understand how can i reduce the size of the blob file if its generated with the official tool.

You can provide only the 1080p image if use only 1080p monitors, which should significantly reduce the final blob size.
The BMP partition size of the latest 32.7.4 on Jetson Nano is 196608 bytes, or 192 KB.

Thank you for your response. The smaller blob file solved the flashing problem. Now the flashing run successfully, but when I boot the Nano with a fullHD monitor no boot logo shown. How can I debug this problem? over the size and dimensions is there any other requirement for the custom logo .bmp files?

Is the default NVIDIA logo working on your device?

Yes that works properly, and the flashing was successful.

I just noticed that you used jpeg files.
Only pure bitmaps format is supported.

Hello,

I had jpeg images at the first attempts, but hey were converted into bmps. But after I started to use the bmp-splash tool I only use d24 bit pure bmps. I have downloaded bmps, also saved from Gmip 24 bit bmps and also created from cv::Mat objects which were saved as 24 bit bmps.

I followed the README file which said I had to use 24 bit bmps.

These are the variations which I tried to use is there any other option? bmp.blob file created successfully, size is below the limit, bmp.blob placed in the bootloader folder and flashing also successful. But I still see black frame during boot before the login display.

What exact image and command do you use?

Hello,

In the bmp-splash folder I run the following command:
OUT=$PWD ./genbmpblob_L4T.sPreformatted texth t210 ./config_file ./BMP_generator_L4T.py /usr/bin/lz4c bmp.blob

and I got the following output:

BMP IMAGE INFO : ./gcustom-1080.bmp nvidia 1080
1+0 records in
1+0 records out
1 byte copied, 2,0058e-05 s, 49,9 kB/s
1+0 records in
1+0 records out
1 byte copied, 1,4983e-05 s, 66,7 kB/s

Now I am using only one file in the config file:

gcustom-1080.bmp nvidia 1080

After that I entered the Linux_for_Tegra folder and run the following command:
sudo ./flash.sh -r -k BMP --image ./bootloader/bmp.blob jetson-nano-qspi-sd mmcblk0p1

The flash log is not short but it ends with the following:

[ 11.6485 ] Writing partition BMP with /home/nuc/nvidia/nvidia_sdk/JetPack_4.6.4_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/bootloader/bmp.blob
[ 11.6495 ] […] 100%
[ 12.4518 ]
[ 12.4519 ] Ignore BFS information in BCT
[ 12.4562 ] tegrabct --bct P3448_A00_lpddr4_204Mhz_P987.bct --chip 0x21 0 --ignorebfs flash.xml.bin
[ 12.4592 ]
[ 12.4633 ] tegradevflash --write BCT P3448_A00_lpddr4_204Mhz_P987.bct
[ 12.4657 ] Cboot version 00.01.0000
[ 16.0237 ] Writing partition BCT with P3448_A00_lpddr4_204Mhz_P987.bct
[ 16.0248 ] […] 100%
[ 23.8554 ]
[ 23.8556 ] Coldbooting the device
[ 23.8595 ] tegradevflash --reboot coldboot
[ 23.8616 ] Cboot version 00.01.0000
[ 24.2939 ]
*** The [BMP] has been updated successfully. ***

Maybe your monitor does not run at 1080p when the logo is supposed to show up.
Or flash the entire device instead of only BMP partition.

I repeated the whole process with the original source files and the modified. With the original sources I have a blob.bmp file which works properly, but I did not find the NVIDIA .bmp images were used to generate the original blob.bmp file.

When I used the generated custom blob.bmp file(from 24 bit true bmp files) I got back a black booting until the login window. This was the results also the flash command way and flashing the whole image via SDK manager.

Can be the blob.bmp file corrupted? It would be useful to check if I use the original NVIDIA .bmp image files the generated blob.bmp behaves differently. But I did not find the original bmp files in the sources. Where could I find the original images?

We don’t release it.
Only the BMP blob is provided.

Please also check with 480P and 720P.

I understand why you don’t release them. Okay I have the same outputs (black boot until login). Is there a log file which can be used to debug the problem? Or is there any other image properties that can be a problem? I am using 24 bit .bmps.

Put the booting log from serial console here.

Have you done this yet?

I checked a version where only the 480p and 720p version were flashed to the board and saved the whole bootlog.
bootlog.txt (34.3 KB)
I also searched for the ‘blob’ related parts (As much I can judge) and I found these lines:

[0003.101] decompressing blob (type 1)…
[0003.155] display_resolution: No display init
[0003.160] Failed to retrieve display resolution
[0003.164] Could not load/initialize BMP blob…ignoring
[0003.169] -------> se_aes_verify_sbk_clear: 747
[0003.174] se_aes_verify_sbk_clear: Error
[0003.178] SE operation failed
[0003.181] bl_battery_charging: connected to external power supply
[0003.191] display_console_ioctl: No display init
[0003.195] switch_backlight failed
[0003.201] device_query_partition_size: failed to open partition spiflash0:MSC !
[0003.209] MSC Partition not found
[0003.215] device_query_partition_size: failed to open partition spiflash0:USP !
[0003.222] USP partition read failed!
[0003.226] blob_init: blob-partition USP header read failed

[0003.898] bmp blob is not loaded and initialized
[0003.903] Failed to display boot-logo

Okay definitely there are signs of the problem, but I am not sure about the reasons.

I didn’t notice this. So clearly this is problematic.
Sounds like your image is not recognized by the script.

Use the Linux 'file' command to make sure your BMP is an uncompressed
Windows 3.x, 24BPP BMP file. RLE, layers, etc. are not supported.

Did you check this?

I checked all 3 resolution files and got these results:

gcustom-1080.bmp: PC bitmap, Windows 3.x format, 1920 x 1080 x 8
gcustom-480.bmp: PC bitmap, Windows 3.x format, 720 x 480 x 8
gcustom-720.bmp: PC bitmap, Windows 3.x format, 1280 x 720 x 8

Okay I have 8 bit images instead of 24, because i tried to reduce file size with single channel images.

Also how could you pick a problem from the referred ‘BMP IMAGE INFO’ messages?