Yocto Kirkstone manifest repository for SECO Northern Europe platforms

This repository contains manifest files for the SECO Northern Europe BSP. It is the entry point for the BSP development together with the supplement tooling. See below for details.

The projects of the SECO Northern Europe GitLab group contain the source code and metadata to build Yocto images and packages for SECO Northern Europe devices based on the NXP i.MX6, i.MX6ULL and i.MX8M processors.

The Google repo tool workflow is used for the project setup.

Description

The build system is based on the Yocto project, further information and documentation can be found at http://docs.yoctoproject.org/. The Yocto project uses so called 'layers' containing the metadata to build all needed packages, while the package sources are downloaded during the build.

The SECO Northern Europe Yocto is based on following layers:

For the imx6 based platforms (SAN*) GPU and VPU drivers the etnaviv driver is used, included in the mainline open-source layers.

This SECO Northern Europe specific part comes as two parts layers:

The manifest repository seco-ne/yocto/manifest contains the so called manifest (default.xml) for the repo tool. The manifest file contains a list of all layers and there specific revisions needed to build the image for SECO Northern Europe devices, the repo tool itself reads this manifest and handles the clone and directory setup for you.

Getting started

Preparing the host system

There are some requirements to the host system.

Ubuntu 20.04

Tested distribution is currently Ubuntu 20.04.6 LTS. An installation-Image can be found here: https://releases.ubuntu.com/20.04/ubuntu-20.04.6-desktop-amd64.iso

This should work as virtual machine (Virtual box ...) or bare-metal installation.

Yocto related base software

Needed tools are listed in the yocto documentation.

Execute the following commands to install them:

sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool

Docker build images

The release builds are executed on docker images based on crops/poky:ubuntu-20.04. The seconorth container images can be found in the SECO gitlab container registry

Development tools

Additionl development tools that may be useful:

sudo apt install git minicom gdb-multiarch crossbuild-essential-armhf meld gedit nano cscope quilt qtcreator

Install the repo tool

If available the tool can also be installed from the distributions package manager. This directly downloads the latest version from google. See https://gerrit.googlesource.com/git-repo/.

mkdir ~/bin # once
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo # once
chmod a+x ~/bin/repo # once
echo "export PATH=${PATH}:~/bin" >> ~/.bashrc # once
source ~/.bashrc

Local Git setup:

git config --global user.name "Forename Name" # use your name instead
git config --global user.email "my.name@example.com" # use your email instead

Download and build the SECO Northern Europe Yocto

This section describes steps to create a local build dir and how to use repo to download all needed files. After that the build directory gets setup for one specific machine (seco-mx6, seco-mx6ull, seco-mx8mm, seco-mx8mp, seco-genio510 or seco-genio700) and distribution (seconorth-wayland) and a standard image is built.

Download source code

mkdir -p ~/projects/yocto-seco-ne
cd ~/projects/yocto-seco-ne
repo init -u https://git.seco.com/seco-ne/yocto/manifest.git -b kirkstone
repo sync --no-clone-bundle

The repo tool stores its meta data in a hidden subdirectory called .repo. The manifest file is stored at .repo/manifests/default.xml and is used for the sync command which actually downloads the sources.

The selected branch is kirkstone.

After the download the resulting directory structure should look like this:

yocto-seco-ne$ tree -L 2 -a
.
├── .conf
│   ├── bblayers.conf
│   ├── bblayers_fsl.conf
│   ├── bblayers_mtk.conf
│   ├── .git -> ../.repo/projects/.conf.git
│   ├── git-describe.inc
│   ├── .gitignore
│   ├── .gitlab-ci
│   ├── .gitlab-ci.yml
│   ├── .gitmodules
│   ├── LICENSE.txt
│   └── setup-environment
├── .repo
│   ├── copy-link-files.json
│   ├── manifests
│   ├── manifests.git
│   ├── manifest.xml
│   ├── project.list
│   ├── project-objects
│   ├── projects
│   ├── repo
│   ├── .repo_fetchtimes.json
│   ├── .repo_localsyncstate.json
│   └── TRACE_FILE
├── setup-environment -> .conf/setup-environment
└── sources
    ├── meta-arm
    ├── meta-freescale
    ├── meta-freescale-distro
    ├── meta-gplv2
    ├── meta-mediatek-bsp
    ├── meta-openembedded
    ├── meta-python2
    ├── meta-qt5
    ├── meta-rauc
    ├── meta-rity
    ├── meta-seconorth-distro
    ├── meta-seconorth-machine
    ├── meta-seconorth-mtk
    ├── meta-seconorth-nogplv3
    ├── meta-security
    ├── poky
    └── poky_mtk

Build

To get the build environment ready run the environment needs to be set up.

For SECO i.MX8M platforms TANARO and Trizeps VIII Mini:

MACHINE=seco-mx8mm DISTRO=seconorth-wayland source ./setup-environment build

For SECO i.MX8MP platform Trizeps VIII Plus:

MACHINE=seco-mx8mp DISTRO=seconorth-wayland source ./setup-environment build

For the i.MX6Q/DL platforms SANTARO, SANTINO, SANTINO-LT, SANTOKA and other SAN* platforms if supported:

MACHINE=seco-mx6 DISTRO=seconorth-wayland source ./setup-environment build

For SECO Genio 510 platform SOM-SMARC-Genio510:

MACHINE=seco-genio510 DISTRO=seconorth-wayland source ./setup-environment build

For SECO Genio 700 platform SOM-SMARC-Genio700:

MACHINE=seco-genio700 DISTRO=seconorth-wayland source ./setup-environment build

Then build the default SECO Northern Europe image

bitbake seconorth-image

Installation

Installation using preinstalled Flash-N-GO System

After the image was built the files are located under build/tmp/deploy/images/seco-[mx6|mx6ull|mx8mp|mx8mm|genio510|genio700|...]/. The files needed are installation file fng_install.sh and the root file system seconorth-image-seco-[mx6|mx6ull|mx8mp|mx8mm|genio510|genio700|...].tar.gz. These files can be used in a Flash-N-Go System installation process.

See the Flash-N-Go System manual for more information.

GitLab access

It should not be necessary to have a SECO GitLab account to build the default images. The public access should be sufficient. However, for custom layers and configurations that are not publicly accessible, an access token is required. Contact technical support (support.north@seco.com) to request an access token. The access token works in conjunction with an auto-generated user. The build process will ask for these credentials if necessary.

To store the user and token permanently, a Git credentials store can be set up. See https://git-scm.com/docs/git-credential-store for more information.