Installing and Activating Cross Development Environment Print

 

The Linux Vybrid development software is distributed as a linux-<mcu>-<release>.tgz file available for download from the Emcraft site. That file can be installed to an arbitrary directory on your Linux development host, as follows:

[psl@ocean SF]$ mkdir release
[psl@ocean SF]$ cd release
[psl@ocean release]$ tar xvjf ../linux-vf6-2.2.0.tar.bz2
linux-cortexm-2.2.0/
linux-cortexm-2.2.0/linux/
linux-cortexm-2.2.0/linux/lib/
...
[psl@ocean release]$ ls -l linux-cortexm-2.2.0
total 24
-rwxrwxr-x. 1    psl psl 659    Nov 24 12:46 ACTIVATE.sh
drwxrwxr-x. 25   psl psl 4096   Nov 24 13:03 linux
-rw-rw-r--. 1    psl psl 16     Nov 24 12:44 _MANIFEST
drwxrwxr-x. 3    psl psl 4096   Nov 24 12:44 projects
drwxrwxr-x. 3    psl psl 4096   Nov 24 12:44 target
drwxrwxr-x. 20   psl psl 4096   Nov 24 12:52 u-boot

You do not need to be the superuser (root) in order to install the Linux Vybrid distribution. The installation can be performed from an arbitrary unprivileged user account.

As a next step in the installation procedure, you need to download and install the Emcraft Yocto toolchain and packages collection. The Linux Vybrid software development environment makes use of a modified software distribution developed by the Yocto project. This is a software distribution and development environment that includes the GNU cross development tools as well as a large number of pre-built target tools and libraries ready for immediate use with Linux running on Cortex-A5. Yocto is provided for free with full source code, including all patches, extensions, programs and scripts used to build the tools.

Basically, the idea is that the Emcraft provided part of the Vybrid software development environment includes U-Boot, the Linux kernel, and some other Vybrid software components, all highly optimized for the VF6 System-On-Module (SOM). The Yocto is used as a second component of the Vybrid software development environment and provides the Cortex-A5 GNU toolchain as well as a Yocto-based management of various Linux user-space components ready for the CortexA5 processor core.

The Emcraft Yocto release used in the Vybrid software development environment is based on Yocto 1.8.1 (Fido). The Vybrid development software requires the following Yocto 1.8.1 capabilities be installed on the development host:

  • ARMv7a toolchain
    (poky-glibc-i686-meta-toolchain-qte-cortexa5hf-vfp-neon-toolchain-qte-1.8.1.sh);
  • Collection of the pre-built packages (packages-cortexa5hf-vfp-neon-poky.tar.bz2).

After downloading the above files from the software release page of the Emcraft site, the following commands must be issued in an arbitrary writeable directory to install the specified Yocto capabilities on the Linux development host:

$ sh poky-glibc-i686-meta-toolchain-qte-cortexa5hf-vfp-neon-toolchain-qte-1.8.1.sh
Enter target directory for SDK (default: /opt/poky/1.8.1):
You are about to install the SDK to "/opt/poky/1.8.1". Proceed[Y/n]?y
Extracting SDK...done
Setting it up...done
SDK has been successfully set up and is ready to be used.
$ cd /opt/poky/1.8.1
$ mkdir packages
$ cd packages
$ tar xfj /tmp/packages-cortexa5hf-vfp-neon-poky.tar.bz2
$ ls -l /opt/poky/1.8.1
total 32
-rw-r--r--. 1 psl psl 2665    Nov 24 17:15   environment-setup-cortexa5hf-vfp-neon-poky-linux-gnueabi
drwxrwxr-x. 2 psl psl 4096     Nov 24 18:20  packages
-rw-r--r--. 1 psl psl 14339    Nov 24 17:15  site-config-cortexa5hf-vfp-neon-poky-linux-gnueabi drwxr-xr-x. 4 psl psl 4096 Oct 30 16:36 sysroots
-rw-r--r--. 1 psl psl 121      Nov 24 17:15  version-cortexa5hf-vfp-neon-poky-linux-gnueabi
$

Additionally, install the U-Boot tools host package (uboot-tools on Fedora, u-boot-tools on Ubuntu/Debian):

[psl@ocean release]$ sudo dnf install uboot-tools
...

The activation script needs to be run any time you start a development session. The script resides at the top of the installation directory:

[psl@ocean release]$ cd linux-cortexm-2.2.0
[psl@ocean linux-cortexm-2.2.0]$ ls
target ACTIVATE.sh linux projects u-boot _MANIFEST
[psl@ocean linux-cortexm-2.2.0]$ . ./ACTIVATE.sh
[psl@ocean linux-cortexm-2.2.0]$

An alternative way to run the script is to perform the following command:

[psl@ocean linux-cortexm-2.2.0]$ source ACTIVATE.sh
[psl@ocean linux-cortexm-2.20]$

Whichever way you run the script, it sets a number of environment variables that are required for the cross development environment to function correctly. One of those variables is called MCU. The easy way to test if the cross development environment is active is to run the following command:

[psl@ocean linux-cortexm-2.2.0]$ echo $MCU
VF6
[psl@ocean linux-cortexm-2.2.0]$

If MCU is empty or set to something other than VF6, this means that you have forgotten to run the activation script or somehow run it incorrectly.

Some of our customers ask if the cross development environment can be run on a Windows host. We don't support Windows, however, some of our customers have been successfully running the development environment on a virtual Linux machine under Windows. Again, we don't support that explicitly so if you want to try that, you are on your own.