Flashing CPUBL-CFG and CPUBLCFG_b from rootfs on Xavier NX

Hello,

Is there any way to flash a QSPI partitions from a running system? For example on TX2 and Xavier AGX it is possible to flash any partition using dd since all partitions reside on the eMMC on those devices.

In particular we would like to update the CBoot boot-order and reflash the cbo.dtb after the system running. However, it appears cbo.dtb is not included in bl_update_payload and so the CPUBL-CFG and CPUBL-CFG_b QSPI partitions are not updated when nv_update_engine is run.

Rebooting the system to recovery mode and connecting an x86 host running Jetpack is not an acceptable option for us.

Thanks!

hello 5121802,

just for confirmation,
you’re having update cboot_t194.bin and you would like to update cpu-bootloader partition remotely?

Hi Jerry,

No, we do not need to change the default cboot image (cboot_t194.bin) other than the updates we do using bl_update_payload files and the normal OTA process. However, we would like to update the CPUBL-CFG and CPU-CFG_b partitions on the QSPI with an updated cbo.dtb from the Xavier NX itself.

Is it possible to flash Cboot options partitions on the QSPI locally from the running Xavier NX target?

Thanks!

hello 5121802,

sorry, it can’t be done.
there’s no QSPI partitions if you check with the command, $ ls -al /dev/disk/by-partlabel.
you should enter forced-recovery mode and perform flash script to update cbo.dtb,
thanks

Hi Jerry,

Unfortunately our use case does not allow us to boot to recovery mode and connect to an x86 and run flash.sh. Yes, we understand there are no device nodes for the QSPI. However, is there not an exposed SPI driver interface to flash QSPI partitions? Technically it should be possible since nv_update_engine is flashing the QSPI when processing a bl_update_payload file on the target Xavier NX.

Thanks.

hello 5121802,

if the device has been flashed the cbo.dtb in the fresh flash, then it’s able to use BUP to update the cbo.dtb.
please follow the steps in developer guide, To modify the DTS and rebuild the DTB to generate the cbo.dtb.
and, you should also edit the file, $OUT/Linux_for_Tegra/bootloader/l4t_bup_gen.func as following

@@ -234,6 +234,7 @@ _generate_bl_update_payload()
                                "${signed_dir}"/bpmp_t194_sigheader.bin.${signed_ext} bpmp-fw ${bsp_ver} 0 $_common_spec; \
                                "${signed_dir}"/eks_sigheader.img.${signed_ext} eks ${bsp_ver} 0 $_common_spec; \
                                "${signed_dir}"/adsp-fw_sigheader.bin.${signed_ext} adsp-fw ${bsp_ver} 0 $_common_spec; \
+                               cbo.dtb CPUBL-CFG ${bsp_ver} 0 $_common_spec; \
                                "${signed_dir}"/camera-rtcpu-rce_sigheader.img.${signed_ext} rce-fw ${bsp_ver} 0 $_common_spec;"

please check below method to update cbo.dtb remotely. please use nv_bootloader_payload_update to do the individual partition update.
you should run nv_bootloader_payload_updater --part CPUBL-CFG to update CPUBL-CFG only, then the cbo can work after the reboot.
thanks

Hi Jerry,

Thanks for the update. I won’t be able to try this today so give me a couple of days and I’ll get back to you with the result.

Hi Jerry,

I confirm that this patch works. However, in order to avoid errors in generating bl_update_payloadI did have to make one addition. This is because the cbo.dtb file is moved from the bootloader directory the multi-signed destination so when BUP_generator.py is run again as part of build_l4t_bup.sh it fails complaining cbo.dtb cannot be found. I also changed ${bsp_ver} to 2 since that looks like what it should be set to for Jetpack 4.5.1.

@@ -240,6 +240,7 @@
 				"${signed_dir}"/bpmp_t194_sigheader.bin.${signed_ext} bpmp-fw 2 0 $_common_spec; \
 				"${signed_dir}"/eks_sigheader.img.${signed_ext} eks 2 0 $_common_spec; \
 				"${signed_dir}"/adsp-fw_sigheader.bin.${signed_ext} adsp-fw 2 0 $_common_spec; \
+				cbo.dtb CPUBL-CFG 2 0 $_common_spec; \
 				"${signed_dir}"/camera-rtcpu-rce_sigheader.img.${signed_ext} rce-fw 2 0 $_common_spec;"
 		ENTRY_LIST[kernel]=""${signed_dir}"/${kernel_image_base}_sigheader.img.${signed_ext} kernel 2 0 $_common_spec;"
 
@@ -439,6 +440,9 @@
 	mv "${OUT}"/"${kenel_signed_dir}"/*.dtb* "${OUT}"/multi_signed/"${_sw_spec}"/
 	mv "${OUT}"/*_bootblob_ver.txt "${OUT}"/multi_signed/"${_sw_spec}"/
 
+	# Restore cbo.dtb since the original is moved (not copied) to the multi-signed directory
+	cp "${OUT}"/"${kenel_signed_dir}"/cbo_dtb_backup "${OUT}"/"${kenel_signed_dir}"/cbo.dtb
+
 	# xusb-fw
 	if [ "${tegra_soc}" == "t19x" ]; then
 		cp "${OUT}"/"${xusb_fw}" "${OUT}"/"${signed_dir}"/

Running nv_update_engine with the new bl_update_files indeed flashes the CPUBL-CPG partition on the QSPI. I didn’t try nv_bootloader_payload_updater --part CPUBL-CFG but I image that would also work.

Thanks!

hello 5121802,

FYI,
the “kernel_signed_dir” is unused, we’re removed it in the next public release, (i.e. JetPack-4.6)
thanks

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