如何通过BUP升级A_bpmp-fw-dtb分区?

Hi NV Team,

环境:Orin Nano 8G SOM,JP5.1.1,Customer board。

操作步骤:
0,修改bootloader目录和bootloader/t186ref目录内文件:
tegra234-bpmp-3767-0003-3509-a02.dtb

1,生成多规格Capsule payload
$ ./l4t_generate_soc_bup.sh t23x
$ ./generate_capsule/l4t_generate_soc_capsule.sh -i ./bootloader/payloads_t23x/bl_only_payload -o /opt/miivii/bootloader-upgrade/TEGRA_BL.Cap t234

2,设备端触发升级
sudo mkdir -p /mnt
esp_uuid=$(lsblk -o name,partlabel,uuid | awk ‘{ if($2 == “esp”) print $3 }’)
sudo mount UUID=$esp_uuid /mnt
sudo mkdir -p /mnt/EFI/UpdateCapsule
sudo cp ./TEGRA-T234.Cap /mnt/EFI/UpdateCapsule
sudo cp /opt/miivii/bootloader-upgrade/TEGRA_BL.Cap /mnt/EFI/UpdateCapsule

#修改bit2 OsIndications UEFI variable
cd /sys/firmware/efi/efivars/
printf "\x07\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00" > /tmp/var_tmp.bin
sudo dd if=/tmp/var_tmp.bin of=OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c bs=12;sync

3,检查是否升级成功
$ sudo nvbootctrl dump-slots-info
[sudo] password for nvidia:
Current version: 35.3.1
Capsule update status: 1
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0, status: normal
slot: 1, status: unbootable

遇到的问题:
升级BUP后,修改的文件tegra234-bpmp-3767-0003-3509-a02.dtb内容不生效!

请帮忙分析问题,多谢!

Hi future.wang,

What’s your target version for capsule update?
(i.e. which version you want to upgrade from JP5.1.1?)

This means that Capsule update successfully.
But I’m curious about why your slot 1 is unbootable.

Please share the full logs for further check.

Hi Kevin,

printenv.txt (717 字节)

generate_BUP.log (1.0 MB)

generate_CUP.log (2.8 KB)

触发升级log:

1+0 records in
1+0 records out
12 bytes copied, 0.00505629 s, 2.4 kB/s
first time upgrade done, take effect after reboot.

From the logs you shared, they work as expected.

How did you confirm that the modification in tegra234-bpmp-3767-0003-3509-a02.dtb not updated?

I think you should check the full update log to find out why slot 1 become unbootable.
The capsule update will update non-active slot.
i.e. if you perform capsule update in slot A, it would actual update slot B and boot from slot B after update.

Hi Kevin,

指的是做哪步操作生成的log?

Hi Kevin,

执行升级的完整uart日志:
uart_upgrade_full.log (153.5 KB)

根据您先前的说法,看起来是升级完B分区后,结果B分区无法启动,系统又切换到了A分区启动了
$ sudo nvbootctrl dump-slots-info
[sudo] password for nvidia:
Current version: 35.3.1
Capsule update status: 1
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0, status: normal
slot: 1, status: unbootable

另外:
tegra234-bpmp-3767-0003-3509-a02.dtb 内我修改了cup最大工作频率。
当我完整烧录系统镜像后,修改是生效的。

E> Error in command_complete 18000 int_status
E> Sending CMD_SD_SEND_IF_COND failed
E> Error opening sdcard-0
E> Failed to initialize device 6-0
C> Storage init failed
C> Task 0x0 failed (err: 0x39390706)
E> Top caller module: SDMMC, error module: SDMMC, reason: 0x06, aux_info: 0x07
I> Busy Spin
��

It seems above errors causing it boot failed from Slot-B so that it returns to boot from slot-A at the end.
It may be caused from something wrong in your capsule payload.

It seems working if you flash them manually.
Do you have the requirement to perform capsule update instead of just using flash tool?
If so, have you tried to get the devkit to reproduce the similar issue?

Hi Kenvin,

使用capsule升级bootlaode是我们的强需求。
我接下来在DK上测试一下。

Hi Kevin,

此步骤不加-e t23x_3767_bl_spec可以吗?
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Bootloader/UpdateAndRedundancy.html#generating-a-multi-spec-bup

Hi Kenvin,

在DK上使用上面的步骤,升级bootloader是成功的。

我把在DK环境中生成的TRGRA_BL.Cap拿去客户board上升级,B分区还是不可启动

Hi Kevin,

这个升级失败的log你看了吗?

我发现如下出错log:
4 E> Sending CMD_SD_SEND_IF_COND failed
415 E> Error opening sdcard-0
416 E> Failed to initialize device 6-0
417 C> Storage init failed
418 C> Task 0x0 failed (err: 0x39390706)
419 E> Top caller module: SDMMC, error module: SDMMC, reason: 0x06, aux_info: 0x07
420 I> Busy Spin

我使用的是NVME,这里在初始化SD?生成BUP时,有指定引导设备的参数吗?

Hi Kenvin,

对文件Linux_for_Tegra/jetson_board_spec.cfg的修改,已经在出现unbootable现象前已经改好了。
难道不是从这个文件里读取的信息?

It should be fine but you would generate the larger capsule payload since it would include all t234 spec.

Do you mean the unbootable issue on Slot-B is specific to the custom carrier board?
I would suggest using custom BSP package to create the capsule payload for custom carrier board.

Sure, I’ve pasted them in previous response…

Are you using Orin Nano SKU5 module with SD slot?
Please share the result of cat /etc/nv_boot_control.conf on your board.

Board spec is loaded here.
What do you mean about “已经在出现unbootable现象前已经改好了”?
Have you resolved the unbootable issue on the custom carrier board?

Kevin,

我在客户载板上使用的是3767-300-0003,无TF卡槽的SOM
$ cat /etc/nv_boot_control.conf
TNSPEC 3767-300-0003-R.1-1-0-jetson-orin-nano-devkit-nvme-
COMPATIBLE_SPEC 3767–0003–1–jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE nvme0n1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0

另外的测试,
我在官方DK上使用NVME硬盘,不插入TF卡。
jetson_board_spec.cfg内容如下:
‘boardid=3767;fab=000;boardsku=0005;boardrev=;fuselevel_s=1;chiprev=;board=jetson-orin-nano-devkit;rootdev=mmcblk0p1;bup_type=bl’
然后按步骤生成BUP文件,生成的TEGRA_BL.Cap竟然也能正常升级和启动,难道rootdev=mmcblk0p1配置不影响启动设备的选择?

Kevin,

It is okay since that the actual bootchain is stored in internal QSPI of the module itself.

It is not the expected result to me that you can use custom BSP package to flash/boot the board successful but the capsule payload generated from it not working.

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