Yocto: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
No edit summary
Line 122: Line 122:
| Basic image with X11 support
| Basic image with X11 support
|}
|}
== Example Configurations ==
*'''[[Building Qt5 using Yocto | Building Qt5 using Yocto]]'''
*'''[[Building Chromium, VLC and X11VNC using Yocto | Building Chromium, VLC and X11VNC using Yocto]]'''


== External References ==
== External References ==

Revision as of 13:05, 11 May 2015

For general information about the Yocto Project please refer to the official Website. "Yocto is not an embedded Linux distribution – it creates a custom one for you." This says that if you are using Yocto to build your system image you are the distributor. If you're not aware of what this means for you please contact us.

Requirements hardware and software

  • Linux-based (Debian/Ubuntu is recommended) host system to use for building Linux/Yocto
  • min 4GB RAM / > 8GB RAM are recommended
  • disk space (depending on image to build about 80 GB)
  • a microSD card-reader to write the generated image to the microSD card

Supported Stable Branch

With our OpenEmbedded / Yocto BSP Layer for DHCOM i.MX6 we support the stable branch 1.7 called dizzy. Our BSP layer is based on the Freescale Community BSP.

More information about Yocto stable branch maintenance at https://wiki.yoctoproject.org/

Setup Yocto Build System

Install Required Host Packages

Install the required packages for your host development system. The Yocto Project documentation has a listing of install commands for many different linux host systems (Debian, Ubuntu, etc.).

Required Packages for the Host Development System

Download and Install Google's repo utility

The BSP is based on the Yocto Project, which consists of a number of applicable metadata 'layers'. These are managed by the repo utility.

$: mkdir ~/bin
$: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$: chmod a+x ~/bin/repo

Create the BSP directory to download all of the metadata for the BSP layers

$: PATH=${PATH}:~/bin
$: mkdir fsl-community-bsp
$: cd fsl-community-bsp

Initialize the repositories

The next step is to initialize the repositories. This establishes which branch of the repository will be used for your development. The master branch is the current development branch. We have tested our BSP layer with the stable branch "dizzy". Which was the latest stable branch during development.

Note: The master branch is a development branch, not a stable branch. It is constantly changing with code updates, the adding of new features, and so forth.

$: repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dizzy

Download all of the metadata for the BSP layers

$: repo sync

Once this has completed, you should have all of the metadata source of the Freescale Community BSP in fsl-community-bsp.

Add DHCOM i.MX6 BSP layer

To clone the OpenEmbedded / Yocto BSP layer for DHCOM i.MX6 execute the following steps:

$: cd fsl-community-bsp/sources
$: git clone –b dizzy https://github.com/dh-electronics/meta-dhcom_imx6.git

Edit fsl-community-bsp/build/conf/bblayers.conf to add the meta-dhcom_imx6 layer at the end:

${BSPDIR}/sources/meta-dhcom_imx6 \


Setup environment and build an image

To start a build, first set the MACHINE shell environment variable to set the machine. These are:

DHCOM i.MX6 Machines in Yocto
Board Type MACHINE=
DHCOM i.MX6 Solo dhcomimx6s
DHCOM i.MX6 Duallite dhcomimx6dl
DHCOM i.MX6 Quad dhcomimx6q

For example, if you have a DHCOM i.MX6 Duallit, then set MACHINE to "dhcom-imx6dl".

$: export MACHINE=dhcomimx6dl

Run the setup-environment script. This is a helper script which sets up the environment and creates a build directory for you. The first time you run this, you will be asked to accept the Freescale end user license agreement (EULA).

$: . ./setup-environment build

Run bitbake with core-image-minimal as its argument. This will create a small image and should have the shortest possible build time. Note: all of the sources are downloaded from the internet and built from scratch. This includes the toolchain (gcc) and all of the native utilities, so building an image for the first time could take a few hours, depending on the performance of your host machine.

$: bitbake core-image-minimal

Locating the images and installing to a microSD card

Once the image is built successfully, there are several target images that are built by default. One of these is an image suitable for loading directly into an SD card. It contains all of the required binaries (bootloader, kernel, filesystem) in a preformatted binary image.

You can find the image at:

 build/tmp/deploy/images/<MACHINE>/core-image-minimal-<MACHINE>.sdcard

The .sdcard image can be directly copied to an SD card with the dd command:

$ sudo dd if=tmp/deploy/images/<MACHINE>/core-image-minimal-<MACHINE>.sdcard of=/dev/sd<N> bs=1M

NOTE: <MACHINE> in the above corresponds to the MACHINE name provided to bitbake. "N" in the above command is the letter assigned to the SD card. This will vary depending on your host machine configuration.

Running the image on DHCOM i.MX6

As this is just a console image, you will need a serial terminal program such as minicom in order to interact with the board and run commands. Simply plug the microSD card into the slot on the DHCOM i.MX6 module and apply power. You should immediately see log messages in the serial terminal. When complete, you should get a login prompt:

Poky Next (Yocto Project Reference Distro) 1.7 dhcomimx6dl /dev/ttymxc0
dhcomimx6dl login:

The default login username is 'root' and there is no password.

Other interesting images

The image core-image-minimal builds relatively quickly due to its small size. It is a good image to test to see if your board works. There are other images that you can also try, but can take a good deal longer to build.

Image Description
core-image-base Basic image with kernel modules and other features
core-image-x11 Basic image with X11 support

Example Configurations

External References