ci4rail / yocto-images

Repo to build Ci4Rails Linux Images
MIT License
0 stars 0 forks source link
mender yocto

yocto-images

Build definitions and scripts for Ci4Rail Images.

This repo can host several projects (with different Yocto versions, machines etc.).

Yocto builds are performed using kas.

Images

The following images are currently built by this repo.

standard-image

CPU01 CPU01Plus

An image for HW platform tests and bringup including the following features:

Target Platforms:

devtools-image

CPU01 CPU01Plus

An image for HW platform tests and bringup including the following features:

Target Platforms:

Building

Github Actions

Images are build automatically via github actions.

The following figure shows which steps are executed for corresponding image types:

Yocto Images Pipelines

Local build (via Yocto Make GUI)

Run

./yocto.sh

and choose image as target. Then select the image which you would like to build.

Local build (via Commandline)

You can use the default setting, but MENDER_DEVICE_ID must be adapted to the device you want to use to deploy locally built images via mender

To build an image, run make with IMAGE_DIR set to the image directory, for example:

make IMAGE_DIR=cpu01-devtools-image image

See Makefile for further build targets and instructions.

Install Images

Download Mender CLI and install it to /usr/local/bin.

mv mender-cli /usr/local/bin

To deploy an image to a specific device set the device ID you want to use for the deployment in config/custom.env:

MENDER_DEVICE_ID=<device id from mender portal>

Deploy images via mender (via Yocto Make GUI)

Make sure, you entered the mender credentials in config/secret.env.

To upload a image to mender, run

./yocto.sh

and choose mender-upload as target. Then select the image which you would like to upload.

To deploy a image on your device, run

./yocto.sh

and choose mender-deploy as target. Then select the image which you would like to deploy.

You can also use the shortcut target mender, which builds the image, uploads it to mender and deploys it on your device.

Deploy images via mender (via Commandline)

Login with mender-cli login.

Upload image to mender, e.g.:

make IMAGE_DIR=cpu01-devtools-image mender-upload

Start deployment

make IMAGE_DIR=cpu01-devtools-image mender-deploy