Preface

The instructions on this page have been tested on Ubuntu 16.04 (64 bit) in a VMWare virtual machine.

The meta-tq-powerarch layer extends the Yocto Project's reference system Poky to provide support for a selection of TQ Embedded CPU Modules, including the TQMT104x.

The instructions on this page refer to the BSP and ancillary tools listed in the following table:

BSP Revision 0100
Yocto Project / Poky Release 2.0.1 - Jethro
Target machine1) tqmt1042-stk\
tqmt1042-64b-stk\
tqmt1040-stk\
tqmt1040-64b-stk
U-Boot 2015.07
Linux Kernel 4.4


It's strongly recommended to use git for downloading the Yocto Project / Poky Release (instead of downloading an archive and extracting it).

The goal of these wiki pages is to get you started using meta-tq-powerarch with the STKT104x, so instead of reinventing the wheel we will adhere to the very compact Yocto Project Quick Start and supply details specific to the STKT104x where necessary.

For further details regarding Yocto Project 2.0.1 - Jethro please refer to its official documentation.

Prerequisites

Yocto Project / Poky requires a Linux build host, so first of all you need a development workstation (or a virtual machine2)) with a (preferably) recent Linux distribution installed.

Please refer to section The Linux Distribution of the Yocto Project Quick Start for supported linux distributions and section The Build Host Packages for required build host packages for those distributions.

Although not required by Yocto Project / Poky, we also recommend to configure and run a tftp server (for image download / update) and an nfs server (for network mounted root filesystem) on your development host.

Yocto Project / Poky set-up

The Yocto Project Quick Start document explains how to set up Yocto Project / Poky and how to build images using the meta-intel layer. Using this as a guideline, the following table describes how to use the meta-tq-powerarch layer for the STKT104x.

Section Remarks / Instructions for meta-tq-powerarch & STKT104x
Welcome! Introduction and basic information about the Yocto Project
Introducing the Yocto Project Development Environment
Setting Up to Use the Yocto Project Description of basic requirements for using the Yocto Project (also cf. Prerequisites above)
Yocto Project Release Instructions on how to install a release of the Yocto Project on the Build Host

$ git checkout jethro

will not work unless you change into the poky directory (i.e. the freshly cloned Poky repository).

Alternatively you can clone the Poky repository and checkout branch jethro in one step by executing

$ git clone -b jethro git://git.yoctoproject.org/poky.git
Building Images

This section provides step-by-step instructions for

  1. Building An Image for Emulation3)
  2. Building An Image for Hardware4)

To sucessfully build an image for hardware you have to carry out steps from both subsections5) as follows.

Building an Image for Emulation

1. Be sure your build host is set up: See above
2. Check out your branch:

$ git checkout jethro

You can skip this step if you checked out branch jethro already when/after cloning the poky repository.
3. Initialize the Build Environment: The build environment will be initialised at a later step, do not run source oe-init-build-env yet!
Create a file called environment as follows:

$ cat > environment
export TEMPLATECONF=meta-tq-powerarch/conf
source poky/oe-init-build-env
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE FSL_RCW"

Press CTRL+D to close the file.
5. - 7. You can skip these steps, they are not required for using meta-tq-powerarch.

Building an Image for Hardware

1. Create a Local Copy of meta-tq-powerarch and meta-fsl-ppc:

$ cd poky
$ tar xvf <path>/<to>/<tarball>/meta_powerarch_cf3b0a7e1886ab5216a7dd7b832d24eecb3515fb.tar.gz
$ git clone -b jethro git://git.yoctoproject.org/meta-fsl-ppc

2. Configure the Build:

$ cd ..
$ . environment

When building for another machine6) make sure that your local.conf contains a valid combination of MACHINE, FSL_RCW and KERNEL_DEVICETREE!
3. Build an Image for STKT104x:

$ bitbake core-image-minimal

The resulting image is tmp/deploy/images/tqmt1042-64b-stk7)/core-image-minimal-tqmt1042-64b-stk8).wic
4. Write the Image9)10)

$ sudo dd if=tmp/deploy/images/tqmt1042-64b-stk/core-image-minimal-tqmt1042-64b-stk.wic of=TARGET_DEVICE

5. Boot the STKT104x from SD card (cf. STKT104x DIP switche settings)

1)
i.e. value for MACHINE variable
2)
for testing purposes Yocto Project provides a ready to use virtual machine called Build Appliance
3)
7 steps, explicitly aims at emulation using qemu
4)
5 steps, targets real hardware
5)
subsection headings may be missing in Yocto Project Quick Start (depends on Poky version)
6) , 7) , 8) , 9)
valid machines are
tqmt1042-stk\
tqmt1042-64b-stk\
tqmt1040-stk\
tqmt1040-64b-stk
10)
TARGET_DEVICE has to be an SD card