NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Community Linux DVEVM Software Setup

From Texas Instruments Wiki
Jump to: navigation, search

Content is no longer maintained and is being kept for reference only!



Software Overview[edit]

Terminology: "DVEVM" is the physical kit, including EVM hardware, software and everything included in the kit. The "DVSDK" refers to the TI software included in the DVEVM.

To begin developing applications, you need to install the DVSDK development environment. This chapter outlines the steps required to load the DVSDK onto the development host. You will need the distribution disks or the files provided as a part of DVEVM.

The DVSDK provides inter-operable, optimized, production-ready video and audio codecs that leverage integrated accelerators. These codecs are built into configurable frameworks, and are presented via published APIs within popular operating systems (such as Linux) for rapid software implementation.

The following software is made available with the DVSDK, some included with the kit and some can be downloaded with registration. Please see release notes for details on the download locations.

Software package Description
TI DVSDK Software installer dvsdk_#_#_#_#.tar.gz This package includes demo applications and other DVSDK related components
arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 This package file contains the Code Sourcery 2009 q1 ARM tool chain
linux-davinci-staging.tar.gz This package contains the GIT Linux support package kernel (PSP) source
arago-2009.09-armv5te-linux-gnueabi-sdk.tar.gz This SDK contains pre-compiled libraries (for eg. alsa, png, etc)
davinci-psp_#.#.#.#-phase# Arago filesystem version 2009.09. This package contains the Linux root file system, kernel (uImage) and U-Boot images
dvsdk_#_##_##_##_overlay_dm###.tar.gz Platform Specific Target Binaries
SDI Board Support Software This package includes the EVM board utilities

Guidelines to migrate from MontaVista-based releases can be found at Community Linux DVEVM Software Migration Guide

Command Prompts in This Guide[edit]

In this guide, commands are preceded by prompts that indicate the environment where the command is to be typed. For example:

host $

Indicates command to be typed into the shell window of the host Linux workstation.

EVM #

Indicates commands to be typed into the U-Boot shell in a console window connected to the EVM board's serial port as discussed here.

target $

Indicates commands to be typed into the Linux shell in the terminal window connected to the EVM board's serial port.

Software Components[edit]

The following figure shows the software components used for application development with the DVSDK:

DVSDK Linux Software Block Diagram

In the this figure, everything runs on the ARM. The application handles I/O and application processing. To process video, image, speech, and audio signals, it uses the DMAI APIs provided by DMAI. The DMAI talks to PSP for capture, display/playout of audio/video and to Codec Engine for codec processing. The Codec Engine, in turn, uses xDM-based codecs.

In addition, Linux running on the ARM makes a large number of APIs available to your application, including drivers and timers.
Note: Gstreamer is not a part of standard DVSDK stack.

Preparing to Install[edit]

On a host Linux system (Ubuntu 8.04 was used for this guide), download and copy the following files to a temporary location with at least 1.2 GB available space. Since you can delete the installation files after installing the software, a directory like /tmp is recommended. We will be referring this directory as download area.

  • arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 - contains the Code Sourcery tools
  • linux-davinci-staging.tar.gz - contains the kernel source tree with the TI modifications, also known as the Product Support Package (PSP)
  • arago-2009.09-armv5te-linux-gnueabi-sdk.tar.gz - contains SDK with precompiled libraries
  • dvsdk_#_#_#_#.tar.gz - contains the DVSDK itself
  • davinci-psp_#.#.#.#-phase#/images/dm###-evm - for root filesystem, kernel image (uImage) and uboot image

Updates to these installers may be available on subsequent releases.

Installing the Software[edit]

Installing the software used by the DVSDK involves performing the following steps:

  • Installing the Target Linux Software
  • Creating a Target and Host Shared File System and Exporting it for Target Access
  • Testing the Shared File System
  • Setting Up the Build/Development Environment

Installing Software Components[edit]

This section explains how to install required software components to host.

1) Log in to your host Linux workstation

2) Let us assume you want to install all components in /home/user/dvsdk directory. Open a command prompt and go to the download directory

host $ cd </home/user/dvsdk>

3) Download and unpack the tool chain: The link Getting_CodeSourcery_Toolchain provides necessary information to download the toolchain. Let us assume you want to downloaded the toolchain and installed it in /opt/arm-2009q1 directory

