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. In the following sections we assume that you have already installed the toolchain 2009q1 as well as the toolchain 2011.09 from codesourcery as well as your iMX6 SDK following the steps on The RidgeRun installation guide.

The second section of this guide shows instructions about how to configure your host PC before to perform 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.

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

Basic preliminary work

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 work 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 you 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 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 interveining steps. You host PC needs to be configured as a 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-2011.09
  • Select u-boot-2013.01
  • Select linux-3.0.35


3. 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 shows 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 in your computer and run mount to verify which device node has to be used

3. Exit and save changes

4. Compile your SDK

 make

Once your SDK is compiled you are ready to install it, insert a SD car and start the installation process:

 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 and be sure u-boot is running on correct ip-adreess and port and no process (like termnet) is using it. After this, the SDK will start to perform the installation.

Note: If this is the first time that you install RR's iMX6 Sabrelite SDK in your board, the bootloader needs to be installed:

 cd $DEVDIR
 make installbootloader

Deploy all firmware to an SD card

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 Attached board on communication port -> 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 Attached board on communication port -> Select SD device)

3. Exit and save changes

4. Compile your SDK

 make

Once your SDK is compiled you are ready to install it, insert a SD car and start the installation process:

 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 and if the Install Pre-Bootloader option is selected, be sure u-boot is running on correct ip-adreess and port and no process (like termnet) is using it. After this, the SDK will start to perform the installation.

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).

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 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 use of GStreamer to implement basic multimedia pipelines can be found at IMX6 GStreamer Pipelines - SDK Turrialba.

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 this 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 in 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

RidgeRun 2011Q2 SDK User Guide
RidgeRun Turrialba SDK User Guide
i.MX 6Dual/6Quad Applications Processors for Consumer Products
Technical Reference Manual