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.

Thanks
Federico

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

2 Likes

Hi,

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

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

patch:
  image: ubuntu:bionic
  # services:  //tried with and without, same error
  #   - name: docker:dind
  #     alias: docker
  script:
    - apt-get update
    - apt-get install -y wget unzip
    - export DEBUG=1
    - wget https://github.com/balena-io/balena-cli/releases/download/v11.36.0/balena-cli-v11.36.0-linux-x64-standalone.zip -O balena.zip
    - unzip balena.zip
    - cp balena-cli/balena ./
    - apt-get install docker.io -y
    - |
      echo -e "
          balenaUrl: ********
      " > ~/.balenarc.yml
    - ./balena login --credentials --email ***** --password ******
    - wget https://files.balena-cloud.com/images/intel-nuc/2.68.1%2Brev1.dev/image/balena.img.zip
    - unzip balena.img.zip
    - ./balena preload balena.img --app 14

after balena-preload is built I get:

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

any idea?

Thanks