Create projects
Before you build Digi Embedded Yocto, you need to create a platform-specific project.
If you are using the Digi Embedded Yocto Docker container, the startup script offers to create a new project. If you already created one, go directly to Build images. You can also follow these steps to create a project manually. |
Use the mkproject.sh
script to check supported platforms:
$ source /usr/local/dey-4.0/mkproject.sh -l
To initialize the project and environment, use the mkproject.sh
script.
For example, for the ConnectCore 6 Plus SBC, do the following:
$ mkdir -p ${HOME}/workspace/ccimx6qpsbc
$ cd ${HOME}/workspace/ccimx6qpsbc
$ source /usr/local/dey-4.0/mkproject.sh -p ccimx6qpsbc
This initializes the project with a conf directory and two configuration files:
-
bblayers.conf
: The available layers are configured here. -
local.conf
: Local configuration variables affecting only this project are customized here.
The mkproject.sh
script sets the environment for the build in the current running terminal.
It also creates a dey-setup-environment
script in the project’s root folder.
This script can safely be rerun over existing projects to set up the build environment on a new terminal.
If you close your current terminal and open a new one, you must run the dey-setup-environment script before you use Digi Embedded Yocto.
|
Update existing projects
When updating your installation of Digi Embedded Yocto, you need to erase the tmp
and sstate-cache
directories from existing projects and build them from scratch.
Leaving the directories intact may result in problems in the build and the final images.
Build images
By default, ConnectCore 6 Plus Digi Embedded Yocto images include the XWayland desktop backend.
To build Digi Embedded Yocto images, use the command bitbake <image-recipe>
from your project’s directory.
For example:
$ bitbake dey-image-qt
Bitbaking an image recipe implies downloading and building the source code of all the recipes that form part of the root file system, which takes several hours the first time. Some source code repositories, such as the Linux kernel, represent a large download that might time out and make your build process fail. If this happens, run the following command to just fetch the source code of the offending recipe separately (to dedicate all CPU resources to it):
When this task finishes successfully (you may need several retries), you can proceed to build your image recipe. Do the same with any recipe that fails with a timeout during the fetch operation. |
Inspect build deliverables
You can find generated images inside your project’s directory, in the <project_folder>/tmp/deploy/images/ccimx6qpsbc
folder.
This directory contains the following files:
-
Boot image, with the
boot.vfat
file extension, which contains the Linux kernel, device trees and U-Boot scripts -
Root file system images in the following formats:
-
rootfs.ext4.gz
, a compressed ext4 partition image that can be programmed into the eMMC or SD card after being decompressed -
rootfs.sdcard.gz
, a compressed SD card image you can use to create a bootable SD card after being decompressed -
rootfs.tar.bz2
, a compressed root file system tarball that you can use to set up a remote NFS share to boot from -
rootfs.manifest
, a text file with the list of all the built packages
-
-
Recovery image, with the
recovery.vfat
file extension, which contains the recovery Linux kernel, device tree files, and U-Boot scripts -
U-Boot images with the
imx
file extension -
Linux kernel images with the
bin
file extension, which you can use to update an existing boot partition -
Linux kernel device tree images with the
dtb
file extension, which you can use to update an existing boot partition
Build a software update package
The procedure to create an SWU update package varies depending on the type of SWU package you want to create:
See Update firmware using SWU packages to learn more about firmware updates based on SWU packages.
SWU update packages can be programmed in the device in different ways. See Program an SWU package to learn how to program SWU packages.