CM-T43: Yocto Linux: Building

From Compulab Mediawiki
Revision as of 14:37, 17 November 2015 by Grinberg (talk | contribs) (Building the CM-T43 Yocto image)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

This article describes how to install and build the Yocto Linux 1.6 (Daisy) release for CM-T43 SOM on a development machine.

Preparation steps

  • Obtain Linux PC host development station running Ubuntu 12.04 64 LTS.
  • Download the Linux Yocto package for CM-T43 from CompuLab website. Unzip the package to a directory on your host workstation:
mkdir cm-t43-yocto-dev
cd cm-t43-yocto-dev
unzip /path/to/downloaded/cm-t43-yocto-linux.zip
  • Install development tools:
sudo apt-get install git build-essential diffstat texinfo gawk chrpath gcc-multilib wget socat libsdl1.2-dev ia32-libs mtd-utils
  • Install the Arago toolchain
wget --no-check-certificate https://launchpad.net/linaro-toolchain-binaries/trunk/2013.03/+download/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux.tar.bz2
sudo tar -jxvf gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux.tar.bz2 -C /opt

Download and install Yocto Linux development source code

Type the following commands to download and install the Yocto 1.6 (Daisy) Linux source code on the development station:

git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
cd tisdk
./oe-layertool-setup.sh -f ../cm-t43-yocto-linux/development/config-yocto-1.6-cm-t43-1.txt

Apply the CM-T43 support patch

Once the Yocto 1.6 (Daisy) Linux source code is installed on the Host Ubuntu machine, apply the CM-T43 patch, as follows:

patch -p1 < ../cm-t43-yocto-linux/development/yocto-1.6-cm-t43-1.patch

At this point, CompuLab Yocto support has been installed over the Yocto Linux source code and can be built.

local.conf customizations

For local builds customization, edit you local.conf file with any favourite text editor.

Parallel build

Set the build parameters to fully utilize your host machine BB_NUMBER_THREADS = '4'
PARALLEL_MAKE = '-j 6' BB_NUMBER_THREADS should be your host machine's number of threads minus 2 or same. PARALLEL_MAKE should be the number of threads your host machine has plus two.

Download directory

Recommended to save download time and space. DL_DIR = "/home/<uname>/yocto_dl"

Setting up the Toolchain

export PATH=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:$PATH

Building the CM-T43 Yocto image

Change directory to the build directory of Yocto and set up the build environment:

cd build
source conf/setenv

The tisdk-rootfs-image can be built as follows:

MACHINE=cm-t43 bitbake tisdk-rootfs-image

After the image is built, all images are located in: /path/to/cm-t43-yocto-dev/tisdk/build/arago-tmp-external-linaro-toolchain/deploy/images/cm-t43

See also