Difference between revisions of "CM-T43: Yocto Linux: Building"

From Compulab Mediawiki
Jump to: navigation, search
(Building the CM-T43 Yocto image)
 
(Preparation steps)
Line 1: Line 1:
 
= Introduction =
 
= Introduction =
  
This article describes how to install and build the Yocto Linux 1.6 (Daisy) release for CM-T43 SOM on a development machine.
+
This article describes how to install and build the Yocto Linux release for CM-T43 SOM on a development machine.
  
 
= Preparation steps =
 
= Preparation steps =
  
* Obtain Linux PC host development station running '''''Ubuntu 12.04 64 LTS'''''.
+
* Obtain a Linux PC host development station running '''''Ubuntu 14.04''''' or '''''Ubuntu 16.04'''''.
* Download the Linux Yocto package for CM-T43 from [http://compulab.co.il/products/computer-on-modules/cm-t43/#devres CompuLab website]. Unzip the package to a directory on your host workstation:
+
* Download the Linux Yocto package for CM-T43 from [http://www.compulab.com/products/computer-on-modules/cm-t43/#devres CompuLab website]. Unzip the package to a directory on your host workstation:
 
<pre>
 
<pre>
 
mkdir cm-t43-yocto-dev
 
mkdir cm-t43-yocto-dev
 
cd cm-t43-yocto-dev
 
cd cm-t43-yocto-dev
unzip /path/to/downloaded/cm-t43-yocto-linux.zip
+
unzip /path/to/downloaded/cm-t43_yocto-linux.zip
 
</pre>
 
</pre>
 
* Install development tools:
 
* Install development tools:
 
<pre>
 
<pre>
sudo apt-get install git build-essential diffstat texinfo gawk chrpath gcc-multilib wget socat libsdl1.2-dev ia32-libs mtd-utils
+
sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386
 
</pre>
 
</pre>
 +
* Reconfigure dash
 +
<pre>
 +
sudo dpkg-reconfigure dash
 +
</pre>
 +
Be sure to select "No" when you are asked to use dash as the default system shell.
 
* Install the Arago toolchain
 
* Install the Arago toolchain
 
<pre>
 
<pre>
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
+
wget https://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
sudo tar -jxvf gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux.tar.bz2 -C /opt
+
sudo tar -Jxvf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz -C $HOME
 
</pre>
 
</pre>
  
 
== Download and install Yocto Linux development source code ==
 
== 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:
+
Type the following commands to download and install the TI Yocto Linux source code on the development station:
 
<pre>
 
<pre>
 
git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
 
git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
 
cd tisdk
 
cd tisdk
./oe-layertool-setup.sh -f ../cm-t43-yocto-linux/development/config-yocto-1.6-cm-t43-1.txt
+
./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-03.03.00.04-config.txt
 
</pre>
 
</pre>
  
 
=== Apply the CM-T43 support patch ===
 
=== 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:
+
Once the Yocto Linux source code is installed on the host Ubuntu machine, apply the CM-T43 patch, as follows:
 
<pre>
 
<pre>
patch -p1 < ../cm-t43-yocto-linux/development/yocto-1.6-cm-t43-1.patch
+
patch -d sources -p1 < ../cm-t43-yocto-linux/development/yocto-cm-t43-2.0.patch
 
</pre>
 
</pre>
 
At this point, CompuLab Yocto support has been installed over the Yocto Linux source code and can be built.
 
At this point, CompuLab Yocto support has been installed over the Yocto Linux source code and can be built.
  
 
== local.conf customizations ==
 
== local.conf customizations ==
For local builds customization, edit you local.conf file with any favourite text editor.
+
For local builds customization, edit you build/conf/local.conf file with any favorite text editor.
  
 
=== Parallel build ===
 
=== Parallel build ===
Line 46: Line 51:
 
BB_NUMBER_THREADS should be your host machine's number of threads minus 2 or same.  
 
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.<br>
 
PARALLEL_MAKE should be the number of threads your host machine has plus two.<br>
 
=== Download directory ===
 
Recommended to save download time and space.
 
DL_DIR = "/home/&lt;uname&gt;/yocto_dl"<br>
 
 
== Setting up the Toolchain ==
 
<pre>
 
export PATH=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:$PATH
 
</pre>
 
  
 
= Building the CM-T43 Yocto image =
 
= Building the CM-T43 Yocto image =
Line 61: Line 57:
 
cd build
 
cd build
 
source conf/setenv
 
source conf/setenv
 +
export PATH=$HOME/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin:$PATH
 
</pre>
 
</pre>
  
Line 73: Line 70:
 
* [[CM-T43: Yocto Linux: Getting started]]
 
* [[CM-T43: Yocto Linux: Getting started]]
 
* [[CM-T43: Yocto Linux: Package contents]]
 
* [[CM-T43: Yocto Linux: Package contents]]
 +
* [http://www.yoctoproject.org/docs/2.3/mega-manual/mega-manual.html Yocto Project Mega-Manual]
 +
* [https://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html BitBake User Manual]
 +
* [http://git.yoctoproject.org/cgit.cgi Yocto Project Source Repositories]
  
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:Yocto]]
 
[[Category:Yocto]]
 
[[Category:CM-T43]]
 
[[Category:CM-T43]]

Revision as of 14:26, 16 July 2017

Introduction

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

Preparation steps

  • Obtain a Linux PC host development station running Ubuntu 14.04 or Ubuntu 16.04.
  • 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 python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386
  • Reconfigure dash
sudo dpkg-reconfigure dash

Be sure to select "No" when you are asked to use dash as the default system shell.

  • Install the Arago toolchain
wget https://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
sudo tar -Jxvf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz -C $HOME

Download and install Yocto Linux development source code

Type the following commands to download and install the TI Yocto 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 configs/processor-sdk/processor-sdk-03.03.00.04-config.txt

Apply the CM-T43 support patch

Once the Yocto Linux source code is installed on the host Ubuntu machine, apply the CM-T43 patch, as follows:

patch -d sources -p1 < ../cm-t43-yocto-linux/development/yocto-cm-t43-2.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 build/conf/local.conf file with any favorite 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.

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
export PATH=$HOME/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin:$PATH

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