The Yocto toolchain - noritake-itron/itron-bsp-manual GitHub Wiki

The Yocto Toolchain

Index

Setting a development environment

Supported Linux distributions

The full list of the Linux distributions that is suitable for lates Yocto Project development is referenced here.

Yocto Project Quick Start

Yocto Project Reference Manual

For Yocto Rocko we recommend using Ubuntu 16.04 64-bit on a physical PC or inside a Virtual Machine:

Installation recommendations

  • Set the number of CPUs to maximum possible
  • Set the memory size to at least 4GB.
  • Set the disk size to be at least 200GB. 300GB is better.
  • Use Bridge for networking.
  • Install the VMWare tools.
  • If you have an extra hard drive you can use it as a physical partition and set your home directory to it.
  • Update Ubuntu right after the first login.

Required packages

Follow the links below and install all required packages on your machine.

Yocto Project Quick Start

Yocto Project Reference Manual

Please make sure your host PC is running Ubuntu 16.04 64-bit and install the following packages:

sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping libsdl1.2-dev xterm
sudo apt-get install autoconf libtool libglib2.0-dev libarchive-dev python-git \
sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 \
help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev \
mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv \
libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev

Itron BSP platform

Repo installation

To get the BSP (Board Support Package) you need to have repo - the multiple git repository tool - installed.

Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow.

Install the repo utility:

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

Download Yocto Warrior BSP

Download the BSP source:

PATH=${PATH}:~/bin
mkdir ~/itron-fslc-yocto
cd ~/itron-fslc-yocto
repo init -u https://github.com/noritake-itron/itron-bsp-platform.git -b fsl-warrior
repo sync -j4

At the end of the commands, you have every metadata you need to start work with.

You can use any directory to host your build.

The source code is checked out at itron-fslc-yocto/sources.

Update Yocto Rocko BSP

To update BSP sources please use the following command:

repo sync -j4

Setup and build the toolchain

Setting the Yocto environment

You can use the command below to setup environment.

$ MACHINE=<tx070s|tx101s|tx070l|tx070u> DISTRO=<fslc-x11/fslc-framebuffer/fslc-wayland/fslc-xwayland> . setup-environment <build_directory_name>
Note: - please choose the proper machine
Note: <fsl-imx-wayland/fsl-imx-xwayland> - please choose the proper distro name*
Note: <build_directory_name> - please select the directory name

Configure the Yocto system

You can find the information about the Yocto configuration in the link below:

Configure Yocto

Build the toolchain

You can build the standard toolchain or the toolchain the support for Qt5

To build the toolchain without the Qt support please use the following command:

bitbake meta-ide-support
bitbake meta-toolchain

To build the toolchain with the Qt support please use the following command:

bitbake meta-ide-support
bitbake meta-toolchain-qt

Build the complete SDK

To compile applications that require libraries other than glibc you should build an SDK which contains development versions of all libraries in the rootfs image, and not just the basic toolchain.

When using the fsl-image-gui image:

bitbake -c populate_sdk fsl-image-gui

When using the fsl-image-qt5 image:

bitbake -c populate_sdk fsl-image-qt5

Install the toolchain

When you successfully build the toolchain you can install tools.

To install the toolchain without the Qt support please run:

tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-fsl-image-gui-aarch64-toolchain-4.19-warrior.sh
Note: the toolchain above is for the version with X11
Note: to run commands above you have to be inside the Yocto build directory

To install the toolchain with the Qt support please run:

tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-fsl-image-qt5-aarch64-toolchain-4.19-warrior.sh
Note: the toolchain above is for the framebuffer version with the Qt support
Note: to run commands above you have to be inside the Yocto build directory

Use the toolchain

Each time you wish to use the toolchain in a new shell session, you need to source the environment setup script:

source /opt/fsl-imx-xwayland/4.19-warrior/environment-setup-aarch64-poky-linux
export LDFLAGS=
Note: the toolchain above is for the version with X11

or

source /opt/fsl-imx-wayland/4.19-warrior/environment-setup-aarch64-poky-linux
export LDFLAGS=
Note: the toolchain above is for the version without X11

⚠️ **GitHub.com Fallback** ⚠️