host $ sudo mkdir /opt/arm-2009q1
host $ sudo tar -xlf arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C /opt/

Note: The sudo is not necessary if you want to install the toolchain in some other place. The toolchain can be installed anywhere in the system as long as the directory have necessary write permissions.

4) Unpack the Linux SDK

host $ tar -xzf arago-2009.09-armv5te-linux-gnueabi-sdk.tar.gz -C /home/user/dvsdk

It creates SDK in /home/user/dvsdk/opt/arago-2009.09 directory. The path to the Linux libraries is /home/user/dvsdk/opt/arago-2009.09/arago-armv5te-linux-gnueabi-sdk/arm-none-linux-gnueabi/usr.

5) Unpack the Linux PSP source

host $ tar -xzf linux-davinci-staging.tar.gz  -C /home/user/dvsdk

The Linux kernel can be found in /home/user/dvsdk/git.

6) Install the DVSDK software

host $ chmod a+x dvsdk_#_##_##_##_Setup.bin
host $ ./dvsdk_#_##_##_##_Setup.bin

This will open the installer GUI, please choose appropriate options and enter the required paths to complete the installation. This installs the DVSDK in /home/user/dvsdk/dvsdk_#_#. You can choose to update the paths later by editing the Rules.make file.

Note: You can uninstall these components by using the rm -rf command on its directory. You should ignore the uninstall files created by the installer.

Creating a Target and Host Shared File System and Exporting it for Target Access[edit]

Although the EVM board's (i.e. target's) NAND flash contains a file system, during development it is more convenient to have the target board NFS mount a file system on a host Linux workstation. Once you have tested the application, you can store it on the board's flash for a standalone demonstration.

Before the EVM can mount a shared target file system, you must export that target file system on the host Linux workstation. The shared file system uses a NFS (Network File System) server. The exported file system will contain the target file system and your executables.

The detail procedure for setting up the target filesystem is given in Setting_up_the_target_filesystem.

A typical bootargs set for DM365 demo applications with NFS filesystem is given below.

setenv bootargs mem=76M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=XXX.XXX.XXX.XXX:/nfs/dm365 ip=dhcp video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,2025K vpfe_capture.interface=0 vpfe_capture.bufsize=4147200

Setting Up the Build/Development Environment[edit]

To set up the development and build environment, follow these steps:

1) Log in to your user account (and not as root) on the NFS host system.

2) Set your PATH so that the tool chain host tools and cross compiler (arm-none-linux-gnueabi-gcc) can be found. Note that this step is asking you to open .bashrc in a text editor such as vi or gedit and add the export command line to the file, for example run the command below:

host $ gedit /home/user/.bashrc

Than add the export command below to the .bashrc file:

export PATH="/opt/arm-2009q1/bin:$PATH"

If you installed in a location other than /opt/arm-2009q1/bin, use your own location in the PATH.

3) Remember to use the following command after modifying your .bashrc file, the source command will essentially execute the .bashrc script such that the path you just added to it is put into your environment variables:

host $ source /.bashrc 

4) If you want to verify your new PATH variable you can run either of the commands below:

This will print just the PATH variable:

host $ echo $PATH 

This will print all of the system's current environment variables:

host $ printenv 
Writing a Simple Program and Running it on the EVM[edit]

Make sure you have performed the steps in Booting_with_NFS_as_a_root_filesystem.

Perform the following steps on the NFS host system as user (not as root):

1) Make a new directory for the simple program:

host $ mkdir /opt/workdir/filesys/opt/hello

2) Move to the new directory:

host $ cd /opt/workdir/filesys/opt/hello

3) Create a file named hello.c using a text editor (for example, gedit, kedit, xemacs, or vi),

host $ gedit hello.c

Now add the following contents to it:

#include <stdio.h>
int main()
{
  printf("Buongiorno DaVinci!\n");
  return 0;
}

4) Build the new c file:

host $ arm-none-linux-gnueabi-gcc hello.c -o hello

Perform the following steps on the target board. You may use either the target's console window (Discussed here) or a telnet session.

1) Go to the new directory on the target:

target $ cd /opt/hello

2) Run the new executable:

target $  ./hello

The output should be:

Buongiorno DaVinci!

Building the DVSDK Software for the Target[edit]

