Yocto App Development flow

Note: EmbedOps CLI and images require a Yocto Standard SDK installation script that targets an x86_64 host (generated from Step 6 of Building an SDK Installer).

Adding/Updating SDK

EmbedOps provides a script called sdk_install_helper.sh that takes the path to an installation script as an argument.

Example:

./sdk_install_helper.sh ./poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-4.1.3.sh

This script generates a gzipped tarball named yocto-standard-sdk.tar.gz that is required by the EmbedOps CLI and the EmbedOps image used in the CI pipeline. This tarball should be committed and pushed to your Git repo.


Due to the potentially large size of the generated tarball, we suggest using Git LFS for these files. Git LFS installation and configuration instructions are available at https://git-lfs.com/.


After initially adding the tarball with Git LFS, you can re-run the helper script on any new Standard SDK installation scripts (which should be generated whenever the Yocto image gets updated), and Git LFS should properly handle differences between the old and new tarball.

Building Locally with EmbedOps CLI

With the yocto-standard-sdk.tar.gz present, you can use the EmbedOps CLI to run the build locally. In your pipeline YAML file (provided by Embedops), you should see a step/job that looks like the following (Bitbucket example shown)

- step: &step_1

name: yocto-app-build

image:

name: 623731379476.dkr.ecr.us-west-2.amazonaws.com/yocto-app:1.0

aws:

access-key: $AWS_ACCESS_KEY_ID

secret-key: $AWS_SECRET_ACCESS_KEY

script:

- export EMBEDOPS_JOB_NAME="yocto-app-build"

- embedops-build-yocto-app "scripts/build_script.sh"

artifacts:

download: false

paths:

- artifacts/**

To run the above example locally, run the following command

embedops-cli jobs run yocto-app-build

The command will

  1. Untar the yocto-standard-sdk.tar.gz file to a directory called yocto-standard-sdk if not present. If an untar is required, the build will take longer than usual but will be faster in subsequent runs. (Note: It might be faster to untar the file before running the build command. Ignore any errors that might pop-up during untar).
  2. Setup the environment for the Yocto SDK app build
  3. Run the build script specific to the project

There is no need to run source in the project build script. The yocto-app image and the embedops-build-yocto-app script will handle that setup.

CI Pipelines

The EmbedOps CLI mimics how CI pipelines run steps/jobs defined in the Pipeline YAML. As long as the pipeline YAML step for the Yocto app build provided by EmbedOps and the yocto-standard-sdk.tar.gz are present, the build should work properly in your CI pipeline.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.