Jetson Orin nx manual add flash partition failed

I want to add a save file partition in ssd, used to save program data. According to flash command

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 p3509-a02+p3767-0000 internal

so i go to change flash_l4t_external.xml like this:

        <partition name="APP" id="1" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 53687091200 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <align_boundary> 4096 </align_boundary>
            <percent_reserved> 0 </percent_reserved>
            <filename> APPFILE </filename>
            <unique_guid> APPUUID </unique_guid>
            <description> **Required.** Contains the rootfs. This partition must be defined
              after `primary_GPT` so that it can be accessed as the fixed known special device,
              for example, `/dev/mmcblk1p1` or `/dev/nvme0n1p1`. </description>
        </partition>
        <partition name="SDCARD" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 966367641600 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> sdcard.img </filename>
            <description> **Required.** sdcard section. </description>
        </partition>

when i use sdkmanager to flashed the Jetson orin nx chip, it not contains the partition.

Hi,

Are you sure you are modifying the file that SDK Manager uses?
Any flashing log?
What does your sdcard.img contain?

I just want to manual create a partition work as save user data, like sdcard mount in some file system node.but the script automatically use all empty size to APP partition when i had set -S 60GiB and update flash_l4t_t234_nvme.xml num_sectors value.
Is there any other way to create a space of a specified size.

How about this?
Put the flashing log here, please.

I’m really sorry for replying so late, It’s a custom carry board.
flash.log (610.0 KB)

What file are you working on exactly?

flash_l4t_external.xml

or

flash_l4t_t234_nvme.xml

?

SDK Manager by default uses flash_l4t_t234_nvme.xml, so any changes in flash_l4t_external.xml would never take effect.
Please also delete any files under Linux_for_Tegra/bootloader/ starting with flash.xml* and try again.

I am quite certain that flash_l4t_t234_nvme.xml is being used.
when delete all flash.xml* under bootloader , the result is still the same, APP partition had auto expand.
flash.log (305.7 KB)

I have copied the configured nvme through a nvme copying machine, when i insert it into another new Orin kit, the device not start up as planned. Did i not configure which step?

But according to your first post, changes were made in flash_l4t_external.xml, but not flash_l4t_t234_nvme, so what exactly do you have with these two files now?

Flash the module to update it’s QSPI bootloader:

sudo ./flash.sh --no-systemimg -c bootloader/t186ref/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit nvme0n1p1

I’m sure when i change flash_l4t_t234_nvme.xml UDA partition size then flashed partition will also changed.

This is the document i referenced: jetson-orin-nano-tutorial-ssd-install-boot-and-jetpack-setup

Then what exactly is your goal now?
Isn’t it enough to just use the UDA partition?

Did you run the script to skip OEM config?
Then the APP partition gets enlarged to the max upon boot automatically.

I had a 1T ssd, so i want to enlarge the UDA partition to 900GiB, but failed flash job, It doesn’t seem to support such a large space allocation.

I need this one.

Also this one.

when i changed the flash_l4t_external.xml file partition, Orin partition not change, and through command line flash, Orin kit have start problem.
So i had found jetson-orin-nano-tutorial-ssd , and directly through nvsdkmanager_flash.sh to flash Orin kit, in this .sh used partition configure file is flash_l4t_t234_nvme

Then what is your so-called start problem?
Your whole topic is messy and hard to catch the real point.

I apologize for any inconvenience caused by my description, so in flash_l4t_t234_nvme file how to change UDA partition size? does it support space allocation of 900GB size?

       <partition name="UDA" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 900 GiB </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 16384 </align_boundary>
            <description> **Required.** This partition may be mounted and used to store user
              data. </description>
        </partition>
        <partition name="reserved" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 502792192 </size> <!-- Recalculate the size if RECSIZE changed -->
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Required.** Reserve space in case there is any partition change
              required in the future, for example, adding new partitions or increasing size
              of some partitions. </description>
        </partition>
        <partition name="APP" id="1" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 60 GiB </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x808 </allocation_attribute>
            <align_boundary> 16384 </align_boundary>
            <percent_reserved> 0 </percent_reserved>
            <unique_guid> APPUUID </unique_guid>
            <filename> APPFILE </filename>
            <description> **Required.** Contains the rootfs. This partition must be assigned
              the "1" for id as it is physically put to the end of the device, so that it
              can be accessed as the fixed known special device `/dev/nvme0n1p1`. </description>
        </partition>
        <partition name="secondary_gpt" type="secondary_gpt">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 0xFFFFFFFFFFFFFFFF </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>

What do you get with this file after flashing?
You didn’t provide any log so there is no way we can debug it.

I think you can just make the allocation_attribute of SDCARD 0x808, so it takes all the space left.

when i use flash_l4t_nvme.xml partition config file, UDA partition auto enlarged, not need to add a new partition for save data purpose.