AGX ORIN 502 SOM flash failed with system.img cloned from 501 SOM

Hi:

We used to work on 501 SOM with JetPack5.1.4, on our custom board. I used commands below to generate system.img and flah it to other 501 SOM, it works well.

sudo ./flash.sh -r -k APP -G clone.img jetson-agx-orin-devkit mmcblk0p1
sudo cp clone.img bootloader/system.img
sudo ./flash.sh -r -k APP jetson-agx-orin-devkit mmcblk0p1

Now i received a 502 SOM, it fails when i tried to flash our old system.img.

[  15.3261 ] Added binary blob_spe_t234_sigheader.bin.encrypt of size 270336
[  15.3263 ] Added binary blob_tos-optee_t234_sigheader.img.encrypt of size 1288096
[  15.3267 ] Added binary blob_eks_t234_sigheader.img.encrypt of size 9232
[  15.3369 ] Sending membct and RCM blob
[  15.3387 ] tegrarcm_v2 --chip 0x23 0 --pollbl --download bct_mem mem_rcm_sigheader.bct.encrypt --download blob blob.bin
[  15.3399 ] BL: version 1.4.0.4-t234-54845784-e89ea9bc last_boot_error: 0
[  15.3684 ] Sending bct_mem
[  15.4118 ] Sending blob
[  16.7438 ] completed
[  17.7497 ] tegrarcm_v2 --chip 0x23 0 --ismb2applet
[  17.7882 ] tegrarcm_v2 --chip 0x23 0 --ismb2
[  17.7903 ] MB2 version 01.00.0000
[  17.8321 ] Get magic id
[  17.8350 ] tegraparser_v2 --get_magic data
[  17.8377 ] DATA
[  17.8377 ]
[  17.8377 ] partition type data, magic id = DATA
[  17.8380 ] Erasing partition
[  17.8492 ] tegradevflash_v2 --erase APP
[  17.8508 ] Bootloader version 01.00.0000
[  17.8867 ] [Done]
[  19.0191 ] Writing partition
[  19.0232 ] tegradevflash_v2 --write APP /home/ubuntu/work/Orin-JetPack5.1.4/Linux_for_Tegra/bootloader/system.img
[  19.0266 ] Bootloader version 01.00.0000
[  19.0602 ] Writing partition APP with /home/ubuntu/work/Orin-JetPack5.1.4/Linux_for_Tegra/bootloader/system.img [ 7489168396 bytes ]
[  19.0617 ] [                                                ] 000%
Error: Return value 3                                         ] 000%
Command tegradevflash_v2 --write APP /home/ubuntu/work/Orin-JetPack5.1.4/Linux_for_Tegra/bootloader/system.img
Failed to flash/read t186ref.
[0020.116] I> Task: Disable SCPM/POD reset
[0020.120] I> SLCG Global override status := 0x0
[0020.124] I> MB1: MSS reconfig completed
I> MB2 (version: 0.0.0.0-t234-54845784-7f6f63a6)
I> t234-A01-1-Silicon (0x12347)
I> Boot-mode : RCM Flash
I> Emulation:
I> Entry timestamp: 0x01338335
I> Regular heap: [base:0x40040000, size:0x10000]
I> DMA heap: [base:0x82e800000, size:0x800000]
I> Task: ARI update carveout TZDRAM (0x50002050)
I> Task: Check MC errors (0x5000204c)
I> Task: SMMU external bypass disable (0x500184fc)
I> Task: PSC mailbox init (0x50018548)
I> Task: Map CCPLEX_INTERWORLD_SHMEM carveout (0x50001ff8)
I> Task: Program CBB PCIE AMAP regions (0x5001b9dc)
I> Task: Boot device init (0x50001f40)
I> Boot_device: QSPI_FLASH instance: 0
I> Qspi clock source : pllc_out0
I> QSPI-0l initialized successfully
I> Task: Partition Manager Init (0x50001f20)
I> Active chain: 0
I> Found 57 partitions in QSPI_FLASH (instance 0)
I> Active chain: 0
W> Cannot find any partition table for 00000003
 > PARTITION_MANAGER: Failed to publish partition.
I> Active chain: 0
I> Found 15 partitions in SDMMC_USER (instance 3)
I> Task: Check MC errors (0x5000204c)
I> Task: Trigger mailbox for PSC-BL1 exit (0x500185c8)
I> Sending opcode 0x4d420802 to psc
I> Received ACK from psc
I> Task: Enter 3p server (0x500020e8)
I> USB configuration success
I> Erasing APP partition
I> Writing APP partition.
E> NV3P_SERVER: Could not write 1048576 bytes.

here is the flash log and serial log.

custom-ng-flash.txt (72 KB)

custom-ng-serial.txt (28 KB)

The <allocation_attribute> in /Linux_for_Tegra/bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml is already 0x808.

I want to known if my operation is workable.

please create a new image for 502 SOM and that one might work on both 501 and 502 SOM.