Ka-Ro electronics GmbH Aachen
Germany
Ka-Ro electronics GmbH
Pascalstr. 22, D-52076 Aachen, Germany
technologie architects
DeutschEnglish
Home > Produkte > TX-Standard > TX6DL Cortex-A9 > Getting Started > Yocto Guide - Krogoth (old) 

TX6 Setup for Yocto Project 2.1 - codename Krogoth


Warning: Legacy

This version of Yocto is in legacy mode, the most current version is now based on the Rocko branch of Yocto, the guide can be found here (or in menu on the right as "Yocto Guide - Rocko"). The source can found on our github page. A major differences to this version is that the Rocko version is no longer based upon the NXP community BSP (fsl-community-bsp).

References

This guide is based on the NXP/Freescale Yocto Project User's Guide (IMXLXYOCTOUG)

The instructions for setting up and building Linux in the Yocto Project were adopted to our products and the ARMSDK environment.

Documentation is available online at nxp.com.
i.MX Software and Development Tools

A list of helpful bitbake commands can be found here:
NXP/Freescale - Useful bitbake commands

A cheat sheet for bitbake:
Bitbake Cheat Sheet

The FSL Community BSP is also available at Github:
FSL Community BSP @ github

Ka-Ro specific sources can, beside our normal git server, also be found on our Github presence:
Ka-Ro @ github

Requirements

For Yocto a Linux Host Machine is needed. For this purpose Ka-Ro offers a Virtual Appliance, called ARMSDK VM. This Virtual Appliance offers the comprehensive capabilities to use the tool-chain supplied by Ka-Ro either in it's pre-compiled version or from the source. Allowing the user to compile all packages offered by Ka-Ro, including but not limited to U-Boot. Although it is possible to use all Linux distributions, because of diversity and versatility of Linux distributions the offered ARMSDK VM Virtual Appliance is the only means supported by Ka-Ro for cross compilation. For further information concerning the ARMSDK VM please refer to the there enclosed documentation.

An important consideration is the hard disk space required for the virtual appliance. It is recommended that at least 120 GB is provided.

Host packages

A NXP/Freescale Yocto Project Release BSP build requires that some packages be installed for the build that are documented under the Yocto Project.

You can go to Yocto Project Quick Start and check for the packages that must be installed for your build machine.

First of all update your local repository:

sudo apt-get update

Install essential Yocto Project host packages:

sudo apt-get install gawk wget git-core diffstat unzip \
texinfo gcc-multilib build-essential chrpath socat

i.MX layers host packages:

sudo apt-get install libsdl1.2-dev xterm sed cvs \
subversion coreutils texi2html docbook-utils \
python-pysqlite2 help2man make gcc g++ desktop-file-utils \
libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf \
automake groff curl lzop asciidoc u-boot-tools

Upgrade git version

A version of git older than 1.8.3.1 has bugs which will break builds. Please be sure to have a newer version of git installed.

Check installed version:

git --version

Update your local repository if not already just done before:

sudo apt-get update

Upgrade to git version 1.9.1 on ARMSDK-VM v7 - Debian Wheezy:

sudo apt-get remove git
sudo apt-get install git-man/wheezy-backports git/wheezy-backports

Setting up the repo utility

Repo is a tool built on top of Git that makes it easier to manage projects that contain multiple repositories, which do not need to be on the same server. Repo complements very well the layered nature of the Yocto Project, making it easier for customers to add their own layers to the BSP.

To install the “repo” utility, perform these steps:

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

Yocto Project Setup

First make sure that git is setup properly with the commands below.

git config --global user.name "Your Name"
git config --global user.email "Your Email"
git config --list

The NXP/Freescale Yocto Project BSP Release directory contains a "sources" directory, which contains the recipes used to build, one or more build directories, and a set of scripts used to set up the environment. The recipes used to build the project come from both the community and NXP/Freescale. The Yocto Project layers are downloaded to the sources directory. This sets up the recipes that are used to build the project. The following example shows how to download the NXP/Freescale Yocto Project Community BSP recipe layers. For this example, a directory called fsl-community-bsp is created for the project.

Use the stable branch "krogoth":

