Change bootloader partition size and replace custom logo

After recompiling uefi, uefi_jetson.bin is larger than 3.5MB(5.8MB),I changed the bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml file and re-burned and reported an error.

1,flash_t234_qspi_sdmmc.xml file changes:

diff --git a/bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml b/bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml
index 70e8d4c..0e829f9 100644
--- a/bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml
+++ b/bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml
@@ -163,7 +163,7 @@
         <partition name="A_cpu-bootloader" type="bootloader_stage2" oem_sign="true">
             <allocation_policy> sequential </allocation_policy>
             <filesystem_type> basic </filesystem_type>
-            <size> 3670016 </size>
+            <size> 6291456 </size>
             <file_system_attribute> 0 </file_system_attribute>
             <allocation_attribute> 8 </allocation_attribute>
             <percent_reserved> 0 </percent_reserved>
@@ -399,7 +399,7 @@
         <partition name="B_cpu-bootloader" type="bootloader_stage2" oem_sign="true">
             <allocation_policy> sequential </allocation_policy>
             <filesystem_type> basic </filesystem_type>
-            <size> 3670016 </size>
+            <size> 6291456 </size>
             <file_system_attribute> 0 </file_system_attribute>
             <allocation_attribute> 8 </allocation_attribute>
             <percent_reserved> 0 </percent_reserved>


[   5.8751 ] Parsing config file :tegra234-mb1-bct-cprod-p3701-0000_cpp.dtb 
[   5.8751 ] ModuleCount 0 NumProdNames 0
[   5.8751 ] Added Platform Config 6 data with size :- 16
[   5.8751 ] 
[   5.8751 ] Updating mb1-bct with firmware information
[   5.8764 ] tegrabct_v2 --chip 0x23 0 --mb1bct mb1_cold_boot_bct_MB1.bct --updatefwinfo flash.xml.bin
[   5.8773 ] Start sector for worm, expected >= 139776, actual 0
Error: Return value 4
Command tegrabct_v2 --chip 0x23 0 --mb1bct mb1_cold_boot_bct_MB1.bct --updatefwinfo flash.xml.bin
Failed flashing t186ref.

The error log file:
flash_error.log (35.9 KB)

Hi, wangxiaozhuang,

Are you using the devkit or custom board for AGX Orin?

Do you add anything in UEFI cause it bigger size?
Or how about the size of uefi_Jetson_RELEASE?

Could you help to provide the current uefi binary here to check?

Hi, thanks for the reply. Yes, we use custom board for AGX Orin. We just added a custom logo to uefi_Jetson_RELEASE , The picture size is the same as the original nvidia picture.

uefi_Jetson_RELEASE.bin (4.8 MB)

In order to save more space, or close the B part of the bootloader can also be considered.

Do you refer to the following instruction to update the logo?
UEFI Adaptation — Customized Logo
the logo file(s) do not exceed the UEFI partition size (3.5MB)

You should not get a bigger size of uefi binary if you are using the same size logo file as original.
What’s your Jetpack version in use?
and how do you clone the UEFI source, could you help to provide the command you use?

Yes,I following this instruction to update the logo.

My JP version is r35.1.0

clone code command:
edk2_docker edkrepo manifest-repos add nvidia main nvidia
Refer to this wiki: Home · NVIDIA/edk2-nvidia Wiki · GitHub

By the way.
After cloning the code, the size of the compiled original uefi is 2.8M, after replacing the logo, compile it into 5.8M

Custom Image:

-rw-rw-r-- 1 u20 u20 6.0M 4月  14 09:39 custom/nvidiagray1080.bmp
-rw-rw-r-- 1 u20 u20 901K 4月  14 09:39 custom/nvidiagray480.bmp
-rw-rw-r-- 1 u20 u20 2.7M 4月  14 09:39 custom/nvidiagray720.bmp

Original Image:

-rw-rw-r-- 1 u20 u20 6.0M 4月  14 13:52 nvidiagray1080.bmp
-rw-rw-r-- 1 u20 u20 901K 4月  14 13:52 nvidiagray480.bmp
-rw-rw-r-- 1 u20 u20 2.7M 4月  14 13:52 nvidiagray720.bmp

You may use the following command to clone the uefi source because you are using the codeline of R35.1. (Combos · NVIDIA/edk2-nvidia Wiki · GitHub)

$edkrepo clone nvidia-uefi NVIDIA-Jetson jetson-r35.1

Could you try to just replace the Silicon/NVIDIA/Assets/nvidiagray*.bmp with your custom logo file?

1,I cloned a code using this command, and the compilation result is the same(4.7M):

