需求是:每一次的调试需要烧录kernel的时候,都需要将target device短接进入recover烧录模式,再通过USB将已经编译好的内核烧录到target板上,那么有没有其它更好的方式升级呢 ? 可以在target device直接编译好的内核kernel和更新dtb,该具体如何操作呢?
nvidia给出的技术支持是,更新一个单独的分区,那么具体是如何操作呢 ?
Updating an Individual Partition
The current-release of BSP supports updating individual partitions (excluding the partitions BCT, mb1, and APP).
准备工作:
You perform an individual partition update in two steps:
1. Prepare a Bootloader update payload (BUP) on the host system.
在编译sdk的环境先将bl_update_payload编译出来
2. Trigger an update on the target device.
To prepare the Bootloader update payload
在编译环境下,先通过如下操作即可生成
1. Enter these commands on the host system:
$ cd ${Tot_BSP}/Linux_for_Tegra
$ sudo ./l4t_generate_soc_bup.sh <processor>
Where <processor> is:
• For Jetson TX2, t18x
• For Jetson AGX Xavier , t19x
The script generates a BUP named bl_update_payload in the directory at Linux_for_Tegra/payloads_<processor>/bl_update_payload/.
按照说明大概流程,按照流程需求大概整个脚本来
将上面编译好的bl_update_payload的文件拷贝到target device上面
2. Copy the BUP to any convenient location on the target device whose partitions are to be updated.
To trigger the update process
将bl_update_payload拷贝到target device上面的 /opt/ota_package/ 路径上
1. Move the BUP bl_update_payload to the directory /opt/ota_package/.
在target device 中的/opt/ota_package/ 下面创建一个update_list.conf 文件
注意在update_list.conf 文件中编辑填充如下内容:
#
# commands run on the target device
#
# cd /opt/ota_package
# sudo mv bl_update_payload .
# sudo echo 'kernel current' > update_list.conf
# sudo echo 'kernel-dtb current' >> update_list.conf
# sudo nv_part_update update_list.conf //在target device上面真正执行更新的命令
# sudo reboot //升级完毕后,需要手动执行重启系统才能生效
#cat /proc/version //通过对比版本即可查阅是否升级成功
2. Create a file named update_list.conf and edit it to add the names and slots of the partition(s) to be updated.
For example, you could update the partitions cpu-bootloader and bootloader-dtb in their non-current slots by adding these lines:
cpu-bootloader non-current //此处为nvidia给出的参考说明,
bootloader-dtb non-current //此处为nvidia给出的参考说明,
3. To trigger the update, run the script nv_part_update with the name of the file update_list.conf as an input parameter:
$ sudo nv_part_update update_list.conf //在target device上面真正执行更新的命令
Examples
NVIDIA provides several examples of how to apply image-based OTA update for some specific use cases:
• Modifying the intermediate partition layout
• Upgrading release 32.3, 32.4, or 32.5 to the current release with partition layout customization
• ota-demo-host.sh and ota-demo-target.sh sample scripts
• Update on customized devices
For more details about these examples, see the file:
Linux_for_Tegra/tools/ota_tools/version_upgrade/Image_based_OTA_Examples.txt
This file is included in the OTA tool package ota_tools_<rel>_aarch64.tbz2.