preload app during image build

Hi everyone,

I would like to preload an app during the build process of the image, is there a yocto recipe that does that?
The final result would be to have a CI that builds the complete image for our devices, and the flasher image that is very useful to have.


HI Federico!
You can use a full power of self hosted github runner to create a different scenarions during operations with Github Actions.
Recently I created a Github Action for this case, to use it with Open Balena.
If you want, you can open a PR with updated version of Balena CLI to preload image with compression, and publish as build artifact in Github Actions.
Full guide how to setup Self-hosted Github Actions Runner here Manual



i’m still having troubles with that… seems like another volume issue…

here is my pipeline (gitlab ci) but I always get an error:

  image: ubuntu:bionic
  # services:  //tried with and without, same error
  #   - name: docker:dind
  #     alias: docker
    - apt-get update
    - apt-get install -y wget unzip
    - export DEBUG=1
    - wget -O
    - unzip
    - cp balena-cli/balena ./
    - apt-get install -y
    - |
      echo -e "
          balenaUrl: ********
      " > ~/.balenarc.yml
    - ./balena login --credentials --email ***** --password ******
    - wget
    - unzip
    - ./balena preload balena.img --app 14

after balena-preload is built I get:

  RAN: /sbin/losetup -f --show --offset 4194304 --sizelimit 41943040 /img/balena.img
losetup: /img/balena.img: failed to set up loop device: No such file or directory

any idea?