mkdir fsl-community-bsp
cd fsl-community-bsp
repo init -u https://github.com/karo-electronics/fsl-community-bsp-platform -b krogoth
repo sync

When this process is completed, the source code is checked out into the directory "sources" under the working directory, which is in the example above "fsl-community-bsp".

You can update the source code of all by performing a repo synchronization, with the command "repo sync". User should update to the latest codebase periodically. But at least after a prolonged timespan an update is strongly recommended.

If errors occur during repo initialization, try deleting the .repo directory and running the repo initialization command again.

Choosing a machine

This release supports the following machines. Choose the machine configuration that matches your TXCOM module.

MACHINE TXCOM number TXCOM name
TX6Q / QP
tx6q-1030 TX6Q-1010
TX6Q-1030
TX6Q/1000/1024S/128F
tx6q-1130

TX6Q-1110

TX6Q-1130

TX6Q/1000/1024S/128F/LVDS
tx6q-1036 TX6Q-1036 TX6Q/1000/1024S/8GF
tx6q-8037 TX6Q-8037 TX6QP/800/1GS/8GF/I
TX6DL
tx6u-8030 TX6U-8010
TX6U-8030
TX6DL/800/1024S/128F/I
tx6u-8130 TX6U-8110
TX6U-8130
TX6DL/800/1024S/128F/I/LVDS
tx6u-8033 TX6U-8033 TX6DL/800/1024S/4GF/E85
tx6u-8133 TX6U-8133 TX6DL/800/1024S/4GF/E85/LVDS
TX6S
tx6s-8034 TX6S-8034 TX6S/800/256S/128F/I
tx6s-8134 TX6S-8134 TX6S/800/256S/128F/I/LVDS
tx6s-8035 TX6S-8035 TX6S/800/512S/4GF/E85
tx6s-8135 TX6S-8135 TX6S/800/512S/4GF/E85/LVDS
TX6UL
txul-5010

TXUL-0010

TXUL-5010

TX6UL/528/256S/128F/I
txul-5011

TXUL-0011

TXUL-5011

TX6UL/528/256S/4GF/E85


Set the above given as value in the machine configuration variable:

MACHINE=<name-from-list-above>

Set up the environment

The command to setup of the Yocto environment in it's general form looks like the following:

MACHINE=<MACHINE> source setup-environment <build-directory>

Where the user has to insert a value, fitting the desired target, from the above table, and choose a name for the build directory to be created by the "setup-environment" script, to look like such:

MACHINE=tx6u-8033 source setup-environment build

Choosing an image target

Choose an image target to build, e.g.:

  • core-image-minimal
    This builds a minimal image consisting of:

    1. Kernel
    2. Bootloader
    3. RFS

The RFS (or: rootfs, or: root file system) in this instance is a low key file system generally intended for either first steps and/or headless systems. It includes all the general standard tools of a GNU/Linux distribution, but missing features like a X11 server, etc.

Additional packages can be added to images as long as there is a recipe provided for that package. A comprehensive listing of available layers can be found for example here:

https://layers.openembedded.org

Building an image target

bitbake <image>

Examples:

  • For building U-Boot only:

bitbake u-boot-karo

  • For building Linux kernel and kernel modules only:

bitbake linux-karo

  • For building core-image-minimal:

bitbake core-image-minimal

To initialize the build environment when the session exits, run the following command in the directory above the build directory:

source setup-environment <build directory>

Image Deployment

After a build is complete, the created image resides in the "tmp/deploy/images" sub-directory. An image is, for the most part, specific to the machine set in the environment setup. Each image build creates a U-Boot, a kernel, and an image type based on the IMAGE_FSTYPES defined in the machine configuration file.

The following files are created for Ka-Ro TX modules:

FilenameContent
u-boot-<machine>-<version>-.binU-Boot binaries
uImageKernel image
modules-<machine>.tgzKernel modules
<image>-<machine>.tar.bz2RFS

Add init= AND video= to the standard U-Boot kernel command line, e.g.:
setenv append_bootargs init=/sbin/init video=mxcfb0:dev=lcd,800x480M@60,if=RGB24
Check MfgTool / Custom Files for easy programming of deployed images!

© Ka-Ro electronics GmbH, Pascalstr. 22, D-52076 Aachen, Germany
###GOOGLEMR###