Torizon Core Builder deploy permanent data to EasyInstaller Image

If you need to put your M4 firmware in /var then you can also do the following.

In the folder you use to install with Easy Installer there should be a file called image.json, with contents that look something like:

image.json
{
    "config_format": 3,
    "autoinstall": false,
    "name": "Torizon OS Easy Pairing (UPSTREAM)",
    "description": "Torizon OS Linux with Easy Pairing application. Use the code from Torizon Cloud to pair the device.",
    "version": "7.4.0+build.28.modified.container",
    "release_date": "2025-10-22",
    "u_boot_env": "u-boot-initial-env-spl",
    "prepare_script": "prepare.sh",
    "wrapup_script": "wrapup.sh",
    "marketing": "marketing.tar",
    "icon": "toradexlinux.png",
    "license": "LA_OPT_NXP_SW.html",
    "supported_product_ids": [
        "0027",
        "0028",
        "0029",
        "0035",
        "0082",
        "0083",
        "0084",
        "0085"
    ],
    "blockdevs": [
        {
            "name": "mmcblk0",
            "partitions": [
                {
                    "partition_size_nominal": "512",
                    "want_maximised": true,
                    "content": {
                        "label": "otaroot",
                        "filesystem_type": "ext4",
                        "mkfs_options": "-E nodiscard",
                        "filename": "torizon-docker-apalis-imx6.ota.tar.zst",
                        "uncompressed_size": 1120.5171482086182,
                        "filelist": [
                            "docker-compose.yml:/ostree/deploy/torizon/var/sota/storage/docker-compose/",
                            "docker-storage.tar.xz:/ostree/deploy/torizon/var/lib/docker/:true",
                            "target_name:/ostree/deploy/torizon/var/sota/storage/docker-compose/"
                        ]
                    }
                }
            ]
        },
        {
            "name": "mmcblk0boot0",
            "erase": true,
            "content": {
                "filesystem_type": "raw",
                "rawfiles": [
                    {
                        "filename": "SPL",
                        "dd_options": "seek=2"
                    },
                    {
                        "filename": "u-boot.img",
                        "dd_options": "seek=138"
                    }
                ]
            }
        }
    ]
}

First copy your M4 firmware binary to this folder. Then modify the image.json file to install your M4 binary to /var like so (notice the new entry under filelist):

...
    "blockdevs": [
        {
            "name": "mmcblk0",
            "partitions": [
                {
                    "partition_size_nominal": "512",
                    "want_maximised": true,
                    "content": {
                        "label": "otaroot",
                        "filesystem_type": "ext4",
                        "mkfs_options": "-E nodiscard",
                        "filename": "torizon-docker-apalis-imx6.ota.tar.zst",
                        "uncompressed_size": 1120.5171482086182,
                        "filelist": [
                            "docker-compose.yml:/ostree/deploy/torizon/var/sota/storage/docker-compose/",
                            "docker-storage.tar.xz:/ostree/deploy/torizon/var/lib/docker/:true",
                            "target_name:/ostree/deploy/torizon/var/sota/storage/docker-compose/",
                            "hello_world.bin:/ostree/deploy/torizon/var/"
                        ]
                    }
                }
            ]
        },
...

You can then flash this with Toradex Easy Installer and your binary file should be located at /var in the final filesystem. You should then be able to load this binary as documented here: How to Load Compiled Binaries into Cortex-M | Toradex Developer Center

Please keep in mind this is for Torizon OS specifically, if you are not using a Torizon OS based image, then the instructions may be different. In which case please open a new thread with the details on what software you are exactly using.

Best Regards,
Jeremias