Getting Started Guide for iMX6 DART board
- 1 Introduction
- 2 Basic preliminary work
- 3 Configuring the SDK for components installation
- 3.1 Prepare your environment
- 3.2 File system configuration
- 3.3 Select Firmware deployment mode
- 3.3.1 Attached board on communication port
- 3.3.2 Deploy all firmware to an SD card
- 3.4 Kernel location
- 3.5 Select HDMI resolution
- 3.6 Building the SDK
- 3.7 Install the SDK
- 3.8 Final configuration
- 4 Using Gstreamer
- 5 Articles related to this board
On this page you are going to find all the necessary information to start from scratch to use the RidgeRun SDK on your iMX6 DART 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.
If you use the serial port to control u-boot and Linux. The picocom terminal emulator work well for this purpose.
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. You host PC needs to be configured as a NFS server for this in order to work properly.
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`
Open a make config menu (if you followed the previous steps, the config menu is going to be shown automatically)
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.
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.
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.
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).
- 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.
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
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.
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
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.
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:
Install the SDK
The final step is to install your SDK which is done by a simple make install command but before to do 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 wont 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 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.
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.
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.