Torizon Core Builder and get Ostree update


I’m using Apalis IMX8QM on Ixora v1.2A carrier board. Kernel version: 5.4.161-5.7.0-devel+git.0f0011824921.

I’m trying to update my operating system by Ostree repository. I’ve done everything what is presented in this tutorial: OSTree. Everything gone fine.
Unfortunately my OS is not only made by Yocto, but also customized by Torizon Core Builder. And here comes the problem - how can I properly extract Ostree repository after build the image? How can I properly upload it to my device and make update?

Firstly I thought that new ostree repository will be in /deploy directory in Torizon Core Builder, and I found it in torizon-core-docker-apalis-imx8.ota.tar.zst file. After extracting I put to into my device by USB flash drive. When I tried use ostree pull-local <dir> base command I got error:

error: Commit c6be0424398ba4d7676c8da5ba1a6021ac3a53b8bad2a28c3056331373548efb: Commit has no requested ref ?base? in ref binding metadata (?5/apalis-imx8/torizon/torizon-core-docker/testing?)

I tried to do this in a different ways (copy diffrent files from torizon-core-docker-apalis-imx8.ota.tar.zst, create repo and ref “base” locally), but all the time I got the same error. After this I noticed there is the option to serve ostree repo via http using torizon core builder (ostree serve command). I’ve done this, ostree repo was properly uploaded on port 8080, but when I try to get this on my device and get info about refs, or download ref “base” I get the same error:

root@apalis-imx8-07029113:/home/torizon# ostree remote add test  
root@apalis-imx8-07029113:/home/torizon# ostree remote refs test
ostree remote refs: ostree_repo_remote_fetch_summary_with_options: GPG feature is disabled in a build time
error: Remote refs not available; server has no summary file

root@apalis-imx8-07029113:/home/torizon# ostree pull test base
Receiving metadata objects: 2/(estimating) 469 bytes/s 938 bytes
error: Commit eaba8849f9d255bdf11dd1aefefeeaac07bb19bd88649c0fe47a18b7880525a8: Commit has no requested ref ?base? in ref binding metadata (?5/apalis-imx8/torizon/torizon-core-docker/testing?)

What is properly way to get new ostree repository on my device and make the update? Am I doing something wrong or is there any other option to receive new ostree commit? You can also tell what the lines in tcbuild.yaml file below are for?

  # >> OSTree deployment configuration (relevant also for Easy Installer output).
  # ostree:
    # branch: my-dev-branch
    # commit-subject: "OSTree commit subject"
    # commit-body: "OSTree commit body"
  # >> Parameters for deploying to an Easy Installer image.

To rebuild my image I put “base” as ostree branch. I haven’t use OSTree before.

Best regards,

Hi @ml_man ,

Now, lets try to separate the issue a bit.

First, can you maybe elaborate why you’re trying to use ostree directly? We ask this because we have the Torizon Platform, that you can use to push updates onto your device.

Second, have you successfully tried to do the same steps with a vanilla TorizonCore Image from Toradex?
If this does not work either, please share possible error messages.

If this does work for you, maybe your Yocto build has some misconfiguration in it. You might need to check your build if that’s the case.

Actually, by using Torizon it is not necessary to use OSTree directly. We abstracted that for you.

Best Regards

Hi @kevin.tx ,

I forgot to add I have used Torizon Platform before and I know how to make update via OTA. I also have tried other ways of system update afforded by Toradex :slight_smile:
I’m trying to update system using Ostree to check alternatives of Over-The-Air updates and test this way of system update.

What do you mean by vanilla TorizonCore? Some reference image which is possible to download by Toradex Easy Installer? I should to check if this image will see properly refs from OSTree repo hosted by torizon core builder on port 8080?

I thought the torizon-core-builder ostree serve will be the best option to receive current OSTree repo, but I don’t understand why I have the problem described upper if the new version of the image build by torizon-core-builder is the same system as on my device, with just one extra file.

Best regards,

Hi @ml_man,

Great to hear that :slight_smile:

Would you be interested in a call, so that we can understand your use case even better?

Yes correct. By vanilla TorizonCore image I mean an unmodified version of the TorizonCore image.

I guess we could make this part of the call too.

Best Regards

Hi @kevin.tx,

yes, we can schedule a call for the next week. Please write me with time proposals.

Best Regards

Hi @ml_man ,

All right. I will send you some time proposals for next week.

Best Regards