Difference between revisions of "CL-SOM-iMX7: Yocto Linux: Building"

From Compulab Mediawiki
Jump to: navigation, search
imported>Uri.mashiach
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Overview ==
+
{{:Transclusion: CL-SOM-iMX7: Yocto Linux: Building}}
The Yocto Project is an open-source collaboration focused on embedded Linux development.<br>
 
The purpose of this article is to show how to get Yocto Image with CL-SOM-iMX7 system-on-module (SoM) support.
 
 
 
== Build CL-SOM-iMX7 Yocto Image ==
 
=== Yocto Environment Setup ===
 
This section describes the Yocto environment setup and build procedure.
 
 
 
==== Host Setup ====
 
{{:Transclusion: Yocto: iMX: Host_Setup}}
 
 
 
===== Setting up the repo utility =====
 
{{:Transclusion: Repo Setup}}
 
 
 
==== Yocto Project Setup ====
 
The instructions below assume that the {{filename|/home/development/cl-som-imx7/yocto}} directory has been created for CL-SOM-iMX7 Yocto development.
 
 
 
===== Getting NXP i.MX Yocto Project Community BSP sources =====
 
First, get NXP Community Yocto Project BSP for i.MX based boards:
 
<pre>
 
cd /home/development/cl-som-imx7/yocto
 
mkdir fsl-arm-yocto-bsp
 
cd fsl-arm-yocto-bsp
 
repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1-krogoth
 
repo sync
 
</pre>
 
 
 
===== Getting Compulab i.MX support meta layer =====
 
Next step is getting Compulab meta-layer.
 
<pre>
 
cd /home/development/cl-som-imx7/yocto/fsl-arm-yocto-bsp/sources
 
git clone https://github.com/compulab/yocto-compulab-layer.git meta-compulab
 
</pre>
 
The Compulab meta-layer consists of {{filename|meta-compulab}} directory, that provides support for CL-SOM-iMX7 and other Compulab i.MX based machines and contains recipes for U-boot and Linux kernel.
 
 
 
=== Image Build ===
 
This section provides the detailed information about building CL-SOM-iMX7 images.
 
 
 
==== Setting up build configuration ====
 
The NXP Yocto Project BSP Release directory contains a {{filename|sources}} directory, which contains recipes used to build, one or more build directories, and a set of scripts used to set up the environment. The recommended script is {{filename|fsl-setup-release.sh}}, that simplifies the setup for i.MX machines. To use the script, the name of the specific machine to be built for needs to be specified as well as the graphical backend desired. The script sets up a directory and the configuration files for the specified machine and backend:
 
<pre>
 
DISTRO=<distro name> MACHINE=<machine name> source fsl-setup-release.sh -b <build dir>
 
</pre>
 
{{parameter|MACHINE}} has to be set to {{parameter|cl-som-imx7}}. The CL-SOM-iMX7 machine configuration is found in the {{filename|sources/meta-compulab/conf/machine}} directory. <br>
 
{{parameter|DISTRO}} parameter defines the graphical backend desired. Recommended DISTRO value for CL-SOM-iMX7 is {{parameter|fsl-imx-x11}}. Available DISTRO configuration files are found in the {{filename|meta-fsl-bsp-release/imx/meta-sdk/conf/distro}} directory.
 
The instructions below assume that the {{filename|fsl-imx-x11-cl-som-imx7}} directory is used for building CL-SOM-iMX7 Yocto Linux images.
 
<pre>
 
cd /home/development/cl-som-imx7/yocto/fsl-arm-yocto-bsp
 
DISTRO=fsl-imx-x11 MACHINE=cl-som-imx7 source fsl-setup-release.sh -b fsl-imx-x11-cl-som-imx7
 
</pre>
 
  
 +
== See also ==
 +
* [[CL-SOM-iMX7: Evaluation Kit: Getting Started|Getting started with CL-SOM-iMX7 Evaluation Kit]]
 +
* [[CL-SOM-iMX7: Evaluation Kit: Hardware Guide|CL-SOM-iMX7 Evaluation Kit Hardware Guide]]
 +
* [[CL-SOM-iMX7: Yocto Linux: Creating Live-SD card|Creating a Live-SD card]]
 +
* [[IOT-GATE-iMX7 and SBC-IOT-iMX7: Yocto Linux: User Space|Yocto Linux]]
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:Yocto]]
 
[[Category:Yocto]]
 
[[Category:CL-SOM-iMX7]]
 
[[Category:CL-SOM-iMX7]]

Latest revision as of 14:39, 23 January 2019

Overview

The Yocto Project is an open-source collaboration focused on embedded Linux development.
The purpose of this article is to show how to get Yocto Image with CL-SOM-iMX7 system-on-module (SoM) support, which includes following derived devices built around the CL-SOM-iMX7 SoM:

  • SBC-iMX7 Single Board Computer
  • SBC-IOT-iMX7 Internet of Things Single Board Computer
  • IOT-GATE-iMX7 Internet of Things Gateway

Learn more about Yocto

Yocto Environment Setup

Yocto host requirements are listed on the Yocto official site

In order to get NXP Yocto BSP building environment please follow the NXP readme file

Next step is getting Compulab BSP meta-layer.

git clone -b master https://github.com/compulab-yokneam/meta-compulab-bsp.git sources/meta-compulab-bsp

The Compulab meta-layer consists of meta-compulab-bsp directory, that provides support for CL-SOM-iMX7 and other Compulab i.MX based machines and contains recipes for U-boot and Linux kernel.

Image Build

This section provides the detailed information about building CL-SOM-iMX7 images.

Setting up build configuration

The NXP Yocto Project BSP Release directory includes a sources directory which contains the various build recipes and a set of scripts used to set up the environment. The recommended script fsl-setup-release.sh simplifies the setup for i.MX machines. To use the script, it is necessary to specify the name of the machine to be built and the required graphical backend. The script sets up a directory and the configuration files for the specified machine and backend.

  • Select the required backend:
Graphical backend is defined by the DISTRO parameter.
Available DISTRO values for CL-SOM-iMX7:
  • fsl-imx-x11 - building X11
  • fsl-imx-fb - building Frame Buffer
  • fsl-imx-xwayland - building XWayland
  • fsl-imx-wayland - building Wayland-Weston
  • imx-wayland-ivi - building Wayland with IVI extension
For example:
export DISTRO=fsl-imx-x11
  • Select the machine:
export MACHINE=cl-som-imx7
  • Select the build directory:
Select a different build directory for each distro. For example:
BUILD_DIR=build-x11
  • Issue the NXP Setup Script:
source fsl-setup-release.sh -b ${BUILD_DIR}
  • Issue Compulab Setup Script:
source ../sources/meta-compulab-bsp/tools/setup-compulab-env

Building images

The Yocto Project build uses the bitbake command.

  • Select one of the the following image recipes
  • fsl-image-validation-imx - provides a gui image without Qt.
  • fsl-image-qt5-validation-imx - provides a Qt5 image
IMAGE_RECIPES=fsl-image-qt5-validation-imx
Issue the bitbake build command:
bitbake ${IMAGE_RECIPES}

See also