Getting Started Guide for iMX6 VAR-SOM-MX6 Board

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 Variscite iMX6 VAR-SOM-MX6 board. In the following sections we assume that you have already installed the Code_Sourcery_ARM_toolchain_2009q1-203 from codesourcery as well as the Linaro toolchain 2012.03 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 Var-SOM-MX6 Board. Fourth section, shows how to recover the VAR-SOM-MX6 NAND flash using an SD Card. Finally, some pipelines using gstreamer are shown.

We recommend to follow the fourth section (NAND Recovery) the first time you are going to install into the NAND the SDK images, because we cannot guaranty that the uboot version running in a new Variscite iMX6 board will work as we expect.

On the rest of this document, we refer as $DEVDIR to the path where the RidgeRun SDK for iMX6 VAR-SOM-MX6 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

Connect up the UART cable as shown:

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 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. Your 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 NAND and boot from SD (bootloader installed in a SD card). The kernel is going to be installed in a SD card, a tftp server or into the NAND and the file system is going to be either in a SD card or NFS.

The following subsections describe how to configure the iMX6 SDK to install all basic components (kernel, u-boot 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-variscite
  • Select linaro
  • Select u-boot-v2009.08-imx_3.0.35_4.0.0
  • Select linux-3.0.35-imx_4.0.0

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


Kernel location

As mentioned before, the kernel can be installed either in a SD card, in a tftp server or in the NAND. The tftp install method, can be used only when the board is configured to boot from SD card.

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

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.

Deploy all firmware to an SD card

1. SD card selection

You have to select the SD device containing the firmware. For this option, you can select between either a loopback image or a real SD card.

  • Go to Installer configuration menu and select the desire 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.

2. Exit and save changes.

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

4. 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 follow the steps below:

  • Press and hold the boot select switch (SW3).
  • Power-on the board.
  • Release the boot select switch when you see the following message:
Boot Device: SD

Attached board on communication port

For this deployment mode the board needs to be connected to the PC via serial port.

1. Select the communication method with the target board

Go to Installer Configuration and under Communication method with the target board select the desire 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. Exit and save changes.

3. Compile your SDK.

 make

Once your SDK is compiled you are ready to install it. Power on the board, press the reset button (SW4) and run:

cd $DEVDIR
make install

Note: If this is the first time that you install RR's iMX6 VAR-SOM-MX6 SDK in your board, the bootloader needs to be installed. Power on the board, press the reset button and run:

cd $DEVDIR
make installbootloader

4. Final configuration

Once the installation process is done you are ready to test your SDK with your selected configuration.

  • Power-on the board.
  • You will see the following message:
Boot Device: NAND


NAND Recovery

To recover the VAR-SOM-MX6 NAND flash, follow the next steps:

1. Select kobs-ng-3.0.35-4.0.0 tool.

/ # make config
  --> File System Configuration
    --> Select target's file system software
      - kobs-ng-3.0.35-4.0.0 

2. Select Attached board on communication port as Firmware deployment mode (see Select Firmware deployment mode for details).

3. Exit and save changes.

4. Clean the bootloader.

make bootloader_clean

5. Compile your SDK.

make

6. Copy the u-boot image to the file system.

mkdir -p $DEVDIR/fs/fs/opt/recovery/Linux
cp $DEVDIR/images/u-boot.bin $DEVDIR/fs/fs/opt/recovery/Linux

7. Clean the bootloader.

make bootloader_clean

8. Select Deploy all the firmware to an SD card as Firmware deployment mode (see Select Firmware deployment mode for details).

9. Exit and save changes.

10. Compile your SDK.

make

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

In the target

1. Insert the SD card into the SD/MMC slot of the VAR-SOM-MX6 board.

2. Press and hold the boot select button and power-on the board.

3. From Linux command line, type:

./sbin/nand-recovery.sh

4. Reboot.

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.

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 4.0.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:

modprobe galcore
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

Articles related to this board

i.MX 6Dual/6Quad Applications Processors for Consumer Products
VAR-SOM-MX6 Datasheet
Variscite Devices iMX6 VAR-SOM-MX6 Board