CL-SOM-AM57x: Yocto Linux: Building

From Compulab Mediawiki
Revision as of 14:44, 12 January 2017 by Urim (talk)
(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.8 (fido) release for CL-SOM-AM57x on a development machine.

Preparation steps

  • Download the Linux Yocto package for CL-SOM-AM57x from CompuLab website. Unzip the package to a directory on your host workstation:
mkdir cl-som-am57x-yocto-dev
cd cl-som-am57x-yocto-dev
unzip /path/to/downloaded/cl-som-am57x-yocto-linux.zip
  • Install development tools:
sudo apt-get install git build-essential diffstat texinfo gawk chrpath gcc-multilib wget socat libsdl1.2-dev mtd-utils
  • Install the Arago toolchain
wget https://snapshots.linaro.org/openembedded/sources/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf.tar.xz
sudo tar -Jxvf gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf.tar.xz -C /opt

Download and install Yocto Linux development source code

Type the following commands to download and install the Yocto Linux 1.8 (fido) 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 configs/processor-sdk/processor-sdk-02.00.01.07-config.txt

Apply the CL-SOM-AM57x support patch

Once the Yocto Linux 1.8 (fido) source code is installed on the Host machine, apply the CL-SOM-AM57x patch, as follows:

patch -p1 < ../cl-som-am57x-yocto-linux/development/yocto-cl-som-am57x-1.0.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-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin:$PATH

Building the CL-SOM-AM57x Yocto image

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

cd build
source conf/setenv

The arago-core-tisdk-image can be built as follows:

MACHINE=cl-som-am57x bitbake arago-core-tisdk-image

After the image is built, all images are located in: /path/to/cl-som-am57x-yocto-linux/tisdk/build/arago-tmp-external-linaro-toolchain/deploy/images/cl-som-am57x

See also