Hi,I currently have a working Yocto build for the apalis-imx8 (Apalis iMX8 QuadMax on Ixora Carrier Board). Using the EZ Installer I have the boot partition and the rootfs partition. I would like to make my root partition read only and create a /data partition. I found the TEZI_DATA_ENABLED to add this third partition in the image.json.
The only thing missing now is for the Yocto build system to extract all files staged to /data/* to be packaged into a separate file like “core-image-apalis-imx8.data.tar.xz”. Can someone point me into the environment option to set this if it’s available?
Thanks
Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
I’d be glad to help! Could you let me know which OS and version you are using? Also, which specific hardware are you targeting (e.g., Apalis iMX8QM, Apalis iMX8QP)?
To provide you with the most accurate guidance for creating a /data partition with Yocto, I need to understand your exact setup. You can use the tdx-info command to get detailed information about your system - see https://developer.toradex.com/software/development-resources/tdx-info/
Common platforms include:
- Hardware: Verdin i.MX8M Plus, Verdin AM62, Aquila AM69, Apalis i.MX8QP, Colibri i.MX8X, Ivy Carrier Board, Ixora Carrier Board, Mallow Carrier Board, IMX95
- OS: Yocto 7.2.0, Torizon 6.8.2, Torizon OS 6, BSP 7, BSP 6, Torizon OS 7.2.0-build.13
Once you provide this information, I can give you specific guidance on using the proper Yocto classes and variables for creating your /data partition configuration.
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
The hardware I’m using is Apalis iMX8 QuadMax on Ixora Carrier Board. Thanks
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:
- Extract files from the
/data directory in your rootfs
- Create a separate data partition in the image.json configuration
- 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
- Add
inherit tdx-tezi-data-partition to your image recipe
- Configure any necessary filesystem options using the variables mentioned above
- Stage your application data files to
/data/* in your rootfs
- 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?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
I did as instructed but the final output did not extract files from the /data directory to a separate tarball. This causes the /data partition to not have anything in it.
I found a solution. Hopefully this helps someone down the road.
In my custom image recipe, I added a ROOTFS_POSTPROCESS_COMMAND to split the /data contents out of the rootfs so it can be included in the final TEZI tarball.
ROOTFS_POSTPROCESS_COMMAND += "custom_rootfs_post_process;"
custom_rootfs_post_process () {
if [ -d ${IMAGE_ROOTFS}/data ]; then
tar -cJf ${IMGDEPLOYDIR}/${IMAGE_NAME}.data.tar.xz -C ${IMAGE_ROOTFS}/data .
ln -s ${IMAGE_NAME}.data.tar.xz ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.rootfs.data.tar.xz
rm -rf ${IMAGE_ROOTFS}/data
fi
}
Then I appended the IMAGE_CMD:teziimg function to add the data tar to the final image:
IMAGE_CMD:teziimg:append () {
# Append /data partition tar to final tar image
local outname=${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}
local outfile=${outname}.tar
local datatar=${PN}-${MACHINE}.rootfs.data.tar.xz
tar -rhf ${IMGDEPLOYDIR}/${outfile} -C ${IMGDEPLOYDIR} --transform "s|^|$outname/|" $datatar
}
I also added this to avoid the rootfs disk partition from expanding since I have a /data partition that would take up the rest of the disk space. I wish the toradex class would allow for an environment variable to set rootfs want_maximised to false. Until then this is my solution for that:
IMAGE_CMD:teziimg:prepend () {
# Configure rootfs partition to not expand
sed -i '0,/"want_maximised": true,/s//"want_maximised": false,/' ${IMGDEPLOYDIR}/image-${IMAGE_BASENAME}.json
}