How to Test Yocto for i.MX6

Visibility: Open to anyone

Join FSL-community-bsp project: https://lists.yoctoproject.org/listinfo/meta-freescale

A more complete YoctoProject training (ongoing): Yocto Training - HOME

 

 

Host Setup

Please refer to http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html for the list of packages to be installed in the host computer according to the Linux distribution.

In the case of a Ubuntu based host, please install the following packages:

     $ sudo apt-get install gawk wget git-core diffstat unzip texinfo \

     build-essential chrpath libsdl1.2-dev xterm

 

 

 

Download repo. It will help you to download the source code:

 

cd rootfs_builder

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ./repo

chmod a+x ./repo

 

Download the BSP source:

 

cd rootfs_builder

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

./repo sync

 

You should have latest source code under rootfs_builder/sources for creating images.

 

Now, export all needed variables (and create build folder):

source ./setup-environment build

Configure your board:

vim conf/local.conf

Change the machine name, in example below, you see default local.conf file. It will build an image for imx53 QSB board.

MACHINE ??= 'imx53qsb'
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
CONF_VERSION = "1"

BB_NUMBER_THREADS = '8'
PARALLEL_MAKE = '-j 8'
ACCEPT_FSL_EULA = "1"

 

 

For imx6 you can choose:

  • imx6qsabreauto
  • imx6qsabresd
  • imx6qsabrelite

 

So, configure your local.conf to build an image for imx6 sabre lite board (for example):

MACHINE ??= 'imx6qsabrelite'

DISTRO ?= 'poky'

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES = "debug-tweaks"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

CONF_VERSION = "1"

BB_NUMBER_THREADS = '8'

PARALLEL_MAKE = '-j 8'

ACCEPT_FSL_EULA = "1"

 

Now, everything is configured and you can start to build the image.

 

The image created will be: u-boot + uImage + rootfs (based on FSL BSP 12.09.01)

 

How yocto will build everything, it will take forever. I usually let it build overnight for the very first time. Second time will take 10 minutes if you include some new packages or 30 minutes if you include a lot (LOT) of packages!

  

The first build time is not 8 hours, but I don´t like to waste my time waiting for build, so I let it build when I´m doing something else.

 

Let´s bake the image:

 

bitbake fsl-image-test

 

Let it bake for some hours. Then it´s done the baked image will be placed in the following path:

rootfs_builder/build/tmp/deploy/images

Copy the image directly to your sdcard:

 

 

sudo dd if=rootfs_builder/build/tmp/deploy/images/fsl-image-test.sdcard of=/dev/sdb

 

If you prefer, you can take u-boot, uImage and fsl-image-test.tar.bz2, and create the sdcard by your own.

 

Please, see below the available* images:

fsl-image-test - include HW accelerated gstreamer plugins, some GPU sample application, and some other test packages (like alsa-utils)

fsl-image-gui - include HW accelerated gstreamer plugins, some GPU sample application, some other test packages (like alsa-utils) and HW accelerated X11

 

*there are a lot of available images, and you can create your own, and you can customize any available image. But, for now, I want you to test one (or both) of this images. After that you can start to play around.

 

For questions, please, let a comment.

If you want to contact meta-fsl-arm project in order to make question or contribute, please subscribe to https://lists.yoctoproject.org/listinfo/meta-freescale