Getting Started Guide for DM8168 EVM: Difference between revisions

From RidgeRun Developer Wiki
Line 73: Line 73:
  make install
  make install
</pre>
</pre>
you will be asked to confirm the device that you are going to partition and format, please enter ''yes''. After this, the SDK will start to create a bootable SD card.


= Installation =
= Installation =

Revision as of 18:33, 4 October 2011

Page Under Construction

Introduction

On this page you are going to find all the necessary information to start from scratch to use the RidgeRun SDK on your DM8168 evaluation module (EVM). In the following sections we assume that you have already downloaded the EZSDK version 5.02.02.60 and that you have installed the toolchain toolchain 2009q1-203 from codesourcery.

The first section of this guide shows you how to install the EZSDK for DM8168 on your computer and how to configure a TFTP and NFS server. Subsequently, the second section contains instructions about how to configure the RidgeRun's SDK to create a SD with all software components (uboot, kernel and filesystem) needed to boot to Linux Shell in your EVM. Using this SD in the third and fourth section of this guide, you will be able to install on NAND images created by the SDK for kernel, uboot as well as your filesystem (JFFS2, UBI, NFS are available). Using the SD created on the second section to flash the SDK in your EVM is just an option because you could try to use the installer of the RidgeRun's SDK with the uboot version that is running by default in a new EVM, however, we cannot guaranty that it will work as we expect, hence, we recommend to use the SD instead. Finally, how to run opemax demos to encode and decode 1080p/h264 videos and some pipelines using gstreamer + openMax are shown.

On the rest of this document, we refer as $(DEVDIR) to the path where the RidgeRun SDK for DM8168 is installed

Basic preliminary work

Installing the EZSDK

1. Set the ezsdk binary as executable and set correct permissions

 sudo chmod 777 ezsdk_dm816x-evm_5_02_02_60_setuplinux

2. Install EZSDK. For ubuntu versions different than Ubuntu 10.04 LTS 32-bit you will need to add the --force-host argument to install it:

 ./ezsdk_dm816x-evm_5_02_02_60_setuplinux --force-host

note: During the EZSDK installation process you will be asked for the toolchain's path, assuming that you installed it on /opt, the path that you need to provide is /opt/codesourcery/arm-2009q1/bin/

Setting up serial access to the Linux console

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 NAND, installing a TFTP server you will speed up downloads to the target hardware by using TFTP.

Setting Up A Tftp Service

Setting up an 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

Booting from SD

Setting up your EVM to boot from SD card

In order to boot from a SD card you need to set the MMC as the first boot device to try in the DM8168 boot sequence, this can be done configuring a correct BTMODE through the switch SW3 in your EVM (see Fig. 1)

Figure 1. Dip switch to control boot mode (SD card)‎
Figure 1. Dip switch to control boot mode (SD card)

Configuring SDK to deploy firmware to a SD

This section describes how to configure the DM8168's SDK to deploy all basic firmware components (kernel, uboot and MLO) into a bootable SD card. The RidgeRun SDK support several filesystem types (JFFS2, NFS, etc) however in this case we are going to use it on the SD as well.

1. Set your environment variables

 `make env`

2. Open a make config menu

 make config

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

3. Go to Installer Configuration submenu and configure your installer as is shown in Fig.2

Figure 2. Installer configuration to deploy firmware to an SD card‎
Figure 2. Installer configuration to deploy firmware to an SD card

Using the Firmware deployment mode submenu you can set how to deploy your kernel, uboot and filesystem image into your target board. There are three options in this submenu: Attached board on communication port, Deploy all the firmware to an SD card and Create an SD card installer for flash memory.

  • Attached board on communication port will allow you to send images to your target board using a serial port or a TFTP server, more details about this option are explained in the next section.
  • Deploy all the firmware to an SD card tells to the installer that it must create the needed partitions on a SD card located in SD device on Linux host (please be sure that the option called Flash SD card image into loopback file instead of real SD is not selected) and that there it have to install the software's images generated by the SDK.
  • Create an SD card installer for flash memory is going to create and SD card with all the logic and software's images needed to flash the EVM NAND from the SD card.

4. Compile your SDK

 make

5. Once you have built your SDK, you need to install it on the SD card running make install, but before to issue this command you need to unmount your SD card, otherwise the SDK won't let you install it in order to avoid to erase information in some of your hard disks. Let's suppose that the environment variable called $(SDNAME) contains your mount point name.

 umount /media/$(SDNAME)
 make install

you will be asked to confirm the device that you are going to partition and format, please enter yes. After this, the SDK will start to create a bootable SD card.

Installation

In order to install your DM8168 EVM SDK 2011Q2 you can follow the steps described in the installation section of the RidgeRun 2011Q2 SDK User Guide.

Video initialization

When you boot your board the RidgeRun logo will be displayed, in order to display video the following commands must be executed:

echo 0 > /sys/devices/platform/vpss/graphics0/enabled 
echo 0 > /sys/devices/platform/vpss/graphics1/enabled
echo 0 > /sys/devices/platform/vpss/graphics2/enabled

Using Gstreamer

Some examples of use of GStreamer to implement basic multimedia pipelines can be found at DM81xx GStreamer Pipelines - SDK 2011Q2