-rw-rw-r-- 1 u20 u20 4.7M 4月  14 15:29 images/uefi_Jetson_RELEASE.bin

2,Yes, I deleted the other pictures and just replaced the Silicon/NVIDIA/Assets/nvidiagray.bmp* pictures, the result is the same.

I guess that the customer image pixels are more complex than the original image pixels.

By the way.
After the kernel is started, before the user logs in, a picture of the NVIDIA logo will appear. May I ask where the logo is placed? Use the reboot command, this NVIDIA logo will also appear. Obviously, the location of the logo is different from that in UEFI

There are logo file under /usr/share/backgrounds, please also replace them

I reduced the quality of the custom logo image to the minimum, and the uefi can flash normally.(uefi_jetsion.bin is 2.9MB)

thanks, kernel logo is OK.

Why is there always a black screen between the bootloader and the kernel startup, we want the logo to be displayed until the user logon in, how to achieve this function?

I tried the following, but it doesn’t work.
Replace thekernel-5.10/drivers/video/logo/logo_linux_clut224.ppm file with customer logo image.

bmptopnm custom1080.bmp  > linuxlogo.pnm
pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
pnmtoplainpnm linuxlogo224.pnm > logo_linux_clut224.ppm
zcat /proc/config.gz |grep _LOGO

zcat /proc/config.gz |grep CONFIG_FRAMEBUFFER_CONSOLE

Can you give me some advice, thanks very much.

Could you help to show me the the video about “black screen” and also the serial console log at this moment?


  1. About here, the screen is black: EFI stub: Exiting boot services and installing virtual address map...
**  WARNING: Test Key is used.  **

L4TLauncher: Attempting GRUB Boot
L4TLauncher: Attempting Direct Boot
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services and installing virtual address map...
�C: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot
I/TC: Secondary CPU 4 initializing
I/TC: Secondary CPU 4 switching to normal world boot
I/TC: Secondary CPU 5 initializing
I/TC: Secondary CPU 5 switching to normal world boot
I/TC: Secondary CPU 6 initializing
I/TC: Secondary CPU 6 switching to normal world boot
I/TC: Secondary CPU 7 initializing
I/TC: Secondary CPU 7 switching to normal world boot
I/TC: Secondary CPU 8 initializing
I/TC: Secondary CPU 8 switching to normal world boot
I/TC: Secondary CPU 9 initializing
I/TC: Secondary CPU 9 switching to normal world boot
I/TC: Secondary CPU 10 initializing
I/TC: Secondary CPU 10 switching to normal world boot
I/TC: Secondary CPU 11 initializing
I/TC: Secondary CPU 11 switching to normal world boot
�  0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd421]
[    0.000000] Linux version 5.10.104-tegra (tegra@tegra-wxz) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2020.08) 9.3.0, GNU ld (GNU Binutils) 2.33.1) #20 SMP PREEMPT Tue Apr 11 12:44:50 CST 2023
[    0.000000] OF: fdt: memory scan node memory@80000000, reg size 16,
[    0.000000] OF: fdt:  - 80000000 ,  c0000000
[    0.000000] Machine model: Jetson AGX Orin
[    0.000000] efi: EFI v2.70 by EDK II
[    0.000000] efi: RTPROP=0x8050eed98 SMBIOS=0xffff0000 SMBIOS 3.0=0x803710000 MEMATTR=0x80442b018 ESRT=0x802227998 RNG=0x827605998 MEMRESERVE=0x80442cf18 
[    0.000000] efi: seeding entropy pool
[    0.000000] esrt: Reserving ESRT space from 0x0000000802227998 to 0x00000008022279d0.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000817400000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x0000000835ffffff]

  1. Around this time, when the user is prompted to log in, the screen starts showing: Last login: Mon Apr 17 06:20:28 UTC 2023 on ttyTCU0
302 updates can be applied immediately.
245 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

Last login: Mon Apr 17 06:20:28 UTC 2023 on ttyTCU0

Thanks for your video.
I’ve also checked the behavior on AGX Orin devkit, and it is expected.

It seems the board is loading the kernel during the black screen.
Sorry that we don’t have the feature to show the logo during this period (kernel boot up, it takes about 20s, depending on your implement).

thanks for the reply.
But if such a black screen is not friendly to users, if the screen is not displayed, they think it is a device failure, is there any other way, such as outputting serial console information to HDMI tty display, or other boot prompts are also possible, thanks.

Sorry, the display framebuffer console is not supported yet for AGX Orin platform. We are still working on it and can’t guarantee when it would be done.

Thanks for your reply, I will try to add some sound prompts during this startup.

Thanks for your understanding!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.