Uefi var issue

你好:
硬件: orin nx
sdk: 35.6.0
我现在app有AB两个分区
我想新增一个uefi var变量来决定挂载哪个分区。我应该在系统中怎么操作。

Hi,

If you enabled rootfs a/b, then you should follow our tool to switch the a/b but not using your own method.

https://docs.nvidia.com/jetson/archives/r36.4.3/DeveloperGuide/SD/Bootloader/UEFI.html#uefi-variables

是的,我们会使用nvbootctrl 工具进行切换系统,我们的应用程序分了两个区,我们也想进行切换(一次启动选择一个应用分区挂载,根据应用升级后决定哪个应用分区可mount)。但是需要挂载的分区作为一个var 存放在uefi var中。

这个支持在应用层去增加或者修改uefi变量区的 变量吗

在应用层切换分区链路,看上去没切换成功。

sudo nvbootctrl set-active-boot-slot 1

minicom.txt (315.0 KB)

A/B分区 内核启动是怎么选择rootfs分区的,这个在源代码什么地方?

我看启动时会先去找/boot/下的镜像文件,请问 这个判断是在哪个地方实现的?

It seems there’re many logs missing in Line:2470 to Line:2495 of the log you shared.
Please run the following commands again and share the full serial console log for further check.

$ sudo nvbootctrl dump-slots-info
$ sudo nvbootctrl -t rootfs dump-slots-info
$ sudo nvbootctrl set-active-boot-slot 1
$ sudo reboot

Please refer to Jetson AGX Orin, Orin NX and Orin Nano Boot Flow — NVIDIA Jetson Linux Developer Guide 1 documentation for boot flow and Update and Redundancy — NVIDIA Jetson Linux Developer Guide 1 documentation for redundancy.
UEFI(bootloader) would load kernel/DTB through L4TLauncher and then kernel mount the rootfs.

I’m not clear about what’s your use case to do “我想新增一个uefi var变量来决定挂载哪个分区”.
If you boot from slot B, then you should mount APP_b partition as rootfs.