Create and build projects
Create projects
Before you build Digi Embedded Yocto, you need to create a platform-specific project. Use the mkproject.sh script to check supported platforms:
source /usr/local/dey-2.2/mkproject.sh -l
To initialize the project and environment, use the mkproject.sh script. For example, for the ccimx6sbc, do the following:
mkdir -p ${HOME}/workspace/ccimx6sbc cd ${HOME}/workspace/ccimx6sbc source /usr/local/dey-2.2/mkproject.sh -p ccimx6sbc
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.
Note If you close your current terminal and open a new one, you need to 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
To build DEY images, use the following command from your project's directory:
bitbake dey-image-qt
By default, this builds X11-based images with QT libraries.
Note The compilation can take several hours on a powerful state-of-the-art workstation, depending on the selected image recipe.
To build framebuffer-based images with QT libraries, you need to configure your project's conf/local.conf file and add the following line:
DISTRO_FEATURES_remove = "x11"
This removes the X11 window system. You can then build the images:
bitbake dey-image-qt
Inspect build deliverables
You can find generated images inside your project's directory, in the <project>/tmp/deploy/images/<platform> folder. This directory contains the following files:
- Boot images, with the vfat file extension, which are FAT partition images which contain the Linux kernel and device trees
- Root file system images in the following formats:
- ext4, an ext4 partition image that can be programmed directly into the eMMC or SD card
- sdcard, an SD card image you can use to create a bootable SD card
- tar.bz2, a compressed root file system tarball that you can use to set up a remote NFS share to boot from
- manifest, a text file with the list of all the built packages
-
Recovery images, with the vfat file extension, which are FAT partition images which contain the recovery Linux kernel and device trees
- U-Boot images with the imx file extension, which can be programmed into the eMMC or SD card
- Linux kernel images with the bin file extension, which you can use to update an existing boot FAT partition
- Linux kernel device tree images with the dtb file extension, which you can also use to update an existing boot FAT partition
Build a software update package
To build a software update package, use the following command from your project's directory:
bitbake dey-image-qt-swu
This will generate the update package under <project>/tmp/deploy/images/<platform>:
dey-image-qt-swu-<platform>-<timestamp>.swu
To install the update package dey-image-qt-swu-<platform>-<timestamp>.swu in your device, see Program the firmware from Linux.