[SOLUTION] Issue with the data/ directory not growing on the Orin AGX, and how to fix it

This is a Continuation/Solution to the Problem outlined here Jetson Orin NX and Jetpack 6 Mender & Intergration issues for the Orin AGX 64gb, and how to adjust the partition configuration prior to a build. Where the mounted data/ directory mapped to partition 16 (UDA) would not grow and consume the remaining free space of the device.

  • Branch: Scarthgap
  • Jetpack: 6
  • Carrier Board: Orin AGX 64gb Devkit

One thing I found a bit difficult was getting the default .xml to modify,

I found by running (After you have sourced all the appropriate layers)
bitbake -c do_install tegra-storage-layout-base
Then the .xml you are looking for is at this path ( For me its this path, yours may be different)
tmp/work/p3737_0000_p3701_0005-poky-linux/tegra-storage-layout-base/36.5.0/flash_t234_qspi_sdmmc_rootfs_ab.xml

local.conf

   # AB-upgrades
    UBOOT_EXTLINUX = "1"
    USE_REDUNDANT_FLASH_LAYOUT_DEFAULT = "1"

    # base
    CONF_VERSION = "2"
    PACKAGE_CLASSES = "package_ipk"
    # eMMC
    EMMC_SIZE = "0"

    # mender-artifact
    MENDER_ARTIFACT_NAME = "orin-agx"

    # mender-full
    MENDER_EFI_LOADER = ""
    MENDER_STORAGE_TOTAL_SIZE_MB = "20000"
    INHERIT += "mender-full"


    INHERIT:remove = "tegra-support-sanity distro_layer_buildinfo"
    INHERIT += "tegra-mender-setup"

    MENDER_FEATURES_DISABLE:append = " mender-uboot"
    MENDER_STORAGE_DEVICE_BASE="/dev/mmcblk0p"
    MENDER_BOOT_PART = "${MENDER_STORAGE_DEVICE_BASE}11"
    MENDER_DATA_PART = "${MENDER_STORAGE_DEVICE_BASE}17"
    MENDER_ROOTFS_PART_A = "${MENDER_STORAGE_DEVICE_BASE}1"
    MENDER_ROOTFS_PART_B = "${MENDER_STORAGE_DEVICE_BASE}2"
    MENDER_UPDATE_POLL_INTERVAL_SECONDS = "60"
    MENDER_INVENTORY_POLL_INTERVAL_SECONDS = "120"

    IMAGE_FSTYPES:tegra = "tegraflash mender dataimg"
    IMAGE_FSTYPES:pn-tegra-minimal-initramfs:tegra = "${INITRAMFS_FSTYPES}"
    IMAGE_FSTYPES:pn-tegra-initrd-flash-initramfs:tegra = "${TEGRA_INITRD_FLASH_INITRAMFS_FSTYPES}"

Make sure the MENDER_DATA_PART is 17 not 16

Modify the flash_t234_qspi_sdmmc_rootfs_ab.xml segment and add the new partition (permament_user_storage) after the reserved and before APP. I haven’t tested removing the reserved partition yet.

        <partition name="reserved" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 502792192 </size> 
            <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="permanent_user_storage" id="17" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 200000000 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x808 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 16384 </align_boundary>
            <filename> DATAFILE </filename>
            <description> Permanent user/device data, persists across A/B updates. </description>
        </partition>
        <partition name="APP" id="1" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> APPSIZE </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </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/mmcblk0p1`. </description>
        </partition>

I made a new .bbappend
mkdir -p recipes-bsp/tegra-binaries/files
touch recipes-bsp/tegra-binaries/tegra-storage-layout-base_%.bbappend

Put the modified flash_t234_qspi_sdmmc_rootfs_ab.xml in the files directory and populate the bbappend with

CUSTOM_LAYOUT_DIR := "${THISDIR}"
do_install:append:p3737-0000-p3701-0005() {
    install -m 0644 ${CUSTOM_LAYOUT_DIR}/files/flash_t234_qspi_sdmmc_rootfs_ab.xml \
        ${D}${datadir}/l4t-storage-layout/flash_t234_qspi_sdmmc_rootfs_ab.xml
}

Build the Image normally, untar, and flash. After first boot, data/ should be pointing to partition 17 and consume the remaining space on the emmc of the Orin AGX.

If you run into a error like this

2026-04-17 06:22:50 - INFO     - | [   6.1390 ] End sector for permanent_user_storage, expected at: 119537630, actual: 0
2026-04-17 06:22:50 - INFO     - | [   6.1391 ]
2026-04-17 06:22:50 - INFO     - | Error: Return value 4
2026-04-17 06:22:50 - INFO     - | Command tegraparser_v2 --generategpt --pt flash.xml.bin
2026-04-17 06:22:50 - INFO     - | cp: cannot stat 'signed/*': No such file or directory
2026-04-17 06:22:50 - INFO     - | cp: cannot stat 'signed/*': No such file or directory
2026-04-17 06:22:50 - INFO     - | mv: cannot stat 'secureflash.xml.save': No such file or directory
2026-04-17 06:22:50 - INFO     - | Signing with zerosbk ...
2026-04-17 06:22:50 - INFO     - |
2026-04-17 06:22:50 - INFO     - | signing images succeeded
2026-04-17 06:22:50 - INFO     - |

Reduce the size of the MENDER_STORAGE_TOTAL_SIZE_MB variable in the local.conf
Hope this helps!

1 Like

Hi @creator117,

Thanks a lot for sharing. Is this something that would make sense to upstream into meta-mender-community? Or does it only apply in very specific situations?

Greetz,
Josef

I believe it would be nice to have

Right now if you generate an image with the stock flash.xml that has the data/ pointing to Partition 16 (UDA), the mender-growfs-data feature will error out Partition configuration | Mender documentation

This is due to the “reserved” partition being right after the UDA partition, blocking UDA from consuming the remainder of the free space.

This limits the data/ directory to only be 400Mb, if you try to increase the size MENDER_DATA_PART_SIZE_MB past 400Mb the building of the Image will fail with
[ 6.1390 ] End sector for UDA, expected at: 119537630, actual: 0

I believe meta-mender-community has something like this for the Orin NX NVMe