Getting Started Guide for iMX6 Nitrogen6X

From RidgeRun Developer Wiki



Introduction

On this page, you are going to find all the necessary information to start from scratch to use the RidgeRun SDK on your iMX6 Nitrogen6X board from Boaundary Devices. In the following sections we assume that you have already installed the toolchain 2009q1 as well as the toolchain 2011.09 from codesourcery.

The second section of this guide shows instructions on how to configure your host PC before performing any installation. Subsequently, the third section shows how to configure the RidgeRun's SDK to install all software components (uboot, kernel and filesystem) needed to boot to Linux Shell in your SabreLite Board. Finally, some pipelines using GStreamer are shown.

Basic preliminary work

Please skip below two steps (2.1 and 2.2) in TOC and jump to 2.3 if you have purchased a Professional SDK.

Getting the RidgeRun's EVAL SDK Irazu

If you want to get RidgeRun's EVAL SDK Irazu you need to go to our Evaluation SDK Download Link and select the Evaluation SDK you need. You will be asked for your email address and some information. Once you have submitted the required information you will receive an email with the following information:

The sequence of evaluation SDK download events:

You have to follow the steps below:

When you select and click on the name of the evaluation SDK you want to download, the shopping cart page will display the price of $0.00 (for eval sdk's)
-> click on 'Go to Checkout'. It will display 'Your Shopping Bag' page
-> click on 'Checkout'. You will get a form to enter your email id and other info
-> click on 'Continue'. It will display a 'Place Order' page
-> click on 'Place Order'. And then Please check your email with a link to download the tar file for the evaluation SDK you have selected.

Installing the EVAL SDK version

RidgeRun delivers the SDK in either two ways: a tar file for x86 platforms, or for customers with an established development relationship through a custom SCM (typically GIT) repository. If you are using a shared SCM repository, please contact RidgeRun for detailed instructions.

System Requirements

Listed below are the minimum recommended requirements for installing and using the RidgeRun SDK:

  • A host computer with a 686 or better family processor
  • 1 GB free hard disk space
  • A Linux distribution configured on the host computer.
  • Target hardware for the SDK
  • Optional: a network card installed and configured on the host computer
  • Optional: Internet connection for SDK updates

Once you have downloaded the tar file of the evaluation SDK you can untar it by running the following command:

tar -xvzf <name of the tar file downloaded>.tar.gz 

You may find it convenient to untar the evaluation SDK more than once. For example, you might want one version to be unmodified and another version to be your working development directory. RidgeRun suggests you untar the SDK development directories in your $HOME/work/ directory. When you have more than one development directory installed, just remember to have the DEVDIR shell variable set properly. To set the DEVDIR shell variable use the `make env` command specified at RidgeRun_Irazu_SDK_User_Guide#Build_SDK

On the rest of this document, we refer as $DEVDIR to the path where the RidgeRun Eval SDK for the iMX6 Nitrogen6X board is installed.

Installing the Professional SDK version

When all the purchase process is done, RidgeRun will provide you a GitHub repository access. For that, the GitHub user ID and other information might be requested. Once you provide that information, you must clone the given repository URL, using the next command:

git clone git@github.com:RidgeRun/<customer>.git

This would have the proper <customer> space modified. With this, you will have the SDK installed on the directory you were in when executed the clone command.

RidgeRun suggests you install the SDK development directories in your $HOME/work/ directory. When you have more than one development directory installed, just remember to have the DEVDIR shell variable set properly. To set the DEVDIR shell variable use the `make env` command specified at RidgeRun_Irazu_SDK_User_Guide#Build_SDK

On the rest of this document, we refer as $DEVDIR to the path where the RidgeRun Professional SDK for the iMX6 Nitrogen6X board is installed.

Setting up serial access to the Linux console

You can use termnet to control u-boot and Linux. For this purpose, the board needs to be connected to the same network as the host computer. This is useful because the board doesn't have to be directly connected to the PC containing the SDK.

Setting up termnet - Ubuntu

If you use the serial port to control u-boot and Linux. The picocom terminal emulator works well for this purpose.

Setting up Picocom - Ubuntu

Setting up a TFTP server

If you are planning to use the SDK's installer to install images generated by the SDK in SPI-NOR, installing a TFTP server will speed up downloads to the target hardware by using TFTP.

Setting Up A Tftp Service

Setting up a NFS server

For application development, it is convenient to use the root NFS mount file system for the target hardware. This allows you to rebuild your application on the host and immediately run the application on the target hardware with no intervening steps. Your host PC needs to be configured as an NFS server for this in order to work properly.

Setting Up A NFS Service

Configuring the SDK for components installation

The board supports two different boot modes, boot from SPI-NOR (bootloader installed in SPI-NOR) and boot from SD (bootloader installed in a SD card). The kernel is going to be installed in a SD card or a tftp server and the file system is going to be either in a SD card or NFS.

Since some components (bootscrip, environment, kernel) are always going to be installed in a SD card (NOR memory size is too small to keep the kernel, just the bootloader will be in NOR if it is needed) you will always need a sd card in order to perform a complete installation. The following subsections describe how to configure the iMX6 SDK to install all basic components (kernel, uboot and file system).

Prepare your environment

1. Set your environment variables

  cd $DEVDIR
 `make env`

2. Select the machine and Toolchain

 make coreconfig
  • Select mach-nitrogen6x
  • Select arm-eabi-glibc-codesourcery
  • Select u-boot-2013.10
  • Select linux-3.0.35


3. Open menuconfig

Open a make config menu (if you followed the previous steps, the config menu is going to be shown automatically)

 
make config

running make config your SDK is going to download all basic packages needed by the build system.

File system configuration

Go to file system configuration submenu and under File system image target select the desired option.

  • NFS root file system: the file system is going to be in the host PC.
  • Secure Digital Card: the file system is going to be installed in a SD card.
FS selection
FS selection

Select Firmware deployment mode

  • Go to Installer Configuration submenu and under Firmware deployment mode select the desired option.

Attached board on communication port: the board is going to be configured for booting from SPI-NOR

Deploy all the firmware to an SD card: the board is going to be configured for booting from SD card.

Deployment mode selection
Deployment mode selection

The following sections show you how to configure your SDK for the selected deployment mode.

Attached board on communication port

For this deployment mode, the board needs to be connected to the PC via serial port and USB. Since the board is going to be booted via USB the boot mode switch (SW1) has to be properly configured as shown below.

Boot from USB mode
Boot from USB mode

 

Since the kernel is always going to be installed in a SD card (NOR memory size is too small to keep the kernel, just the bootloader will be in NOR if it is needed) you will always need a sd card in order to perform a complete installation.  The following steps describe how to configure the iMX6 SDK to install all basic components (kernel, uboot and file system).

1. Select Communication method with the target board

  • Go to Installer configuration menu and under Communication method with the target board select the desired option (for this tutorial Telnet-serial adaptor is assumed).
Communication method
Communication method
  • In IP address of telnet-serial adaptor use your host PC IP address.
  • In Network port of telnet-serial adaptor use the port configured in Setting up termnet - Ubuntu

2. Select SD device

  • Go to Installer configuration menu and select the desired option.
SD device selection
SD device selection

If the Flash SD card image into loopback file instead of real SD option is enabled, the installer will generate a file on images/sdcard.img containing the components to be installed in the SD card, if not, the SD device on Linux host has to be properly set.

Tip: You can insert your SD card into your computer and run mount to verify which device node has to be used

3. Exit and save changes

Deploy all firmware to an SD card

This method is basically intended to avoid the need of updating the content of the Board's SPI-NOR, however, if one wants the bootloader to be installed in the SD card as well, a pre-bootloader needs to be installed in SPI-NOR in order to tell the SoC to look for the bootloader in SPI-NOR but if this is not the case, please just skip step 1 and go directly to step 2.

NOTE: if you decided to install the pre-bootloader the board needs to be attached to the host computer via serial port and USB OTG but if not it doesn't need to be attached.

1. Install Pre-Bootloader in SPI-NOR

In this deployment mode the firmware is going to be installed in a SD card with the option to install a pre-bootloader that allows the board to be booted from the SD card.

SD card mode
SD card mode

If you select the Install Pre-Bootloader a pre bootloader is going to be installed in SPI-NOR in order for the board to be able of booting from the selected device, for that reason, as in the Attached board deployment mode, the board has to be connected via USB to the host PC and the BOOT switch has to be properly configured (see Attached board on communication port).


  • Bootloader location

With this option you select the SD card slot with the device containing the bootloader.

SD3: the bootloader is going to be in a SD card located in slot SD3.

SD4: the bootloader is going to be in a SD card located in slot SD4.

  • Communication method

If the pre-bootloader is going to be installed in SPI-NOR, the appropriate communication method must be configured in the same way that that is configured for the Attached mode (see Select Communication method with the target board).

Note: The pre-bootloader installation is only necessary the first time that you install the SDK, in subsequent installation this option can be deselected so you don't need the board to be attached to the PC.

2. SD card selection

The last step is the selection of the SD device containing the firmware. For this option as well as for the attached board method you can select between either a loopback image or a real SD card (see Select SD device)

3. Exit and save changes

Kernel location

As mentioned before, the kernel can be installed either in a SD card (default configuration) or in a tftp server.

To enable the kernel to be installed in a tftp server go to Installer configuration and select the option Start kernel via tftp. With this option enabled the SDK is going to install the kernel image in your tftp server and the board is going to be configured to start the kernel from there.

Kernel location
Kernel location

Note: Make sure you have your tftp server properly configured if you are going to use the Start kernel via tftp option (see Setting up a TFTP server for details).

Select HDMI resolution

When you deploy the SDK, a script is going to be installed that automatically detects and configured all the attached displays, if you are using an HDMI monitor, yo can select between 720p or 1080p output resolutions, to do so go to:

-> Installer Configuration
      -> Configure HDMI 1080p60 

Select the option for 1080p60 output or live it unselected for 720p output resolution.

Building the SDK

Once you completed the previous steps your SDK should be properly configured for building. To do so just go to your $(DEVDIR) directory and do:

 
make

Install the SDK

The final step is to install your SDK which is done by a simple make install command but before doing it, if you selected the Attached board on communication port installation mode or decided to deploy all the firmware to an SD card with a pre-bootloader make sure that the board is attached to the host PC via serial port and via the USB OTG in the board (both connections) and after this start the installation process. Any other case won't need the board to be attached to the computer.

Insert a SD card into the HOST PC and do:

 
umount /media/$SDNAME
cd $DEVDIR
make install
  • You will be asked to confirm the device that you are going to partition and format, please enter yes if it is correct.
  • If you decided to install a pre-bootloader please make sure u-boot is running on the correct ip-adreess and port and no process (like termnet) is using it. You also have to make sure that the board is properly attached to the host PC via serial port and USB OTG connections.

Final configuration

Once the installation process is done you are ready to test your SDK with your selected configuration. To start using your board, insert the SD card in the corresponding slot and set the boot switch SW1 as shown below in order to configure the board on SPI-NOR boot mode. It is important to mention that you will always need to configure the board to boot from SPI-NOR even if you are using different locations for the bootloader (SPI-NOR, SD3, SD4), this is a limitation of this board. In the case of the SD3 and SD4 options, the SDK will use a prebootloader in SPI-NOR which will set up the board to load the components (bootloader,kernel, FS) from the SD card.

Normal boot mode
Normal boot mode

Using GStreamer

Some examples of the use of GStreamer to implement basic multimedia pipelines can be found at

IMX6_GStreamer-1.0_Pipelines
IMX6_GStreamer_Pipelines_-_SDK_Irazu

You can also use the integrated multimedia player gplay instead of a complete pipeline.

 
gplay <file name>

With the previous command, the correct plugins are going to be selected in order to reproduce the file.

RR iMX6 Demo Application

In this section, you are going to see the steps to enable and use the RidgeRun iMX6 demo application (GUI-Based). This demo is aimed to demonstrate some of the capabilities of the platform and the SDK.

For a complete description on how to install and use the Ridgerun demo application for iMX6 platforms please go to the next guide.

IMX6 Demo Application

Running graphics acceleration examples

The first step is enabling the graphics processing unit. To do so, in the SDK configuration process, follow these steps:

  • Go to Proprietary software and select the gpu-viv-bin-mx6q 1.1.0 option. When you select it, a new option is going to be available, select GPU Vivante sample applications to enable the Vivante sample applications to be installed in your file system.
GPU
GPU

Once the installation process is completed, boot your board and go to:

 
cd /opt/viv_samples/

In that location, you are going to find 5 folders with pre-compiled applications. As an example execute:

 
cd /vdk
./tutorial3
  • Note: applications in the cl11 folder are going to fail depending on the Toolchain version you are using.

Known Issues

1. If the file system is in SD4 and SD3 is also present on the board the boot process crashes because the file system path is set to mmcblk0 and that device is assigned to SD3.

Articles related to this board

i.MX 6Dual/6Quad Applications Processors for Consumer Products
Technical Reference Manual