Unable to successfully burn EMMC partition, it will stop in the process of burning app image

Platform: AgX Xavier

Problems encountered: burning EMMC will stop at “writing partition app with” system.img ", the progress is always 0%:

[ 16.0023 ] Writing partition mb1 with mb1_t194_prod_sigheader.bin.encrypt
[ 16.0028 ] […] 100%
[ 16.0116 ] Writing partition mb1_b with mb1_t194_prod_sigheader.bin.encrypt
[ 16.1126 ] […] 100%
[ 16.1210 ] Writing partition spe-fw with spe_t194_sigheader.bin.encrypt
[ 16.1467 ] […] 100%
[ 16.1504 ] Writing partition spe-fw_b with spe_t194_sigheader.bin.encrypt
[ 16.1710 ] […] 100%
[ 16.1751 ] Writing partition mb2 with nvtboot_t194_sigheader.bin.encrypt
[ 16.1954 ] […] 100%
[ 16.2011 ] Writing partition mb2_b with nvtboot_t194_sigheader.bin.encrypt
[ 16.2238 ] […] 100%
[ 16.2301 ] Writing partition mts-preboot with preboot_c10_prod_cr_sigheader.bin.encrypt
[ 16.2527 ] […] 100%
[ 16.2545 ] Writing partition mts-preboot_b with preboot_c10_prod_cr_sigheader.bin.encrypt
[ 16.2738 ] […] 100%
[ 16.2751 ] Writing partition SMD with slot_metadata.bin
[ 16.2939 ] […] 100%
[ 16.2949 ] Writing partition SMD_b with slot_metadata.bin
[ 16.3084 ] […] 100%
[ 16.3093 ] Writing partition VER_b with emmc_bootblob_ver.txt
[ 16.3219 ] […] 100%
[ 16.3229 ] Writing partition VER with emmc_bootblob_ver.txt
[ 16.3357 ] […] 100%
[ 16.3367 ] Writing partition master_boot_record with mbr_1_3.bin
[ 16.3493 ] […] 100%
[ 16.3503 ] Writing partition APP with system.img
[ 16.3577 ] [ ] 000%

Before burning, I left enough space for EMMC to create a new partition. I made a modification to the original Linux_ for_ Tegra/bootloader/t186ref/cfg/flash_ t194_ sdmmc.xml The app partition size in the file is reduced from 28gib to 20gib, as follows:

<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
21474836480
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<align_boundary> 4096 </align_boundary>
<percent_reserved> 0 </percent_reserved>
<unique_guid> APPUUID </unique_guid>
APPFILE
Required. Contains the rootfs. This partition must be defined after
primary_gpt so it can be accessed as the fixed known special device
/dev/mmcblk0p1.

How to solve this problem?

hello guwen,

could you please confirm you’re able to flash Jetson AGX Xavier with the default JetPack release image?
thanks

Of course, I use the default mirror and can burn, and then based on this, modified the XML file, wanted to shrink the APP partition, but failed to do so

hello guwen,

please check Partition Configuration, it is APPSIZE to define the size of root file system.
according to Setting Optional Environment Variables session, you may assign ROOTFSSIZE, or using command -S to configure Linux RootFS size.
thanks

I used "sudo/ flash.sh -R - s 28991029248 - K app Jetson Xavier mmcblk0p1"to burn the app partition, which can be burned normally. However, the size of the app partition is still 28gib in “sudo fdisk - l”. It is not worked!!!

hello guwen,

it looks you’re using incorrect commands for flashing.
please refer to the readme from flash script.
for example,

        -S <size> ------------ Rootfs size in bytes. Valid only for internal
                               rootdev. KiB, MiB, GiB short hands are allowed,
                               for example, 1GiB means 1024 * 1024 * 1024 bytes.

could you please test with below flash commands for verification,
i.e. $ sudo ./flash.sh -S 20GiB jetson-xavier mmcblk0p1

Sorry, I do use it “sudo ./flash.sh -r -S 28991029248 -k APP jetson-xavier mmcblk0p1”

I input wrong case when I reply your proposal. And it do not worked!!! Is there any other method to solve this problems?

I added “echo ROOTFSSIZE” at tegraflash.py file, and print is write!

Try instead:
sudo ./flash.sh -r -S 27GiB -k APP jetson-xavier mmcblk0p1
(bytes in multiples of 1024*1024*1024 instead of exact byte size without the abbreviation)