Build Clea OS
Download and build Clea OS
This section describes steps to create a local build directory and how to use repo to download all needed
files.
After that the build directory gets setup for one specific machine and distribution and a standard image is built.
The recommended working approach is to use the SECO Docker Container, so all the following commands are intended to be run from within the docker.
Create your build folder
You can create your personal build folder for the project within the docker using the following commands:
$$ mkdir -p projects/clea-os
$$ cd projects/clea-os
Download source code
Initialize the manifest environment and download all the source code from all the repositories:
$$ repo init -u https://git.seco.com/clea-os/seco-manifest.git -b scarthgap
$$ repo sync -j$(nproc) --fetch-submodules --no-clone-bundle
The repo init command above initialize a manifest based on the head on the scarthgap branch. In order to use a manifest based on a particular tag, the following command need to be used instead:
$$ repo init -u https://git.seco.com/clea-os/seco-manifest.git -b refs/tags/<tag>
The repo tool stores its meta data in a hidden subdirectory called .repo.
The manifest repository content is stored at .repo/manifests/ and is used for the sync command which actually downloads the sources.
After the download the resulting directory structure should look like this:
.
├── layers
│ ├── base
│ ├── meta-browser
│ ├── meta-clang
│ ├── meta-freescale
│ ├── meta-freescale-distro
│ ├── meta-openembedded
│ ├── meta-qt5
| ├── meta-qt6
│ ├── meta-timesys
│ ├── meta-virtualization
│ ├── meta-rauc
│ ├── meta-arm
│ ├── meta-cyclonedx
| ├── meta-seco
│ ├── meta-seco-bsp
│ ├── meta-seco-clea-os
│ ├── meta-seco-clea-os-embedded
│ ├── meta-seco-clea-os-things
│ ├── meta-seco-mixins
│ ├── meta-seco-qcom
│ ├── meta-seco-mtk
│ ├── meta-seco-imx
│ ├── meta-seco-intel
│ ├── meta-seco-rk
│ ├── meta-seco-rpi
│ ├── meta-swupdate
│ ├── meta-security
│ ├── meta-rity
│ ├── meta-qcom-hwe
│ ├── meta-qcom-distro
│ ├── meta-qcom
│ ├── meta-mediatek-bsp
│ ├── meta-imx
│ ├── meta-intel
│ ├── meta-raspberrypi
│ └── poky
|
|
├── .repo
│ ├── copy-link-files.json
│ ├── manifests
│ ├── manifests.git
│ ├── manifest.xml
│ ├── project.list
│ ├── project-objects
│ ├── projects
│ ├── repo
│ ├── TRACE_FILE
│ └── .repo_fetchtimes.json
└──seco-setup.sh -> layers/base/seco-setup.sh
Build
In order to setup the build environment and run the build process, the following instructions shall be followed.
- List the images that can be built:
$$ . ./seco-setup.sh -l
- Define the configuration that you need to build (e.g. 'seco_smarc_d18_clea-os' which refers to Clea OS Things image for IMX8MP D18 board):
$$ . ./seco-setup.sh -d seco_smarc_d18_clea-os
If you need Things or Embedded flavours image select the right configuration file with the corresponding tag (e.g. seco_smarc_d18_clea-os_things for Things and seco_smarc_d18_clea-os_embedded for Embedded)
- Create the build environment for the selected configuration (architecture and distro features):
$$ . ./seco-setup.sh -c
- Finally, to build the SECO Clea OS image:
$$ bitbake seco-clea-os-image
- If you want to build the SECO Clea OS SDK:
$$ bitbake seco-clea-os-image -c populate_sdk
- For Clea OS Things flavour images you can build bundles to perform OTA updates through RAUC with the command:
$$ bitbake seco-clea-os-bundle
To easily configure all aspects of the Clea OS build, you can use Seco Build Configurator Tool.
GitLab access
It should not be necessary to have a SECO GitLab account to build the standard images. The public access should be sufficient to do that.
However, for customer specific layers and configurations, that are not publicly accessible, a SECO GitLab account or Access Token is necessary. Contact a SECO Software expert or the Technical Support to get access.
You need to generate a SSH key-pair and register it with your SECO GitLab account, see the gitlab docs.
$ ssh-keygen -t ed25519 -C "my.name@example.com" # use your email instead
$ cat ~/.ssh/id_ed25529.pub