Installing and Activating Cross Development Environment Print

 

The Linux i.MX 6ULL 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-imx6ull-2.4.0.tar.bz2
linux-imx6ull-2.4.0/
linux-imx6ull-2.40/linux/
linux-imx6ull-2.4.0/linux/lib/
...
[psl@ocean release]$ ls -l linux-imx6ull-2.4.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 i.MX 6ULL 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 i.MX 6ULL 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-A7. 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 i.MX 6ULL software development environment includes U-Boot, the Linux kernel, and some other i.MX 6ULL software components, all highly optimized for the i.MX 6ULL System-On-Module (SOM). The Yocto is used as a second component of the i.MX 6ULL software development environment and provides the Cortex-A7 GNU toolchain as well as a Yocto-based management of various Linux user-space components ready for the Cortex-A7 processor core.

The Emcraft Yocto release used in the i.MX 6ULL software development environment is based on Yocto 1.8.1 (Fido). The i.MX 6ULL 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 /tmp/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-imx6ull-2.4.0
[psl@ocean linux-imx6ull-2.4.0]$ ls
target ACTIVATE.sh linux projects tools u-boot _MANIFEST
[psl@ocean linux-imx6ull-2.4.0]$ . ./ACTIVATE.sh
[psl@ocean linux-imx6ull-2.4.0]$

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

[psl@ocean linux-imx6ull-2.4.0]$ source ACTIVATE.sh
[psl@ocean linux-imx6ull-2.4.0]$

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.

After you have the cross-development environment set up and activated, go to the project directory and build:

[psl@ocean linux-imx6ull-2.4.0]$ cd projects/rootfs
[psl@ocean linux-imx6ull-2.4.0]$ make