Getting Started Guide for iMX6 Sabre-SDP
- 1 Introduction
- 2 Basic preliminary work
- 3 Configuring the SDK for components installation
- 4 Using Gstreamer
- 5 RR iMX6 Demo Application (No GUI)
- 6 RR iMX6 Demo Application with GUI
- 7 Running graphics acceleration examples
- 8 Known Issues
- 9 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 Sabre-SDP board. In the following sections we assume that you have already installed the toolchain 2009q1-203 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 EVM. 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 SabreLite 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 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.
Configuring the SDK for components installation
The board supports two different boot modes, boot from SD Card (Slot 2 or Slot 3) and boot from eMMC . The bootloader is always going to be installed out of the boot partition in a pre-defined offset as required for the processor, the kernel and environment are going to be installed in the boot partition and the file system is going to be either in a SD card or NFS.
For all the available boot modes the SDK is going to help you with the creation of a bootable SD card by following some easy steps. 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. Open a make config menu
running make config your SDK is going to download all basic packages needed by the build system.
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 Service for details).
Selecting between Quad or DualLite board
The iMX6 Sabre-SDP board comes in two versions, one with Quad processor and the other one with DualLite processor. To configure the SDK to the correct board, follow the next steps:
/ # make config --> Bootloader Configuration --> iMX6 Processor
Creating a Bootable SD Card
No matter the desired boot mode, the first step is the creation of a bootable SD card containing the bootloader, environment, kernel and if required, the file system. The following steps will show you how to do it.
Note: for now, a direct installation in the on board eMMC memory is not supported (but it'll be soon), but there is a workaround you can follow that will be explained later.
1. Select the installation mode
- Go to the Installer configuration sub menu and under the Firmware deployment mode section select the Deploy all the firmware to a SD card option.
- Check the Flash SD card image into loopback file instead of real SD if you want to create an image instead of a real SD Card.
- In case you want to create a real SD Card, in the SD device on Linux host select your Device.
2. Select the File system configuration
- Go to the File System Configuration sub menu and under the File system image target section select the desired configuration.
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 the SD card.
Note: IF the Secure Digital Card configuration is selected, make sure to set the proper Root FileSystem location under the Installer configuration sub menu as shown below:
SD Card in slot 2: /dev/mmcblk2p2.
SD Card in slot 3: /dev/mmcblk1p2.
- Exit and save the changes.
3. Compile your SDK
cd $DEVDIR make
4. Install your SDK
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. After this, the SDK will start to perform the installation.
Setting up the Board
Once you have a bootable SD Card 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 SW6 to one of the configurations shown below.
|SD Card from Slot2 (J500)||ON||OFF||OFF||OFF||OFF||OFF||ON||OFF|
|SD Card from Slot3 (J507)||OFF||ON||OFF||OFF||OFF||OFF||ON||OFF|
Boot switch location:
Installing the SDK to eMMC memory
At this moment, a direct installation in the eMMC memory is not supported. If you want to boot from that memory follow the following steps:
- Configure your SDK by following the steps in Creating a Bootable SD Card but in the Select the installation mode section use the Flash SD card image into loopback file instead of real SD option.
- Once the image is created (after the compilation) copy the file $(DEVDIR)/images/sdcard.img to your file system directory.
cp $(DEVDIR)/images/sdcard.img $(DEVDIR)/fs/fs
- Follow the steps to create a SD Card again (this time is up to you to create a loopback or a real SD Card) and install it to a SD Card.
- Set up your board for booting from a SD card (Slot 2 or 3) and energize it.
- Once you have booted the board type the following command to install the image.
dd if=sdcard.img of=/dev/mmcblk0 bs=1M
- Once the image is installed, turn off your board, remove the SD Card and configure the boot switch for booting from eMMC. At this point your board should be booting from the on board eMMC memory.
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 (No GUI)
In this section, you are going to see the steps to enable and use the RidgeRun iMX6 demo application (script-based). This demo is aimed to demonstrate some of the capabilities of the platform and the SDK.
To enable this demo in the RidgeRun SDK configuration window go to User Applications and select the iMX6 Demo application and then compile and install your SDK as explained in previous sections.
Demo application usage example
To Run the RR iMX6 demo application interactive menu go to:
After that you are going to see the following menu:
As you can see, you have 5 different options to select. To select one of them type the corresponding number + ENTER.
Exits the demo app.
This are the video preview related demos. In this sub-menu you can chose between 3 video sources:
As in all the other menus, you'll have a back and exit option.
The available video sources are camera_loopback, video_preview and video_test_pattern.
- camera_loopback: with this option you can select between the two available cameras.
- video_preview: with this option you can select between tree different videos.
- video_test_pattern: with this option you can select between 20 different video test patterns.
After you select the desired video source, you are going to be prompted for the display to be used.
Select Display0 to use the included LVDS display or Display1 to use the HDMI monitor.
Once you select the display, you have to select the desired overlay.
Select FullScreen to display the video in FullScreen mode or Overlay to display the video in the desired position and size. You are going to be asked for the values.
With this option the board is going to be the streaming server. Like the Video_Test, you can select between 3 different video sources: from_camera, from_file and video_test_pattern.
After you select the desired option, the client's side pipeline is going to be shown on your screen, execut it in the HOST computer and then press enter to continue. The stream is going to be reproduced in your computer.
With this option the board is going to be the streaming client.
Once you select this option you are going to be asked for the Display and Overlay options. After this the server pipeline is going to be shown on the screen.
Copy and execute it in the server computer. The stream is going to be reproduced in the selected display.
With this option you can take a snapshot using the selected camera.
After you select this option, the select camera sub-menu is going to be shown, select the desired camera to take the snapshot.
The file is going to be saved in /opt/scripts/media/snapshot.jpeg.
With this option you can control the current pipelines and monitor the CPU usage.
- List_Pipelines: with this option you can list the currently executed pipelines.
- Start_Pipeline: with this option you can restart a stopped pipeline.
- Stop_Pipeline: with this option you can stop an executed pipeline. For example, if you are using a camera loopback, you can use the start_pipeline and stop_pipeline options to control it.
- CPU_LOAD: with this option you are going to see the current CPU usage. To exit this mode just type 'q'.
Finally, as an example we are going to run display two videos in Display0 and one camera loopback in Display1.
1. Select option 1 (Video_Test).
2. Select camera loopback.
3. Select the select_camera option.
4. Select Camera0
5. Select Display1
6. Select FullScreen
7. Select option 1 (Video_Test).
8. Select Video_Preview.
9. Select video_1080p.
10. Select Display0.
11. Select Overlay.
12. type '0' + ENTER + '0' + ENTER + 640 + ENTER + 480 + ENTER.
13. Select option 1 (Video_Test).
14. Select Video_Preview.
15. Select video_720p.
16. Select Display0.
17. Select Overlay.
18. type '640' + ENTER + '480' + ENTER + 320 + ENTER + 240 + ENTER.
Once the tree pipelines are running, you can use the Tools option to control or list the pipelines or to see the CPU usage.
RR iMX6 Demo Application with GUI
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.
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.
Once the installation process is completed, boot your board and go to:
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.