Torizon Core Builder and get Ostree update

Hello,

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 http://192.168.1.31:8080/  
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?


output:
  # >> 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,
Michael

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
Kevin

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,
Michael

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
Kevin

Hi @kevin.tx,

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

Best Regards
Michael

Hi @ml_man ,

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

Best Regards
Kevin

Good morning, I have more or less the same problem. I use an imx6ull and corebuilder to bundle a vanilla toradex image with a docker container. The rollout via Torizon Core Builder works. However, I would like to use OStree myself. The branch is configured as test in tcbuild.yaml. When I specify the remote server on the SOM and do a “sudo ostree pull my-remote test” I get the following error. Commit has no requested ref ?test? in ref binding metadata (?6/colibri-imx6ull-emmc/torizon-upstream/torizon-core-docker/release?). I would be interested in what the problem was for you or if someone has an idde where my problem is. Thanks in advance

Hi @Lars_L,

Thanks for reaching out.

Could you maybe open a new ticket as you are on different hardware?

You can link to this ticket here for reference.

Thanks a lot.

Best Regards
Kevin

Hi @Lars_L ,

I have shown my problem at a personal call with Toradex, two months ago. It was connected with missing summary file in OSTree repo served by torizon core builder: torizon-core-builder ostree serve. I’ve got information from @kevin.tx that problem lies with the torizon core builder, and they are working on this issue. I don’t know if it will help with repo not uploaded via ostree serve command, but repo unpacked from build image.

Hi @ml_man,
thank you for the quick response.
I can confirme that. I Started my own server to see witch files where requested by ostree pull.
The output ist:
10.10.10.43 - - [28/Jun/2023 10:46:13] code 404, message File not found
10.10.10.43 - - [28/Jun/2023 10:46:13] “GET /summary.sig HTTP/1.1” 404 -
10.10.10.43 - - [28/Jun/2023 10:46:13] code 404, message File not found
10.10.10.43 - - [28/Jun/2023 10:46:13] “GET /summary HTTP/1.1” 404 -
10.10.10.43 - - [28/Jun/2023 10:46:13] “GET /refs/heads/ELU2 HTTP/1.1” 200 -
10.10.10.43 - - [28/Jun/2023 10:46:13] code 404, message File not found
10.10.10.43 - - [28/Jun/2023 10:46:13] “GET /deltas/6r/i2yCSltTJIinA+6Z2Fatg+OFyjfq25g6nP7c6Hd+E/superblock HTTP/1.1” 404 -
10.10.10.43 - - [28/Jun/2023 10:46:13] code 404, message File not found
10.10.10.43 - - [28/Jun/2023 10:46:13] “GET /objects/ea/b8b6c824a5b532488a703ee99d856ad83e385ca37eadb983a9cfedce8777e1.commitmeta HTTP/1.1” 404 -
10.10.10.43 - - [28/Jun/2023 10:46:13] “GET /objects/ea/b8b6c824a5b532488a703ee99d856ad83e385ca37eadb983a9cfedce8777e1.commit HTTP/1.1” 200 -

so i can the that ostree requested a summary file witch ist not served by the repo.

Hi @Lars_L ,

has this issue been solved?

Best Regards
Kevin

Just to inform everyone here the fix for the missing summary file was committed to TorizonCore Builder recently: ostree serve: Generate the ostree summary file · toradex/torizoncore-builder@0c78830 · GitHub

This is not available yet in the normal release of TorizonCore Builder but you can get access to this fix using either the early-access tag of TorizonCore Builder, or by just building from source. Hope this helps everyone.

Best Regards,
Jeremias

1 Like