Build Yocto distribution for ARM i.MX products
INDEX
Introduction
This guideline provides instructions to setup and build Yocto Project for SECO boards only with SECO BSP9.0. The guideline is not valid using the community BSP.
To Build the Yocto Project you can use our released docker image available here:
https://hub.docker.com/r/secodocker/seco-builder/
It is strongly advised to use docker container to reduce the effort in obtaining a working environment for building Seco BSP software.
If you don’t use Docker, you will need to install dependencies and configure your host PC.
Yocto Project Setup
The following example shows how to download the Freescale Yocto Project Community BSP recipe layers. Create a home directory in the root, for example, a directory called imx-yocto-bsp:
mkdir imx-yocto-bsp
cd imx-yocto-bsp
git config --global user.name "Your Name"
git config --global user.email "Your Email"
Now execute the following command to init yocto repository:
BSP | Yocto Init repository command |
---|---|
BSP9 | repo init -u https://git.seco.com/pub/i.mx/yocto/seco-yocto-manifest.git -m seco-imx-4.19.35-1.0.0.xml
repo sync |
BSP10 | repo init -u https://git.seco.com/pub/i.mx/yocto/seco-yocto-manifest -b seco/release/imx_5.4.70_2.3.0 -m seco-5.4.70-2.3.0.xml
repo sync |
End users may use seco-setup.sh
help command -h
to learn more about different possible configurations and their usage:
source seco-setup.sh -h
The output is the following:
Usage: source seco-setup.sh -m <machine> -r <ram-size> -d <distro> -b <build-dir>
Parameters: -r ram-size -d distro -b build-dir [-p download_folder] [-s sstate folder] [-t threads number] [-g]
* [-m] : Machine name, if unspecified script uses 'seco_uq7_962' as default
* [-r] : Ram size of SECO board, if unspecified script uses '1G_4x256M' as default
* [-d] : Distro name, if unspecified script uses 'seco-imx-fb' as default
* [-b] : Build directory, if unspecified script uses 'build' as output directory
* [-g] : Sets project options via graphics wizard (requires python). With this each other arguments will be ignored
* [-h] : Prints this help and each other arguments will be ignored
* [-p] : Links the project to a different folder from the standard one, as Yocto Download folder (please see Yocto document for more info)
* [-s] : Links the project to a different folder from the standard one, as Yocto SSTATE project (please see Yocto document for more info)
* [-t] : set the number of threads used during the bitbake task (please see Yocto document for more info)
* [-u] : Configure boot device. (set UBOOT_CONFIG variable)
* [-f] : Add distro feature, like Docker support or Chromium.
Configurations:
-m [ seco-uq7-962 | seco-uq7-a75 | seco-q7-928 | seco-sbc-a62 | seco-sbc-b08 | seco-sbc-c23 | seco-imx8qxp-c57 | seco-imx8qm-c26 | seco-imx8mm-c61 | seco-imx8mq-c12 | seco-imx8mq-c20 | seco-imx8mq-c25 | seco-imx8mm-c72 | seco-imx8qm-c43 | seco-imx8mn-c72 ]
-r [ 256M_1x256M | 512M_2x256M | 512M_2x256M | 1G_4x256M | 1G_2x512M | 2G_4x512M ]
-d [ seco-imx-wayland | seco-imx-fb | seco-imx-x11 | seco-imx-xwayland ]
-u [ sd ]
-f [ docker,chromium ]
Once the target device configuration is selected you can prepare to build.
For i.MX6: RAM option should be named -r <ram-size>
source seco-setup.sh -m <machine> -r <ram-size> -d <distro> -b <build-dir>
For i.MX8: RAM is configured as dynamic so there’s no need to select the -r <ram-size>
option , just add the -u <sd>
option to recall the default configuration of the board.
source seco-setup.sh -m <machine> -u <sd> -d <distro> -b <build-dir>
The table below report supported machines and distros for BSP9 and BSP10:
BSP | i.MX8 Supported distro | i.MX6 Supported distro | Supported machine |
---|---|---|---|
BSP9 | seco-imx-xwayland | seco-imx-wayland seco-imx-xwayland seco-imx-fb seco-imx-x11 | seco-imx8mm-c72 seco-imx8mn-c72 seco-imx8mm-c61 seco-imx8mq-c12 seco-imx8mq-c20 seco-imx8mq-c25 seco-imx8qm-c26 seco-imx8qm-c43 seco-imx8qxp-c57 seco-uq7-962 seco-uq7-a75 seco-q7-928 seco-sbc-a62 seco-sbc-b08 seco-sbc-c23 |
BSP10 | seco-imx-xwayland | i.MX6 platforms are not supported | seco-imx8mm-c72 seco-imx8mn-c72 seco-imx8mm-c61 seco-imx8mp-d18 i.MX6 platforms are not supported |
Then build it using bitbake
command, selecting the proper Image Name from the ones in the table below:
bitbake <Image Name>
build sdk with:
bitbake -c populate_sdk <Image Name>
Image Name | Target | Provided By Layer |
---|---|---|
| A small image that only allows a device to boot | Poky |
| A console-only image that fully supports the target device hardware | Poky |
| An image with Sato, a mobile environment and visual style for mobile devices. The image supports X11 with a Sato theme, Pimlico applications. It contains a terminal, an editor and a file manager | Poky |
| It build a base image for SECO boards with custom features packages for test and debug | SECO |
| It builds an image for SECO boards with QT5 custom features packages for GUI development | SECO |
| It builds an image for SECO boards with testing packages for multimedia application. | SECO |
Compiled binaries will be available here:
<build folder>/tmp/deploy/images/seco-<board_name>
Once the build is complete, you can install an image in the µSD card:
<build folder>/tmp/deploy/images/<MACHINE>/seco-image-test-multimedia-<MACHINE>.wic.bz2
Extract the Image:
bunzip2 -dk -f <image_name>.wic.bz2
Copy the .wic
image into the µSD card using dd
command:
sudo dd if=tmp/deploy/images/<MACHINE>/<image_name>.wic of=/dev/sdX bs=1M conv=fsync
Successfully copied the Image.