Yocto Linux BSP Ver.1 User Guide for AM62xx series

From ESS-WIKI
Jump to: navigation, search


Getting Start

Docker install and setting

If you don't have docker in your system, then you can follow the below  steps to install docker and run it first.

To install Docker Engine on your platform

Please refer to Docker Installation Guide for details

To pull Ubuntu 18.04 image from Docker Hub

$ docker pull advrisc/u18.04-imx8lbv1

To create container

$ docker run -it --name ${CONTAINER_NAME} --privileged -v ${WORKSPACE}:/home/adv/yocto_bsp:rw advrisc/u18.04-imx8lbv1 /bin/bash

Prerequisites (One-time setup)

$ sudo apt-get install build-essential autoconf \
      automake bison \
      flex libssl-dev bc u-boot-tools \
      python diffstat \
      texinfo gawk chrpath dos2unix \
      wget unzip socat doxygen \
      g++-multilib \
      git python3-distutils python3-apt

By default Ubuntu uses “dash” as the default shell for /bin/sh. You must reconfigure to use bash by running the following command:

$ sudo dpkg-reconfigure dash

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

Cross-Compile Toolchain

Run the following commands to install the ARM Toolchains. 64-bit products like AM62x need both.

$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C $HOME
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -C $HOME

Build Steps

The following example shows how to download the Advantech Yocto BSP from GitHub.

For this example, a directory called yocto_bsp is created for the project.

$ mkdir yocto_bsp
$ sudo chown adv:adv -R yocto_bsp
$ cd yocto_bsp/
$ git clone https://github.com/ADVANTECH-Corp/adv-ti-yocto-bsp.git -b processor-sdk-am62xx-08.06.00.42 tisdk
$ cd tisdk/
$ ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-08.06.00-config.txt
$ cd build
$ . conf/setenv
$ export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
$ export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
$ git clone https://git.ti.com/git/security-development-tools/core-secdev-k3.git -b master
$ export TI_SECURE_DEV_PKG_K3=`pwd`/core-secdev-k3
$ MACHINE=am62xx-rs10 bitbake -k tisdk-default-image

Build Options

Images

In addition to individual components packages, the following table provides a list of build targets supported. These are the <target> used in the command:

$ MACHINE=<machine> bitbake <target>

The “Build Output” is given relative to the arago-tmp-[toolchain]/deploy directory.

Target Build Output Description
tisdk-default-image images/<machine>/tisdk-default-image-<machine>.tar.xz Target Filesystem
tisdk-base-image images/<machine>/tisdk-base-image-<machine>.tar.xz Minimal Target Filesytem

Platforms

The following platforms are supported in Processor SDK. These are the <machine> in the command:

$ MACHINE=<machine> bitbake <target>
MACHINE Supported EVMs
am62xx-rs10  AM62x Starter Kit (SK)