Jetpack5.0.2 Orin flash emmc failed

Hi everyone,
I use Orin development board I clone APP image from Orin the the cloned image size is 7995234204 bytes. I copy the image to bootloader/system.img and flash to new Orin module, but failed. the flash command is
sudo ./flash.sh -r -k APP jetson-agx-orin-devkit mmcblk0p1

and the error log as below,I flash small image the size is 5667348540 bytes success. How to fix this issue? Thanks.

[ 5.2162 ] tegrarcm_v2 --chip 0x23 0 --pollbl --download bct_mem mem_rcm_sigheader.bct.encrypt --download blob blob.bin
[ 5.2173 ] BL: version 0.23.0.0-t234-54845784-92215740 last_boot_error: 0
[ 5.3471 ] Sending bct_mem
[ 5.4862 ] Sending blob
[ 6.7401 ] completed
[ 7.7453 ] tegrarcm_v2 --chip 0x23 0 --ismb2applet
[ 7.8855 ] tegrarcm_v2 --chip 0x23 0 --ismb2
[ 7.8888 ] MB2 version 01.00.0000
[ 8.0245 ] Erasing partition
[ 8.0317 ] tegradevflash_v2 --erase APP
[ 8.0330 ] Bootloader version 01.00.0000
[ 8.1673 ] [Done]
[ 10.6615 ] Writing partition
[ 10.6633 ] tegradevflash_v2 --write APP /home/ubuntu/JetPack5.0.2/Linux_for_Tegra/bootloader/system.img
[ 10.6650 ] Bootloader version 01.00.0000
[ 10.7780 ] Writing partition APP with /home/ubuntu/JetPack5.0.2/Linux_for_Tegra/bootloader/system.img [ 7995234204 bytes ]
Error: Return value 3 ] 000%
Command tegradevflash_v2 --write APP /home/ubuntu/JetPack5.0.2/Linux_for_Tegra/bootloader/system.img
Failed to flash/read t186ref.

please also share the serial console log when this error happened.

Hi Wayne,
hte serial console log as attachment ‘flashapp_fail.log’ is flash failed the sysytem size is 7995234204 bytes, and ‘flashapp_ok.log’ is flash successed the sysytem size is 5667348540 bytes.
flashapp_fail.log (20.7 KB)
flashapp_ok.log (107.9 KB)

Hi,

Could you add “-S” in flash.sh and give it a size larger than your system image?

My system size is 7995234204, whant size should to give?

Hi Wayne,
Does my issue like this Cannot change APPSIZE in partition XML file - #9 by JerryChang

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

Yes,I can’t flash image to emmc still.