If working with a non-kit SOM, there are additional steps required to build this release for your configuration. Please view the notes in the Building the BSP from Source section for the applicable differences. For each SOM configuration there is a required change to the build configuration layers file and the yocto MACHINE value. |
This Quickstart provides you with the tools and know-how to install and work with the Linux Board Support Package (BSP) for the phyBOARD-Zeta. This Quickstart shows you how to do everything from installing the appropriate tools and source, to building custom kernels, to deploying the OS, to exercising the software and hardware. Additionally, gain access to the SOM and baseboard schematics for the phyBOARD-Zeta by registering at the following: http://phytec.com/support/registration/.
The following system requirements are necessary to successfully complete this Quickstart. Deviations from these requirements may suffice, or may have other workarounds.
See release notes for supported SOM and carrier board versions. |
Use the following as a reference for the connector interfaces on the phyBOARD-i.MX7 that will be used in this Quickstart.
Use the following images as a reference when connecting any compatible PHYTEC expansion boards.
Use the following images as a reference when connecting UART and CAN 2x5 pin header to DB9 adapters
This section is designed to get the board up-and-running with pre-built images.
Download the "fsl-image-validation-imx-<Yocto Machine>.sdcard" image which will be used to format a bootable SD card. The binary images for BSP-Yocto-FSL-iMX7-PD17.2.x are available on PHYTEC's Artifactory. Images are organized by machine name.
See Release Notes for supported Yocto machine configurations, and replace <Yocto Machine> below with the appropriate machine for your hardware. |
Flash the SD card image to a micro SD card:
sudo dd if=fsl-image-gui-<Yocto Machine>.sdcard of=/dev/sd<SD partition> bs=1M && sync |
For more information on formatting an SD card, see Creating a Bootable SD Card. |
If using the evaluation module PEB-EVAL-02, plug it into the expansion connector X16 on the carrier board.
Plug micro SD card into slot on underside of board.
Connect UART cable to the 5x2 pin header labelled "RS-232". This header requires an adapter as well as Null modem cable. When plugged in, the adapter cable should be oriented towards the USB and ethernet interfaces.
Start your favorite terminal software (such as Minicom or TeraTerm) on your host PC and configure it for 115200 baud, 8 data bits, no parity, and 1 stop bit (8n1) with no handshake
Connect 5V power supply to the 2-pin phoenix connector. Looking into the connector, the pin on the left is positive and the one next to it is negative.
<Yocto Machine> login:
Not seeing output on the console?
|
This section explains how to build your BSP from source.
Yocto development requires certain packages to be installed. Run the following commands to ensure you have the packages installed:
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \ docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools |
The above is the recommended package installation for development on a Ubuntu 14.04 LTS Linux distribution. For a breakdown of the packages as well as a list of packages required for other Linux distributions, see the "Required Packages for the Host Development System" section in the Yocto Project Reference Manual: http://www.yoctoproject.org/docs/2.1.1/ref-manual/ref-manual.html#required-packages-for-the-host-development-system |
Verify that the preferred shell for your Host PC is ''bash'' and not ''dash'':
sudo dpkg-reconfigure dash # Respond "No" to the prompt asking "Install dash as /bin/sh?" |
Download and install the repo tool. This tool is used to obtain Yocto source from Git.
cd /opt sudo mkdir bin # /opt/ directory has root permission, change the permissions so your user account can access this folder. In the following replace <user> with your specific username sudo chown -R <user>: bin cd bin curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ./repo chmod a+x repo |
Add the repo directory in your PATH, using export from the command line or permanently by including it in .bashrc:
export PATH=/opt/bin/:$PATH |
If you have not yet configured your Git environment on this machine, please execute the following commands to set your user name and email address. See here for more information on getting started with Git.
git config --global user.email "your@email.com" git config --global user.name "Your Name" |
Create a directory which will house your BSP development. In this example the BSP directory is /opt/PHYTEC_BSPs/. This is not a requirement and if another location is preferred (ex. ~/PHYTEC_BSPs) feel free to modify. We recommend using /opt over your HOME directory to avoid errors attributed to ~ syntax as well as the sudo requirement for the root filesystem and automation package building. We also recommend creating a package download directory (yocto_dl) separate from the yocto tree (yocto_imx7), as it makes resetting the build environment easier and subsequent build times much faster.
sudo mkdir /opt/PHYTEC_BSPs cd /opt/ # /opt/ directory has root permission, change the permissions so your user account can access this folder. In the following replace <user> with your specific username sudo chown -R <user>: PHYTEC_BSPs cd PHYTEC_BSPs mkdir yocto_imx7 mkdir yocto_dl cd yocto_imx7 export YOCTO_DIR=`pwd` |
At this point you will now be able to navigate to the Yocto directory using the $YOCTO_DIR environment variable.
Download the manifest file for BSP-Yocto-FSL-iMX7-PD17.2.x:
cd $YOCTO_DIR repo init -u https://stash.phytec.com/scm/pub/manifests-phytec.git -b imx7 -m BSP-Yocto-FSL-iMX7-PD17.2.1.xml |
Download the Yocto meta layers specified in the manifest file:
repo sync |
See Release Notes for supported Yocto machine configurations, and replace <Yocto Machine> below with the appropriate machine for your hardware. |
Run the Yocto build directory setup. The TEMPLATECONF variable is used to set the source of the local configuration files (conf/bblayers.conf and conf/local.conf), which are located in the meta-phytec layer:
cd $YOCTO_DIR TEMPLATECONF=$YOCTO_DIR/sources/meta-phytec/meta-phytec-fsl/conf MACHINE=<Yocto Machine> source sources/poky/oe-init-build-env build |
Modify the DL_DIR variable in build/conf/local.conf to use your new download directory:
DL_DIR ?= "/opt/PHYTEC_BSPs/yocto_dl" |
Maximize build efficiency by modifying the BB_NUMBER_THREADS variable to suit your host development system. This sets the maximum number of tasks that BitBake should run in parallel. Also set the variable PARALLEL_MAKE to specify the number of threads that make can run. By default, these are set to 4 in build/conf/local.conf:
# Parallelism options - based on cpu count BB_NUMBER_THREADS ?= "4" PARALLEL_MAKE ?= "-j 4" |
In order to build certain packages included in the FSL meta layers, you need to accept the Freescale EULA at '/opt/yocto/yocto_fsl/sources/meta-fsl-arm/EULA'. Please read it and if you accept it, add the following in build/conf/local.conf:
|
The kernel-module-laird-backports-3.5.4.2-r0 recipe will fail to build due to a change in the zip file being downloaded from LSR's website. To resolve this, download 930-0075.zip and 930-0075.zip.done available on PHYTEC's Artifactory and add them to the local download directory specified by DL_DIR (/opt/PHYTEC_BSPs/yocto_dl in this guide). This package provides support for WiFi/BT module PEB-WLBT-03, so if this module is not being used another option is to simply remove the package from the build. To do so, comment out or remove the following lines from $YOCTO_DIR/sources/meta-phytec/meta-phytec-fsl/conf/machine/imx7d-phyboard-zeta-001.conf:
|
|
The setup is complete and you now have everything to complete a build. This BSP has been tested with the fsl-image-gui image. It is suggested that you start with this image to verify functionality before building other images. Alternate images are located in various meta layers at meta*/recipes*/images/*.bb. They can be found using the command bitbake-layers show-recipes "*-image*" in $YOCTO_DIR/build/.
The following will start a build from scratch including installation of the toolchain as well as the bootloader, Linux kernel, and root filesystem images.
cd $YOCTO_DIR/build MACHINE=<Yocto Machine> bitbake fsl-image-gui |
All images generated by bitbake are deployed to $YOCTO_DIR/build/tmp/deploy/images/<Yocto Machine>:
Note that v4.1.15-phy<X> and v2016.03-phy<X> within the paths pertain to the release tag for the linux and u-boot sources. This matches the value of RELEASE_VER for the corresponding recipes in meta-phytec-fsl. For example, for release PD17.2.1 the kernel tag is v4.1.15-phy4.
U-Boot:$YOCTO_DIR/build/tmp/work//<Yocto Machine>-poky-linux-gnueabi/u-boot-phytec/2016.03+git_v2016.03-phy<X>-r0/git/
Board file is located at: board/phytec/mx7d_phyboard_zeta/mx7d_phyboard_zeta.c
The build time will vary depending on the package selection and Host performance. Beyond the initial build, after making modifications to the BSP, a full build is not required. Use the following as a reference to take advantage of optimized build options and reduce the build time.
To rebuild u-boot:
bitbake u-boot-phytec -f -c compile && bitbake u-boot-phytec |
To rebuild the Linux kernel:
bitbake linux-phytec-fsl -f -c compile && bitbake linux-phytec-fsl |
The Yocto project's Bitbake User Manual provides useful information regarding build options: http://www.yoctoproject.org/docs/2.1.1/bitbake-user-manual/bitbake-user-manual.html