Documentation: Custom persistent partition for A/B update state storage
Summary
Successfully implemented a custom persistent partition (permanent_user_storage)
that survives A/B rootfs updates on Jetson Orin Nano. This addresses a gap
identified in #2282 where developers need persistent storage for SWUpdate
Suricatta/hawkBit state and other use cases requiring data persistence across
slot switches.
Context
Users need persistent storage that survives A/B updates for:
Environment
- Hardware: NVIDIA Jetson Orin Nano
- meta-tegra branch: 36.5.x (Scarthgap)
- Yocto release: Scarthgap
Problem
The default NVIDIA partition layout on Orin has no dedicated persistent
data partition that survives A/B updates. The cboot bootloader environment
doesn't support T234 (Orin) for storing state, and U-Boot isn't available
on this platform.
Working Solution
Added custom partition using full flash layout XML override:
# tegra-storage-layout_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://flash_l4t_t234_nvme_rootfs_ab.xml"
PARTITION_FILE_EXTERNAL := "${TOPDIR}/../meta-<your-layer>/recipes-bsp/tegra-binaries/files/flash_l4t_t234_nvme_rootfs_ab.xml"
Custom partition inserted before APP and APP_b. First-boot systemd service
formats as ext4 and mounts at /mnt/persistent.
Key Technical
tegra-binaries disables standard fetch/unpack; immediate expansion (:=)
is required for PARTITION_FILE_EXTERNAL
Partition appears as /dev/nvme0n1pXX (device node path)
Label symlink not automatically created, use direct path for mounts
Proposed Documentation
I can contribute documentation covering:
-
Why persistent storage is needed (including use cases like #2282)
-
Full custom XML approach with PARTITION_FILE_EXTERNAL
-
Required bbappend configuration
-
First-boot formatting and mounting with systemd
-
Path resolution pitfalls and binary recipe quirks
Related
#2282 - Request for Suricatta/hawkBit persistent state storage
Would this documentation be useful to merge? Happy to submit a PR.
Documentation: Custom persistent partition for A/B update state storage
Summary
Successfully implemented a custom persistent partition (
permanent_user_storage)that survives A/B rootfs updates on Jetson Orin Nano. This addresses a gap
identified in #2282 where developers need persistent storage for SWUpdate
Suricatta/hawkBit state and other use cases requiring data persistence across
slot switches.
Context
Users need persistent storage that survives A/B updates for:
Environment
Problem
The default NVIDIA partition layout on Orin has no dedicated persistent
data partition that survives A/B updates. The cboot bootloader environment
doesn't support T234 (Orin) for storing state, and U-Boot isn't available
on this platform.
Working Solution
Added custom partition using full flash layout XML override:
Custom partition inserted before APP and APP_b. First-boot systemd service
formats as ext4 and mounts at /mnt/persistent.
Key Technical
tegra-binaries disables standard fetch/unpack; immediate expansion (:=)
is required for PARTITION_FILE_EXTERNAL
Partition appears as /dev/nvme0n1pXX (device node path)
Label symlink not automatically created, use direct path for mounts
Proposed Documentation
I can contribute documentation covering:
Related
Would this documentation be useful to merge? Happy to submit a PR.