How to flash UEFI firmware uefi_jetson.bin

Hi NV,

I work on JP5.1.1, Orin nano device.
I refer to this document, Build with docker · NVIDIA/edk2-nvidia Wiki · GitHub
and recompile the UEFI firmware of JP5.1.1
I replace the compiled uefi_Jetson_RELEAE.bin in the bootloader directory of the image folder and rename it to uefi_jetson.bin.

flash system image:
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only

1,I found that the version number of the UEFI firmware has not changed, it has always been:
Jetson UEFI firmware (version 3.1-32827747 built on 2023-03-19T14:56:32+00:00)

2,What’s even more strange is that I deleted the uefi_jetson.bin file in the bootloader directory and used the command: $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only to re-flash the system image, which also succeeded and the system can boot normally.

How to flash UEFI firmware on JP5.1.1 and Orin nano devices?

Hi future.wang,

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

It’s the wrong command to update UEFI only.
Please use the following command instead.

$ sudo ./flash.sh -k A_cpu-bootloader -c bootloader/t186ref/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit nvme0n1p1
1 Like

Hi Kevin,

Use this cmd to flash UEFI:
$ sudo ./flash.sh -k A_cpu-bootloader -c bootloader/t186ref/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit nvme0n1p1

flash log:

[   7.9877 ] partition type bootloader_stage2, magic id = CPBL
[   7.9877 ] A_cpu-bootloader bootloader_stage2, magic id = CPBL
[   7.9878 ] Concatenating bl dtb:(tegra234-p3767-0003-p3768-0000-a0_with_odm_overlay.dtb), to cpubl binary: /home/xiaojun/hdd/bsp/OrinNANO/Linux_for_Tegra/bootloader/uefi_jetson.bin
[   7.9971 ] tegrahost_v2 --chip 0x23 0 --align uefi_jetson_with_dtb_aligned.bin
[   7.9993 ] tegrahost_v2 --chip 0x23 0 --magicid CPBL --ratchet_blob ratchet_blob.bin --appendsigheader uefi_jetson_with_dtb_aligned.bin zerosbk
[   8.0004 ] adding BCH for uefi_jetson_with_dtb_aligned.bin
[   8.0808 ] tegrasign_v3.py --key None --list uefi_jetson_with_dtb_aligned_sigheader.bin_list.xml --pubkeyhash pub_key.key --sha sha512
[   8.0810 ] Assuming zero filled SBK key
[   8.0917 ] Warning: pub_key.key is not found
[   8.0919 ] tegrahost_v2 --chip 0x23 0 --updatesigheader uefi_jetson_with_dtb_aligned_sigheader.bin.encrypt uefi_jetson_with_dtb_aligned_sigheader.bin.hash zerosbk
[   8.1082 ] Erasing partition
[   8.1107 ] tegradevflash_v2 --erase A_cpu-bootloader
[   8.1136 ] Bootloader version 01.00.0000
[   8.1994 ] [Done]
[  23.5619 ] Writing partition
[  23.5656 ] tegradevflash_v2 --write A_cpu-bootloader uefi_jetson_with_dtb_sigheader.bin.encrypt
[  23.5684 ] Bootloader version 01.00.0000
[  23.6549 ] Writing partition A_cpu-bootloader with uefi_jetson_with_dtb_sigheader.bin.encrypt [ 2920512 bytes ]
[  23.6554 ] [................................................] 100%
[  59.5841 ] Coldbooting the device
[  59.5880 ] tegrarcm_v2 --chip 0x23 0 --ismb2
[  59.5914 ] MB2 version 01.00.0000
[  59.6794 ] Coldbooting the device
[  59.6832 ] tegrarcm_v2 --chip 0x23 0 --reboot coldboot
[  59.6861 ] MB2 version 01.00.0000
*** The [A_cpu-bootloader] has been updated successfully. ***

BUT UEFI booting failed:

Jetson UEFI firmware (version r35.3.1-d0c8c1ad-dirty built on 2024-10-11T06:26:08+00:00)

��ERROR:   Exception reason=0 syndrome=0xbe000011
ERROR:   **************************************
ERROR:   RAS Uncorrectable Error in IOB, base=0xe010000:
ERROR:          Status = 0xec000612
ERROR:   SERR = Error response from slave: 0x12
ERROR:          IERR = CBB Interface Error: 0x6
ERROR:          Overflow (there may be more errors) - Uncorrectable
ERROR:          MISC0 = 0xc45e0040
ERROR:          MISC1 = 0x1dcc860000000000
ERROR:          MISC2 = 0x0
ERROR:          MISC3 = 0x0
ERROR:          ADDR = 0x8000000003f300c0
ERROR:   **************************************
ERROR:   sdei_dispatch_event returned -1
Unhandled Exception in EL3.
x30            = 0x0000000050011384
x0             = 0x0000000000000000
x1             = 0x0000000000000000
x2             = 0x000000005000cfe4
x3             = 0x0000000000000047
x4             = 0x0000000000000000
x5             = 0x0000000000000043
x6             = 0x0000000000000001
x7             = 0x0000000000000000
x8             = 0x000000005000b610
x9             = 0x0000000000000000
x10            = 0x0000000267f56000
x11            = 0x0000000000010c1c
x12            = 0x0000000267f56000
x13            = 0x0000000267f56000
x14            = 0x0000000000000000
x15            = 0x0000000000000000
x16            = 0x0000000264530dbc
x17            = 0x000000026627bffc
x18            = 0x0000000000000000
x19            = 0x0000000003f300c4
x20            = 0x00000002643bfa40
x21            = 0x00000002643bdda0
x22            = 0x0000000000000001
x23            = 0x0000000000000023
x24            = 0x0000000000000056
x25            = 0x0000000242bec1f9
x26            = 0x0000000242bec20e
x27            = 0x000000004c553250
x28            = 0x0000000242842000
x29            = 0x00000002685fe730
scr_el3        = 0x000000000003073d
sctlr_el3      = 0x00000000b0cd183f
cptr_el3       = 0x0000000000000000
tcr_el3        = 0x0000000080823518
daif           = 0x00000000000003c0
mair_el3       = 0x00000000004404ff
spsr_el3       = 0x00000000600003cd
elr_el3        = 0x0000000050011384
ttbr0_el3      = 0x0000000050026ac1
esr_el3        = 0x0000000002000000
far_el3        = 0x0000000000000000
spsr_el1       = 0x0000000000000000
elr_el1        = 0x0000000000000000
spsr_abt       = 0x0000000000000000
spsr_und       = 0x0000000000000000
spsr_irq       = 0x0000000000000000
spsr_fiq       = 0x0000000000000000
sctlr_el1      = 0x0000000030d00800
actlr_el1      = 0x0000000000000000
cpacr_el1      = 0x0000000000300000
csselr_el1     = 0x0000000000000000
sp_el1         = 0x0000000000000000
esr_el1        = 0x0000000000000000
ttbr0_el1      = 0x0000000000000000
ttbr1_el1      = 0x0000000000000000
mair_el1       = 0x0000000000000000
amair_el1      = 0x0000000000000000
tcr_el1        = 0x0000000000000000
tpidr_el1      = 0x0000000000000000
tpidr_el0      = 0x0000000080000000
tpidrro_el0    = 0x0000000000000000
par_el1        = 0x0000000000000800
mpidr_el1      = 0x0000000081000000
afsr0_el1      = 0x0000000000000000
afsr1_el1      = 0x0000000000000000
contextidr_el1 = 0x0000000000000000
vbar_el1       = 0x0000000000000000
cntp_ctl_el0   = 0x0000000000000005
cntp_cval_el0  = 0x000000000abeff06
cntv_ctl_el0   = 0x0000000000000000
cntv_cval_el0  = 0x0000000000000000
cntkctl_el1    = 0x0000000000000000
sp_el0         = 0x000000026453c280
isr_el1        = 0x0000000000000040
cpuectlr_el1   = 0xa000000b40543000
gicd_ispendr regs (Offsets 0x200 - 0x278)
 Offset:                        value
0000000000000200:               0x0000000000000000
0000000000000204:               0x0000000000000000
0000000000000208:               0x0000000000000000
000000000000020c:               0x0000000000000000
0000000000000210:               0x0000000000000000
0000000000000214:               0x0000000000000000
0000000000000218:               0x0000000000010000
000000000000021c:               0x0000000000000000
0000000000000220:               0x0000000000000000
0000000000000224:               0x0000000000000000
0000000000000228:               0x0000000000000000
000000000000022c:               0x0000000000000000
0000000000000230:               0x0000000000000000
0000000000000234:               0x0000000000000000
0000000000000238:               0x0000000000000000
000000000000023c:               0x0000000000000000
0000000000000240:               0x0000000000000000
0000000000000244:               0x0000000000000000
0000000000000248:               0x0000000000000000
000000000000024c:               0x0000000000000000
0000000000000250:               0x0000000000000000
0000000000000254:               0x0000000000000000
0000000000000258:               0x0000000000000000
000000000000025c:               0x0000000000000000
0000000000000260:               0x0000000000000000
0000000000000264:               0x0000000000000000
0000000000000268:               0x0000000000000000
000000000000026c:               0x0000000000000000
0000000000000270:               0x0000000000000000
0000000000000274:               0x0000000000000000
0000000000000278:               0x0000000000000000
000000000000027c:               0x0000000000000000

Hi Kevin,

Use the command you gave to re-flash the old version(Jetson UEFI firmware (version 3.1-32827747 built on 2023-03-19T14:56:32+00:00)) that can start normally, and the startup failure error also occurred

I/TC: This is only for TZ-SE testing and should NOT be used for a shipping product!
I/TC: Primary CPU switching to normal world boot
��
  Jetson UEFI firmware (version 3.1-32827747 built on 2023-03-19T14:56:32+00:00)

��Unhandled Exception in EL3.
x30            = 0x0000000050000d00
x0             = 0x0000000000000000
x1             = 0x00000000be000011
x2             = 0x0000000000000000
x3             = 0x0000000000000011
x4             = 0x0000000267f56c68
x5             = 0x00000002685fe8ec
x6             = 0x0000000056000000
x7             = 0x0000000056000000
x8             = 0xffffffffffffffe0
x9             = 0x000000005001c380
x10            = 0x55aaa055071dbd35
x11            = 0x55aa8255ce1abfe1
x12            = 0x0000000000000000
x13            = 0x0000000000010c1c
x14            = 0x0000000241c96460
x15            = 0x0000000267f46000
x16            = 0x0000000264341ccc
x17            = 0x0000000001c79b58
x18            = 0x000000026447c2a0
x19            = 0x000000005001cec0
x20            = 0x0000000000000000
x21            = 0x0000000000000000
x22            = 0x0000000000000000
x23            = 0x0000000000000000
x24            = 0x0000000000000000
x25            = 0x0000000000000000
x26            = 0x0000000000000000
x27            = 0x0000000000000000
x28            = 0x0000000000000000
x29            = 0x0000000000000000
scr_el3        = 0x000000000003073d
sctlr_el3      = 0x00000000b0cd183f
cptr_el3       = 0x0000000000000000
tcr_el3        = 0x0000000080823518
daif           = 0x00000000000002c0
mair_el3       = 0x00000000004404ff
spsr_el3       = 0x00000000400003c9
elr_el3        = 0x0000000264476280
ttbr0_el3      = 0x0000000050026ac1
esr_el3        = 0x00000000be000011
far_el3        = 0x0000000000000000
spsr_el1       = 0x0000000000000000
elr_el1        = 0x0000000000000000
spsr_abt       = 0x0000000000000000
spsr_und       = 0x0000000000000000
spsr_irq       = 0x0000000000000000
spsr_fiq       = 0x0000000000000000
sctlr_el1      = 0x0000000030d00800
actlr_el1      = 0x0000000000000000
cpacr_el1      = 0x0000000000300000
csselr_el1     = 0x0000000000000000
sp_el1         = 0x0000000000000000
esr_el1        = 0x0000000000000000
ttbr0_el1      = 0x0000000000000000
ttbr1_el1      = 0x0000000000000000
mair_el1       = 0x0000000000000000
amair_el1      = 0x0000000000000000
tcr_el1        = 0x0000000000000000
tpidr_el1      = 0x0000000000000000
tpidr_el0      = 0x0000000080000000
tpidrro_el0    = 0x0000000000000000
par_el1        = 0x0000000000000800
mpidr_el1      = 0x0000000081000000
afsr0_el1      = 0x0000000000000000
afsr1_el1      = 0x0000000000000000
contextidr_el1 = 0x0000000000000000
vbar_el1       = 0x0000000000000000
cntp_ctl_el0   = 0x0000000000000005
cntp_cval_el0  = 0x00000000152bb8ee
cntv_ctl_el0   = 0x0000000000000000
cntv_cval_el0  = 0x0000000000000000
cntkctl_el1    = 0x0000000000000000
sp_el0         = 0x000000026447c2a0
isr_el1        = 0x0000000000000040
cpuectlr_el1   = 0xa000000b40543000
gicd_ispendr regs (Offsets 0x200 - 0x278)
 Offset:                        value
0000000000000200:               0x0000000000000000
0000000000000204:               0x0000000000000000
0000000000000208:               0x0000000000000000
000000000000020c:               0x0000000000000000
0000000000000210:               0x0000000000000000
0000000000000214:               0x0000000000000000
0000000000000218:               0x0000000000010000
000000000000021c:               0x0000000000000000
0000000000000220:               0x0000000000000000
0000000000000224:               0x0000000000000000
0000000000000228:               0x0000000000000000
000000000000022c:               0x0000000000000000
0000000000000230:               0x0000000000000000
0000000000000234:               0x0000000000000000
0000000000000238:               0x0000000000000000
000000000000023c:               0x0000000000000000
0000000000000240:               0x0000000000000000
0000000000000244:               0x0000000000000000
0000000000000248:               0x0000000000000000
000000000000024c:               0x0000000000000000
0000000000000250:               0x0000000000000000
0000000000000254:               0x0000000000000000
0000000000000258:               0x0000000000000000
000000000000025c:               0x0000000000000000
0000000000000260:               0x0000000000000000
0000000000000264:               0x0000000000000000
0000000000000268:               0x0000000000000000
000000000000026c:               0x0000000000000000
0000000000000270:               0x0000000000000000
0000000000000274:               0x0000000000000000
0000000000000278:               0x0000000000000000
000000000000027c:               0x0000000000000000

Does the UEFI version get updated after above command or not? If it is, then the original issue is done.

Your UEFI failure is from something else and you could do more test on your side first. Clarify the situation first and then open a new topic.

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