How to use TEZI_DATA_ENABLED to create a /data partition

For the Apalis iMX8 QuadMax, you can use the tdx-tezi-data-partition class to create a /data partition (1). This class is specifically designed to extract files staged to /data/* and package them into a separate tarball for the Toradex Easy Installer.

Setting up the Data Partition

To enable the data partition functionality, you need to inherit from the tdx-tezi-data-partition class in your Yocto image recipe (2). This class will automatically:

  1. Extract files from the /data directory in your rootfs
  2. Create a separate data partition in the image.json configuration
  3. Package the data files into a tarball for deployment

Configuration Variables

Based on the community discussion, you can use these variables to customize your data partition (2):

  • TEZI_DATA_FSOPTS - for filesystem options
  • TDX_TEZI_DATA_PARTITION_FSOPTS - for data partition-specific filesystem options

For example, if you need specific mkfs options:

TEZI_DATA_FSOPTS = "-O verity"

(2)

Image.json Configuration

The Easy Installer configuration supports creating additional partitions through the blockdevs and partitions properties (3). The data partition will be automatically configured with properties like:

  • partition_size_nominal: Size in MB (3)
  • want_maximised: Set to true if you want the partition to use remaining space (3)
  • content: Specifies filesystem type and options (3)

Implementation Steps

  1. Add inherit tdx-tezi-data-partition to your image recipe
  2. Configure any necessary filesystem options using the variables mentioned above
  3. Stage your application data files to /data/* in your rootfs
  4. Build your image - the build system will automatically extract the data files and create the appropriate image.json configuration

The resulting build will create both your main rootfs and a separate data tarball that gets deployed to the /data partition during installation.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.