The background to this question is that I have modified the eMMC layout to add a new small partition, which I want to be “permanent”. By this, I mean that when updating the device via a reflash, this particular partition shouldn’t be overwritten. This doesn’t seem possible, so the way I thought to do this is to first read back that new partition, and then run a complete reflash as usual, thereby re-writing the partition I just read back. I am also using the OE4T Yocto layer to generate an image, and using the scripts provided there to flash the Orin.
What I’m finding is that I am only able to write as the first command to tegraflash.py
. As an example: these work:
read A_kernel kernel.bin; read A_kernel-dtb dtb.bin; reboot
write A_kernel kernel.bin; read A_kernel-dtb dtb.bin; reboot
But this fails:
read A_kernel kernel.bin; write A_kernel-dtb dtb.bin; reboot
with the following error:
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
Error: Return value 8
After this error, I do still see the device as available in recovery mode over USB (lsusb
shows the 0955:7023 NVIDIA Corp. APX
device) however generally the fan is spinning hard and it needs resetting. It seems like other calls to tegrarcm_v2
, or re-running flashing scripts also end in failure. I cannot see anything different in the serial debug output between these scenarios.
One other related thing I have noticed; if I run a read followed by recovery reset (e.g. read A_kernel kernel.bin; reboot recovery
), then it also ends up in this bad recovery state. In the debug UART output the last output is this:
I> Reading A_kernel partition.
I> Rebooting : reboot-recovery
E> NV3P_SERVER: Failed to reset recovery device.
Earlier up in the logs for this command - prior to the read taking place - there is a recovery reboot which is successful, with a snippet of the output looking this like:
I> Rebooting : reboot-recovery
[0032.272] I> MB1 (version: 0.32.0.0-t234-54845784-57325615)
[0032.278] I> t234-A01-0-Silicon (0x12347) Prod
[0032.282] I> Boot-mode : Coldboot
[0032.285] I> Emulation:
[0032.288] I> Entry timestamp: 0x00000000
So I wonder if something happens after the first command, which means it’s not in a clean state even though further reads are possible?
Following this, my questions are:
- What can be causing the error when I try a read followed by a write? Is it a fundamental limitation or would different commands result in a success?
- Where can I find more information about
tegraflash.py
,tegrarcm_v2
, tegrabct_v2` and so on? I can see very little reference to them in the Linux Developer Guide, let alone specific documentation for them. - Is my original assumption wrong, and it is possible to exclude certain partitions when flashing the entire eMMC? Then I could avoid doing the read followed by write.
Thanks.