You can build both linux kernel and DVSDK from dvsdk_##_##. The following step assumes you have installed all components described above in /home/user/dvsdk

1) Change directory to /home/user/dvsdk/dvsdk_#_#

2) Skip this step if you have entered correct path in DVSDK installation phase.

Edit the Rules.make file in the dvsdk_#_#. directory.

host $ gedit Rules.make

If you installed components in the default locations, the directory definitions may already be correct, but you should verify them in any case.

Set PLATFORM to match your EVM board as follows:

PLATFORM=dm### 

Set DVSDK_INSTALL_DIR to the top-level DVSDK installation directory as follows, note that by default ${HOME} refers to your /home/<user> directory:

DVSDK_INSTALL_DIR=/home/user/dvsdk/dvsdk_#_#

Make sure LINUXKERNEL_INSTALL_DIR is defined as follows so it points to where you copied the linux kernel tree in the Building a New Linux Kernel.

LINUXKERNEL_INSTALL_DIR=/home/user/dvsdk/git

And LINUXLIBS_INSTALL_DIR points to the extracted SDK

LINUXLIBS_INSTALL_DIR=/home/user/dvsdk/opt/arago-2009.09/arm-none-linux-gnueabi/usr

Make sure CSTOOL_DIR points to the Code Sourcery tools directory as follows:

CSTOOL_DIR=/opt/arm-2009q1 

Make sure EXEC_DIR points to the opt directory on the NFS exported file system as follows:

EXEC_DIR=/home/useracct/workdir/filesys/opt/dvsdk/dm####

4) This step requires mkimage to be present in the system. The Ubuntu 8.04 LTS version does not have mkimage installed by default. One way to install mkimage in an Ubuntu machine is to follow instructions in the link [uboot-mkimage].

To build Linux kernel (uImage) with default settings run following command (This step is needed to re-build kernel modules in DVSDK).

host $ make linux_clean
host $ make linux

At the end of the build the make system will output a message where the uImage is located. Typically it will be in /home/user/dvsdk/git/arch/arm/boot/uImage.

5) (Optional) Use the following command to copy uImage to a place where U-Boot can use TFTP to download it to the EVM. These commands assume you are using the default TFTP boot area, which is /tftpboot. If you use another TFTP root location, please change /tftpboot to your own TFTP root location. (Perform these commands as root or use a chown uImage command to get ownership of the file.)

host $ cp /home/user/dvsdk/git/arch/arm/boot/uImage /tftpboot
host $ chmod a+r /tftpboot/uImage

6) While in the same directory that contains Rules.make, use the following commands to build the DVSDK demo applications and put the resulting binaries on the target file system specified by EXEC_DIR. Note that the first time you run 'make clean' there may not be much to clean yet, so the output from make will have a lot of 'no such file or directory' messages. Also you must have built Linux kernel as described in previous step at least once before running following make. The make commands should be run as the user account.

host $ make clean
host $ make
host $ make install 

7) You can test the rebuilt DVSDK applications by booting your NFS file system and running the demos from the command line as described in Running the Demos from the Command Line.

8) The DVSDK make system (Makefile) is also capable of building individual components separately. Type following command to know about all of its features.

host $ make help

Notes on Using Evaluation/Production Codecs[edit]

As part of the DM365 DVSDK installation, you received a number of codecs:

  • Sequential JPEG Decoder
  • Sequential JPEG Encoder
  • MPEG4 Restricted Simple Profile Decoder
  • MPEG4 Simple Profile Encoder
  • H.264 High Profile Decoder
  • H.264 High Profile Encoder
  • G.711 Decoder (not a TI codec)
  • G.711 Encoder (not a TI codec)

These codecs are provided under a "for demonstration-only" license agreement. If you wish to use these codecs in a production development environment, you can go to the http://www.ti.com/digitalmediasoftware web site and click on "Software Inventory" to download the latest production versions and the appropriate license agreement.


To continue the EVM setup process please continue in the Getting Started Guide.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Community Linux DVEVM Software Setup here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Community Linux DVEVM Software Setup here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Community Linux DVEVM Software Setup here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Community Linux DVEVM Software Setup here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Community Linux DVEVM Software Setup here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Community Linux DVEVM Software Setup here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Community Linux DVEVM Software Setup here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Community Linux DVEVM Software Setup here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Community Linux DVEVM Software Setup here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity