UEFI substitution issues

Hello, I can’t build UEFI due to network problems, thank you very much for your help, it has been solved in this topic Uefi构建 - #9 by liuyuze. But I replaced the generated debug file with the old “uefi_jetson.bin” file as requested, and then re-flashed the board, and I got this error:

Traceback (most recent call last):
File “./tegraflash.py”, line 1383, in
tegraflash_run_commands()
File “./tegraflash.py”, line 1217, in tegraflash_run_commands
interpreter.onecmd(command)
File “/usr/lib/python3.8/cmd.py”, line 217, in onecmd
return func(arg)
File “./tegraflash.py”, line 278, in do_flash
self.chip_inst.tegraflash_flash(exports)
File “/home/hz/alex/R35.4.1/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 902, in tegraflash_flash
self.tegraflash_parse_partitionlayout()
File “/home/hz/alex/R35.4.1/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 467, in tegraflash_parse_partitionlayout
self.tegraflash_update_bpmp_dtb()
File “/home/hz/alex/R35.4.1/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 1468, in tegraflash_update_bpmp_dtb
raise tegraflash_exception('Unexpected error in updating: ’ + bpmp_dtb + ’ ’ + str(e))
UnboundLocalError: local variable ‘bpmp_dtb’ referenced before assignment
Failed flashing t186ref.

I had meet this bug and it was successfully resolved after I replaced R35.1 with R35.4.1. I downloaded R35.4.1 via this connectionhttps://developer.nvidia.com/embedded/jetson-linux-r3541
and then I followed
Build without docker · NVIDIA/edk2-nvidia Wiki · GitHub
build of the EUFI, the clone commands used are $edkrepo clone nvidia-uefi-r35.4.1 NVIDIA-Platforms r35.4.1 and $edkrepo clone nvidia-uefi-r35.4.1 NVIDIA-Platforms uefi-202210.3。 But both of these source build debug files got bpmp_dtb error after the replacement, I wonder what is the reason for this and how can I fix it

Hi liuyuze,

You should replace <Linux_for_Tegra>/bootloader/uefi_jetson.bin with the new generated uefi_Jetson_RELEASE.bin you built.

If you are using R35.4.1, please just use the following command to clone the source.

$ edkrepo clone nvidia-uefi-r35.4.1 NVIDIA-Platforms r35.4.1

I replaced it with one as you requested uefi_Jetson_RELEASE.bin and I got the following error:

Return value 3
Command tegrarcm_v2 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_ aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
Reading board information failed

If I replace the uefi_jetson_DEBUG.bin:file, I get the error of the bpmp_dtb that I started saying. Pls how can I fix it. I was running the edkrepo clone nvidia-uefi-r35.4.1 NVIDIA-Platforms r35.4.1 command

你可以把你全部的log都抓成一個檔案之後附上來… 包含你怎麼燒的也寫上來

1 Like

Sorry for the wait, here’s the downloaded log
1log123.txt (25.1 KB)
The command I’m using is sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1 >&1log123.txt

請問你在config還有改什麼?

Sorry I didn’t understand what you meant, the only thing I did was change the UEFI file

請問你在現在這個狀況下把uefi改回default的就能燒嗎?

你在 11/1問了一個一模一樣的error. 請問這時候也是改了uefi嗎?

No, I used R35.1 last time, and it didn’t work with my orin. So that topic has nothing to do with this time

Before I used the original without replacing the UEFI file was flash is normal

我換個問法問好了, 請不用管什麼"before" 的狀況

就純粹現在這個碰到錯誤的情況, 如果你把uefi換回原本jetpack提供的binary. 你能燒板子嗎?

單純這個情況

  1. 換了你自己build的uefi bin → 你說會打到error
  2. 在(1)的情況下只把uefi bin換回default的, 其他所有東西不動 → 請問你還會碰到error嗎?

聽不懂要實驗什麼的話我可以講更簡單一點.

I’m sorry that may not understand what I said, my English is not particularly good, and it is normal to burn the files provided by the original jetpack, and this is what I have always expressed

Hi

那你要不要直接說中文, 現在這個溝通說實話沒什麼效率.

如果可以的话那太好了,是这样的我用原本在官网下载的R35.4.1是可以正常烧录的,当我按照操作更换了UEFI_jetson,bin文件之后烧录就会报错

我這邊的實驗其實很簡單…

你說你換了UEFI_jetson.bin之後馬上燒錄就會失敗

我只想知道這件事情是不是一個能穩定重複的行為

比方說

  1. 換了你build的uefi → 馬上燒錄就失敗
  2. 換回原本jetpack提供的uefi → 馬上燒錄就恢復正常
  3. 又換成你build的uefi → 燒錄又失敗

我只是要請你作這個實驗而已.

对的没错是这样的

那能請你把你的uefi binary壓縮附上來嗎

Uploading: 新建文件夹 (2).zip…
新建文件夹 (2).zip (4.8 MB)
我构建uefi时生成了两个bin文件,按我的理解是使用debug.bin但是您说这边工程师说要使用RELEASE.bin文件所以说我两个都试了一下,报的错都是一样的

我這邊試了你的binary在devkit上面不會發生你的問題

Traceback (most recent call last):
  File "/home/hz/alex/R35.4.1/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py", line 1401, in tegraflash_update_bpmp_dtb
    if bpmp_dtb == None and bpmp_dtb_in_layout == None:
UnboundLocalError: local variable 'bpmp_dtb' referenced before assignment

以這error看起來,和UEFI binary並沒什麼關係,請問你是否有改過partition layout?
麻煩提供你可以成功燒錄時的完整command和log,以及flash_t234_qspi_sdmmc.xml檔案

1 Like

我是将bootloader的uefi_jetson替换为我生成的uefi文件了,这种情况下会出错,然后我将生成的uefi文件删除,还原uefi_jetson文件报错就消失了,我想这种情况下我应该没有改变partition layout,我正在生成运行成功状态下的log,稍后我会把log以及 flash_t234_qspi_sdmmc.xml发出来