Skip to content

common-torizon: Yocto autoprovision is not supported #436

@hiagofranco

Description

@hiagofranco

Hi!

Currently, the auto-provision using Yocto flags described here https://github.com/torizon/meta-toradex-torizon/blob/scarthgap-7.x.y/conf/template/local.conf#L98 does not work with any common-torizon machine.

This happens because of this line inside classes/image_type_torizon.bbclass:

TEZI_IMAGE_TEZIIMG_PREFUNCS:prepend = "gen_torizon_prov_data pack_tcb_signing_binaries_in_teziimg "

gen_torizon_prov_data needs to be called (by setting TORIZON_SOTA_PROV_MODE) in order to generate the provision data for the device. However, today, it is tezi doing this job. Tezi prefuncs creates the provision data and add to the device, as shown o the image.json file:

            "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": 529.546612739563,
                        "filelist": [
                            "provisioning-data.tar.gz:/ostree/deploy/torizon/var/sota/:true"
                        ]
                    }
                }
            ]

As common-torizon does not have Tezi, gen_torizon_prov_data is never called, despite setting the appropriate TORIZON_SOTA_PROV_* in the local.conf, and the device cannot be provisioned.

I tried to add this function to do_image_wic and do_image_ostreecommit prefuncs, but it did not work.

To solve this issue, I basically copied the code written on classes/torizon_base_image_type.inc and added the same procedure as an auto-provisioning_%.bbappend in our layer, installing the files manually into the rootfs, so now it works (and, therefore, this issue is not a blocker). However I am sharing this in case someone gets into the same error.

I know TCB is another option to provision the device, but currently TCB is messing with my .wic image, so I am not using it (as described here torizon/torizoncore-builder#120).

Maybe a warning saying "this is currently not supported with common-torizon" on local.conf file?

Hope this helps!

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions