DM365 Leopard SDK Legacy Getting Started Guide

From RidgeRun Developer Connection

(Difference between revisions)
Jump to:navigation, search
(Setting up video components)
(47 intermediate revisions not shown)
Line 1: Line 1:
This guide includes instructions and tips users should follow to get their DM365 Leopard Board to work with the RR Evaluation SDK.
This guide includes instructions and tips users should follow to get their DM365 Leopard Board to work with the RR Evaluation SDK.
-
For this guide different commands need to be executed on the host machine and the target. Commands to be run on the <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">Ubuntu host</span> have a yellow background. Commands to be run on the <span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">Ubuntu target</span> have an aqua background.
+
For this guide different commands need to be executed on the host machine and the target. Commands to be run on the <span style="background: none repeat scroll 0% 0% rgb(255, 255, 192);">Ubuntu host</span> have a yellow background. Commands to be run on the <span style="background: none repeat scroll 0% 0% rgb(192, 255, 255);">Ubuntu target</span> have an aqua background.
-
== Installation ==
+
= Installation =
-
Before compiling the SDK the toolchain needs to be installed on your host computer. Copy the contents of the tarball (the download link should be provided in the mail sent to you containing download instructions) inside ''/opt''.
+
The e-mail received with the evaluation SDK installation links should have:
 +
* The SVN repository link.
 +
* The toolchain download link.
 +
* An username and password in order to access the download link for the toolchain.
-
Notice the tarball contents are inside a folder named ''opt'', DO NOT replace this folder with your local ''opt'' directory, just use its contents (''arm-linux-gnueabi'' directory).
+
== GNU Toolchain Installation ==
-
Several packages are needed in order to compile the SDK. While compiling you will be prompted to install them using ''sudo apt-get &lt;packages&gt;''.  
+
The LeopardBoard 365 Evaluation SDK uses the GNU toolchain for cross compilation.  You need to download and install the toolchain before you can build the SDK.
 +
 
 +
=== Toolchain Download ===
 +
 
 +
The email you received when you requested the LeopardBoard 365 Evaluation SDK contained a link to the toolchain tarball, along with the user name and password to access the files available for download.
 +
 
 +
<pre style="background:#FFFFC0">
 +
firefox http://support.ridgerun.com/leoparddm365sdk/downloads
 +
</pre>
 +
 
 +
I saved the toolchain to the default <tt>$HOME/Downloads</tt> directory.
 +
 
 +
=== Install Toolchain ===
 +
 
 +
Assuming the toolchain tarball is in the <tt>$HOME/Downloads</tt> directory, you can follow these steps to install the toolchain into the location expected by the SDK.
 +
 
 +
<pre style="background:#FFFFC0">
 +
sudo tar -C / -xjf $HOME/Downloads/toolchain.tar.bz2
 +
</pre>
 +
 
 +
Verify your GNU toolchain is installed properly.
 +
 
 +
<pre style="background:#FFFFC0">
 +
ls /opt/arm-linux-gnueabi/bin
 +
</pre>
 +
 
 +
and you should see around 35 tools in the directory.
 +
 
 +
== Install other required packages ==
 +
 
 +
Usually the SDK will ask you to install any missing package it requires that is not installed on your host machine. You can install them using the following command:
 +
 
 +
<pre style="background:#FFFFC0">
 +
sudo apt-get install package_name
 +
</pre>
 +
 
 +
The following is the list of the required packages by the SDK:
 +
 
 +
* autoconf2.59
 +
* libgtk2.0-dev
 +
* bison
 +
* flex
 +
* mono-devel
 +
* libexpect-perl
 +
* libusb-dev
 +
* curl
 +
* minicom
 +
* libtool
 +
* libncurses5-dev
 +
 
 +
 
 +
== Checkout SDK ==
 +
 
 +
With this SVN repository Linux from the email, check out a development directory from the repository:
 +
 
 +
<pre style="background:#FFFFC0">
 +
mkdir -p ~/work
 +
cd ~/work
 +
svn co <repositoryLink> leo365
 +
</pre>
 +
 
 +
I put all my development directories in the work directory in my home folder.  You can have more than one development directory installed, just remember to have the DEVDIR shell variable set properly.
 +
 
 +
== Build SDK ==
 +
 
 +
Several packages are needed in order to compile the SDK.  The SDK build process will let you know what packages are needed. While compiling you will be prompted to install them using ''sudo apt-get &lt;packages&gt;''.  
Configure the features you want to have in your board using:  
Configure the features you want to have in your board using:  
-
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make config</span>
+
<pre style="background:#FFFFC0">
 +
make config
 +
</pre>
 +
 
 +
Set the PATH to include the toolchain and aslo set the DEVDIR shell variable
 +
 
 +
<pre style="background:#FFFFC0">
 +
$(make env) # this is the same as using grave accents to execute the output from the command - `make env`
 +
</pre>
Compile the SDK:  
Compile the SDK:  
-
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make</span>
+
<pre style="background:#FFFFC0">
 +
make
 +
</pre>
-
install the bootloader on the target:
+
== Install bootloader, kernel, and target file system on LeopardBoard 365 ==
-
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make installbootloader</span>
+
=== Verify bootloader is active ===
-
and install it on the target:  
+
First a minicom (or any other terminal emulator used) session must be opened in order to stop
 +
the booting process at the bootloader prompt:  
-
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make install</span>
+
<pre style="background:#FFFFC0">
 +
minicom
 +
</pre>
-
To install the devdir on the target make sure the board is on the bootloader prompt.  
+
Reboot the board and stop the autoboot when
 +
Hit any key to stop autoboot: ...
 +
is displayed. Then close your minicom session.
 +
 
 +
=== Save bootloader to target hardware ===
 +
 
 +
The next step is to install the bootloader on the target.  Typically you only install the SDK bootloader once.
 +
 
 +
<pre style="background:#FFFFC0">
 +
make installbootloader
 +
</pre>
 +
 
 +
=== Update target hardware with new images ===
 +
 
 +
Power cycle your target hardware, and install uboot environment / kernel / FS on the target (per your SDK configuration choices):
 +
 
 +
<pre style="background:#FFFFC0">
 +
make install
 +
</pre>
 +
 
 +
Similar to the bootloader installation, to install the devdir on the target the booting process should be stopped at the bootloader prompt.
 +
 
 +
== Updating your SDK ==
 +
Since the SDK is in a SVN respository RidgeRun can periodically make updates to the contents. To have an up-to-date SDK the following command
 +
must be executed on the SDK root directory
 +
<pre style="background:#FFFFC0">
 +
make update
 +
</pre>
 +
 
 +
If, for any reason, modifications to any files that are included in a patch were made, the make update process won't be able to finish successfully.
 +
In order to override this the following command must be executed
 +
<pre style="background:#FFFFC0">
 +
make update FORCE_UP=1
 +
</pre>
 +
Note that all changes previously made to these files will be lost.
 +
 
 +
Also, a debug functionality is implemented where all the executed commands will be displayed on the standard error (usually the same as standard output).
 +
To activate it use
 +
<pre style="background:#FFFFC0">
 +
make update DEBUG_UP=1
 +
</pre>
 +
 
 +
Of course, a combination of both options can be used
 +
<pre style="background:#FFFFC0">
 +
make update FORCE_UP=1 DEBUG_UP=1
 +
</pre>
 +
 
 +
A brief help menu explaining these features can be displayed using
 +
<pre style="background:#FFFFC0">
 +
make help
 +
</pre>
 +
 
 +
'''NOTE:''' ''In the latest 2XXXQX versions of the SDK you will be able to find a new target called make show_updates, this target shows all the current available updates for your SDK with a detailed description of each one.''
 +
 
 +
= SDK Hints =
== SD boot recover  ==
== SD boot recover  ==
Line 32: Line 167:
If you brick your board, this can be recovered from an SD card. In order to make a bootable SD card you first need to have a successfully compiled SDK.  
If you brick your board, this can be recovered from an SD card. In order to make a bootable SD card you first need to have a successfully compiled SDK.  
-
*SD card preparation:
+
=== SD card preparation ===
-
1. Insert the SDcard to the host port
+
1. Insert the SD card to the host port
-
2. Find out the device mounting point (e.g. /dev/sdd1)  
+
2. Find out the device mounting point (e.g. /dev/sdd)  
-
3. On your devdir root directory type: <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make sd_boot_recover device=/dev/sdX</span>, where sdX is your device mounting point.
+
3. On your devdir root directory type:  
-
*Boot recover
+
<pre style="background:#FFFFC0">
 +
make sd_boot_recover device=/dev/sdX
 +
</pre>
-
1. Insert the SD card (if you already inserted it, disconnect and connect again).  
+
where sdX is your device mounting point.  
-
2. Type <span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make install sd_boot_recover</span>
+
=== Install Boot recovery files on SD card ===
-
3. Set switch 2 of DIPSW1 to ON, 1 and 3 to OFF. This is SD card boot mode.  
+
1. Remove SD card from host and reinsert the SD card into host. This will cause your host to mount the VFAT file system on the SD card.
-
4. Power up the board, it will automatically erase the NAND flash, and burn UBL, u-boot, kernel and filesystem
+
2. Type
-
5. Set all pos of DIPSW1 to OFF for NAND boot mode.
+
<pre style="background:#FFFFC0">
 +
make install sd_boot_recover
 +
</pre>
-
6. Connect serial cable to PC and power cycle the board (it should boot up). Insert the SD card to the board.  
+
=== Boot from SD to recover NAND image ===
 +
 
 +
1. Set switch 2 of DIPSW1 to ON, 1 and 3 to OFF. This is SD card boot mode.
 +
 
 +
2. Power up the board, it will automatically erase the NAND flash, and burn UBL, u-boot, kernel and file system.  The [[SD card recovery LeopardBoard 365 serial output]] will provide progress information.
 +
 
 +
 
 +
=== Verify NAND recovery ===
 +
 
 +
1. Set all pos of DIPSW1 to OFF for NAND boot mode.
 +
 
 +
2. Connect serial cable to PC and power cycle the board (it should boot up). Insert the SD card to the board.
 +
 
 +
Your LeopardBoard 365 now contains the UBL, uboot, kernel, and file system that was originally shipped on LeopardBoard 365 boards.
 +
 
 +
Having this done the bootloader and devdir must be installed (check [[DM365 Leopard SDK Getting Started Guide#Installation | Installation]] for instructions).
== Setting up video components  ==
== Setting up video components  ==
Line 58: Line 212:
The output and mode used for video playback/capture can be set during the SDK configuration process. The first step is to enter the configuration script:  
The output and mode used for video playback/capture can be set during the SDK configuration process. The first step is to enter the configuration script:  
-
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make config</span>
+
<pre style="background:#FFFFC0">
 +
make config
 +
</pre>
Inside ''Architecture configurations'' select the options you desire on ''Video Output'' and ''Video Default Resolution''.
Inside ''Architecture configurations'' select the options you desire on ''Video Output'' and ''Video Default Resolution''.
Line 64: Line 220:
Finally compile your changes and install
Finally compile your changes and install
-
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make</span>
+
<pre style="background:#FFFFC0">
-
<span style="background: none repeat scroll 0% 0% rgb(255, 255, 0);">make install</span>
+
make
 +
make install
 +
</pre>
 +
 
 +
When you use the SDK to set your video output and resolution, the SDK build process creates <tt>$DEVDIR/images/cmdline</tt> with different kernel command line parameter settings.  The table below shows the various video output settings for three of the common settings
 +
 
 +
{| border=2
 +
! Video Output || DVI || Component || Composite || sysfs file
 +
|-
 +
! Resolution
 +
| 720P-60 || 720P-60 || NTSC ||
 +
|-
 +
! davinci_enc_mngr.ch0_output
 +
| DVI || COMPOSITE || COMPONENT || /sys/class/davinci_display/ch0/output
 +
|-
 +
! davinci_enc_mngr.ch0_mode
 +
| 720P-60 || 720P-60 || NTSC || /sys/class/davinci_display/ch0/mode
 +
|-
 +
! davinci_display.cont2_bufsize
 +
| 6291456 || 6291456 || 3145728 ||
 +
|-
 +
! vpfe_capture.cont_bufoffset
 +
| 6291456 || 6291456 || 3145728 ||
 +
|-
 +
! vpfe_capture.cont_bufsize
 +
| 6291456 || 6291456 || 6291456 ||
 +
|}
== Activation of video capture modules  ==
== Activation of video capture modules  ==
-
While configuring the SDK go to ''Kernel configuration-&gt;Device drivers-&gt;Multimedia support-&gt;Video capture adapters and activate the devices you desire.''  
+
While configuring the SDK go to ''Kernel configuration-&gt;Device drivers-&gt;Multimedia support-&gt;Video capture adapters and activate the devices you desire.''
 +
 
 +
[[LeopardBoard 365 GStreamer Pipelines]] contains instructions showing examples to demonstrate the hardware is working.
== Video initialization  ==
== Video initialization  ==
Line 75: Line 259:
When you boot your board the RidgeRun logo will be displayed, in order to display video the following commands must be executed:  
When you boot your board the RidgeRun logo will be displayed, in order to display video the following commands must be executed:  
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">loadmodules.sh</span>
+
<pre style="background:#C0FFFF">
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">fbset -disable</span>
+
loadmodules.sh
 +
fbset -disable
 +
</pre>
== Component output initialization  ==
== Component output initialization  ==
Line 82: Line 268:
There's a known bug with the component output initialization. Before you play or capture video using the component output this commands must be executed on the target:  
There's a known bug with the component output initialization. Before you play or capture video using the component output this commands must be executed on the target:  
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">echo "COMPOSITE" &gt; /sys/class/davinci_display/ch0/output</span>
+
<pre style="background:#C0FFFF">
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">echo "COMPONENT" &gt; /sys/class/davinci_display/ch0/output</span>
+
echo "COMPOSITE" &gt; /sys/class/davinci_display/ch0/output
 +
echo "COMPONENT" &gt; /sys/class/davinci_display/ch0/output
 +
</pre>
== CMEM pools modification  ==
== CMEM pools modification  ==
Line 89: Line 277:
Depending on the video displayed, the CMEM pools need to be modified to meet the requirements. This is needed when you execute a pipeline and the following error is displayed:  
Depending on the video displayed, the CMEM pools need to be modified to meet the requirements. This is needed when you execute a pipeline and the following error is displayed:  
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">CMEMK Error: Failed to find a pool which fits &lt;poolsize&gt;</span>   
+
<pre style="background:#C0FFFF">
 +
CMEMK Error: Failed to find a pool which fits &lt;poolsize&gt;
 +
</pre>   
First you need the start and end addresses of the CMEM pools, these can be obtained executing ''loadmodules.sh'' and checking the output: a line like the next one will be printed  
First you need the start and end addresses of the CMEM pools, these can be obtained executing ''loadmodules.sh'' and checking the output: a line like the next one will be printed  
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">Loading CMEM from 0x&lt;startaddr&gt; to 0x&lt;endaddr&gt;</span>
+
<pre style="background:#C0FFFF">
 +
Loading CMEM from 0x&lt;startaddr&gt; to 0x&lt;endaddr&gt;
 +
</pre>
then type:  
then type:  
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">rmmod cmemk</span>
+
<pre style="background:#C0FFFF">
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">modprobe cmemk phys_start=&lt;startaddr&gt; phys_end=&lt;endaddr&gt; pools=&lt;somepools&gt;, &lt;mynewpools&gt;</span>
+
rmmod cmemk
 +
modprobe cmemk phys_start=&lt;startaddr&gt; phys_end=&lt;endaddr&gt; pools=&lt;somepools&gt;, &lt;mynewpools&gt;
 +
</pre>
-
where &lt;mynewpools&gt; must be in format: &lt;numberofpools&gt;x&lt;poolsize&gt; (e.g 2x128). You may also need to resize/delete &lt;somepools&gt;  
+
where &lt;mynewpools&gt; must be in format: &lt;numberofpools&gt;x&lt;poolsize&gt; (e.g 2x128). You may also need to resize/delete &lt;somepools&gt;
== Output volume modification  ==
== Output volume modification  ==
Line 106: Line 300:
To increase/decrease the volume for audio playback (or other audio options) type  
To increase/decrease the volume for audio playback (or other audio options) type  
-
<span style="background: none repeat scroll 0% 0% rgb(0, 255, 255);">alsamixer</span>
+
<pre style="background:#C0FFFF">
 +
alsamixer
 +
</pre>
   
   
and modify as desired.
and modify as desired.
 +
 +
== Using GStreamer with the LeopardBoard DM365 EVAL SDK Legacy ==
 +
 +
 +
You can combine the SDK and the LeopardBoard DM365 with the GStreamer's API in order to get powerful multimedia applications in an easy and faster way. Some examples of use of GStreamer to implement basic multimedia pipelines can be found at [[LeopardBoard 365 GStreamer Pipelines - Legacy SDK]].
 +
 +
= SDK common errors =
 +
 +
== Bash is not the default shell ==
 +
 +
Error
 +
 +
<pre>
 +
bash is not your default shell
 +
Please run:
 +
    sudo rm /bin/sh
 +
    sudo ln -s /bin/bash /bin/sh
 +
make: *** [.oscheck] Error 255
 +
</pre>
 +
 +
Solution: Set bash as your default shell. Run the following commands.
 +
 +
<pre style="background:#FFFFC0">
 +
sudo rm /bin/sh
 +
sudo ln -s /bin/bash /bin/sh
 +
</pre>
 +
 +
== Missing packages in host computer ==
 +
 +
If you are running the "make config" command for the first time, you may need to install some packages in order to compile the SDK.
 +
You might receive a message as follows:
 +
 +
<pre>
 +
work@work-laptop:leopard-dm365$ make config
 +
The system is ubuntu-10.04 running in a 32 bit architecture
 +
SYSID: ubuntu-10.04_32
 +
Checking for host packages required by the SDK build system:
 +
    buildsystem (build-essential) is installed
 +
>> libtool (libtool) is NOT installed
 +
    make (make) is installed
 +
>> ncurses (libncurses5-dev) is NOT installed
 +
    texinfo (texinfo) is installed
 +
>> minicom (minicom) is NOT installed
 +
    perl (perl) is installed
 +
    quilt (quilt) is installed
 +
    dc (dc) is installed
 +
    subversion (subversion) is installed
 +
>> curl (curl) is NOT installed
 +
    quilt (quilt) is installed
 +
>> libusb (libusb-dev) is NOT installed
 +
>> perl-expect (libexpect-perl) is NOT installed
 +
>> mono (mono-devel) is NOT installed
 +
There are missing packages, please install them:
 +
apt-get install libtool libncurses5-dev minicom curl libusb-dev libexpect-perl mono-devel
 +
make: *** [.oscheck] Error 1
 +
</pre>
 +
 +
Use the apt-get command to install the missing packages, for example, if you get the following message:
 +
 +
<pre>
 +
>> curl (curl) is NOT installed
 +
</pre>
 +
 +
Then you should install that package as follows:
 +
 +
<pre style="background:#FFFFC0">
 +
sudo apt-get install curl
 +
</pre>
 +
 +
==  arm-linux-gnueabi-gcc: command not found ==
 +
 +
If you have not installed the toolchain yet, you will get the following erros:
 +
 +
<pre>
 +
kernel/bounds.c
 +
/bin/sh: arm-linux-gnueabi-gcc: command not found
 +
make[3]: *** [kernel/bounds.s] Error 127
 +
make[2]: *** [prepare0] Error 2
 +
make[2]: Leaving directory `/home/work/leopard-dm365/kernel/linux-2.6.32'
 +
make[1]: *** [build] Error 2
 +
make[1]: Leaving directory `/home/work/leopard-dm365/kernel'
 +
make: *** [kernel_build] Error 2
 +
</pre>
 +
 +
You need to install the toolchain, follow the instructions [https://www.ridgerun.com/developer/wiki/index.php/DM365_Leopard_SDK_Getting_Started_Guide#GNU_Toolchain_Installation Install here].
 +
 +
== Unable to find the dvsdk ==
 +
 +
Error:
 +
 +
<pre>
 +
        echo "Unable to find the file $DVSDK_DIR/Rules.make. Aborting" ; exit 1 ; \
 +
    fi \
 +
fi
 +
 +
You need to install dvsdk_3_10_00_19 provided by Texas Instruments
 +
You can abort now and install the dvsdk_3_10_00_19 binary package on the default path
 +
at /home/work/dvsdk/dvsdk_3_10_00_19, so it will be automatically detected next time you try to build.
 +
Otherwise you can enter the location where you installed the package below.
 +
 +
Please provide the path to dvsdk_3_10_00_19 installation location or press ctrl-c to abort
 +
</pre>
 +
 +
You need to [http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_10/latest/index_FDS.html download] and install the dvsdk in your home directory.
 +
 +
== Autotools and automake not found ==
 +
 +
Error:
 +
 +
<pre>
 +
  checking for automake-1.6 >= 1.7 ... not found.
 +
  checking for automake-1.5 >= 1.7 ... not found.
 +
  .
 +
  .
 +
  .
 +
  checking for autoconf-2.53 >= 2.52 ... not found.
 +
  checking for autoconf-2.52 >= 2.52 ... not found.
 +
</pre>
 +
 +
You need to install the package autoconf by running the following command:
 +
 +
<pre style="background:#FFFFC0">
 +
sudo apt-get install autoconf2.59
 +
</pre>
 +
 +
 +
[[Category:DM36x]]
 +
[[Category:LeopardBoard]]

Revision as of 19:52, 4 July 2011

This guide includes instructions and tips users should follow to get their DM365 Leopard Board to work with the RR Evaluation SDK. For this guide different commands need to be executed on the host machine and the target. Commands to be run on the Ubuntu host have a yellow background. Commands to be run on the Ubuntu target have an aqua background.

Contents

Installation

The e-mail received with the evaluation SDK installation links should have:

GNU Toolchain Installation

The LeopardBoard 365 Evaluation SDK uses the GNU toolchain for cross compilation. You need to download and install the toolchain before you can build the SDK.

Toolchain Download

The email you received when you requested the LeopardBoard 365 Evaluation SDK contained a link to the toolchain tarball, along with the user name and password to access the files available for download.

firefox http://support.ridgerun.com/leoparddm365sdk/downloads

I saved the toolchain to the default $HOME/Downloads directory.

Install Toolchain

Assuming the toolchain tarball is in the $HOME/Downloads directory, you can follow these steps to install the toolchain into the location expected by the SDK.

sudo tar -C / -xjf $HOME/Downloads/toolchain.tar.bz2 

Verify your GNU toolchain is installed properly.

ls /opt/arm-linux-gnueabi/bin

and you should see around 35 tools in the directory.

Install other required packages

Usually the SDK will ask you to install any missing package it requires that is not installed on your host machine. You can install them using the following command:

sudo apt-get install package_name

The following is the list of the required packages by the SDK:


Checkout SDK

With this SVN repository Linux from the email, check out a development directory from the repository:

mkdir -p ~/work
cd ~/work
svn co <repositoryLink> leo365

I put all my development directories in the work directory in my home folder. You can have more than one development directory installed, just remember to have the DEVDIR shell variable set properly.

Build SDK

Several packages are needed in order to compile the SDK. The SDK build process will let you know what packages are needed. While compiling you will be prompted to install them using sudo apt-get <packages>.

Configure the features you want to have in your board using:

make config

Set the PATH to include the toolchain and aslo set the DEVDIR shell variable

$(make env) # this is the same as using grave accents to execute the output from the command - `make env`

Compile the SDK:

make

Install bootloader, kernel, and target file system on LeopardBoard 365

Verify bootloader is active

First a minicom (or any other terminal emulator used) session must be opened in order to stop the booting process at the bootloader prompt:

minicom

Reboot the board and stop the autoboot when

Hit any key to stop autoboot: ...

is displayed. Then close your minicom session.

Save bootloader to target hardware

The next step is to install the bootloader on the target. Typically you only install the SDK bootloader once.

make installbootloader

Update target hardware with new images

Power cycle your target hardware, and install uboot environment / kernel / FS on the target (per your SDK configuration choices):

make install

Similar to the bootloader installation, to install the devdir on the target the booting process should be stopped at the bootloader prompt.

Updating your SDK

Since the SDK is in a SVN respository RidgeRun can periodically make updates to the contents. To have an up-to-date SDK the following command must be executed on the SDK root directory

make update

If, for any reason, modifications to any files that are included in a patch were made, the make update process won't be able to finish successfully. In order to override this the following command must be executed

make update FORCE_UP=1

Note that all changes previously made to these files will be lost.

Also, a debug functionality is implemented where all the executed commands will be displayed on the standard error (usually the same as standard output). To activate it use

make update DEBUG_UP=1

Of course, a combination of both options can be used

make update FORCE_UP=1 DEBUG_UP=1

A brief help menu explaining these features can be displayed using

make help

NOTE: In the latest 2XXXQX versions of the SDK you will be able to find a new target called make show_updates, this target shows all the current available updates for your SDK with a detailed description of each one.

SDK Hints

SD boot recover

If you brick your board, this can be recovered from an SD card. In order to make a bootable SD card you first need to have a successfully compiled SDK.

SD card preparation

1. Insert the SD card to the host port

2. Find out the device mounting point (e.g. /dev/sdd)

3. On your devdir root directory type:

make sd_boot_recover device=/dev/sdX

where sdX is your device mounting point.

Install Boot recovery files on SD card

1. Remove SD card from host and reinsert the SD card into host. This will cause your host to mount the VFAT file system on the SD card.

2. Type

make install sd_boot_recover

Boot from SD to recover NAND image

1. Set switch 2 of DIPSW1 to ON, 1 and 3 to OFF. This is SD card boot mode.

2. Power up the board, it will automatically erase the NAND flash, and burn UBL, u-boot, kernel and file system. The SD card recovery LeopardBoard 365 serial output will provide progress information.


Verify NAND recovery

1. Set all pos of DIPSW1 to OFF for NAND boot mode.

2. Connect serial cable to PC and power cycle the board (it should boot up). Insert the SD card to the board.

Your LeopardBoard 365 now contains the UBL, uboot, kernel, and file system that was originally shipped on LeopardBoard 365 boards.

Having this done the bootloader and devdir must be installed (check Installation for instructions).

Setting up video components

The output and mode used for video playback/capture can be set during the SDK configuration process. The first step is to enter the configuration script:

make config

Inside Architecture configurations select the options you desire on Video Output and Video Default Resolution.

Finally compile your changes and install

make
make install

When you use the SDK to set your video output and resolution, the SDK build process creates $DEVDIR/images/cmdline with different kernel command line parameter settings. The table below shows the various video output settings for three of the common settings

Video Output DVI Component Composite sysfs file
Resolution 720P-60 720P-60 NTSC
davinci_enc_mngr.ch0_output DVI COMPOSITE COMPONENT /sys/class/davinci_display/ch0/output
davinci_enc_mngr.ch0_mode 720P-60 720P-60 NTSC /sys/class/davinci_display/ch0/mode
davinci_display.cont2_bufsize 6291456 6291456 3145728
vpfe_capture.cont_bufoffset 6291456 6291456 3145728
vpfe_capture.cont_bufsize 6291456 6291456 6291456

Activation of video capture modules

While configuring the SDK go to Kernel configuration->Device drivers->Multimedia support->Video capture adapters and activate the devices you desire.

LeopardBoard 365 GStreamer Pipelines contains instructions showing examples to demonstrate the hardware is working.

Video initialization

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

loadmodules.sh
fbset -disable

Component output initialization

There's a known bug with the component output initialization. Before you play or capture video using the component output this commands must be executed on the target:

echo "COMPOSITE" > /sys/class/davinci_display/ch0/output
echo "COMPONENT" > /sys/class/davinci_display/ch0/output

CMEM pools modification

Depending on the video displayed, the CMEM pools need to be modified to meet the requirements. This is needed when you execute a pipeline and the following error is displayed:

CMEMK Error: Failed to find a pool which fits <poolsize>

First you need the start and end addresses of the CMEM pools, these can be obtained executing loadmodules.sh and checking the output: a line like the next one will be printed

Loading CMEM from 0x<startaddr> to 0x<endaddr>

then type:

rmmod cmemk
modprobe cmemk phys_start=<startaddr> phys_end=<endaddr> pools=<somepools>, <mynewpools>

where <mynewpools> must be in format: <numberofpools>x<poolsize> (e.g 2x128). You may also need to resize/delete <somepools>

Output volume modification

To increase/decrease the volume for audio playback (or other audio options) type

alsamixer

and modify as desired.

Using GStreamer with the LeopardBoard DM365 EVAL SDK Legacy

You can combine the SDK and the LeopardBoard DM365 with the GStreamer's API in order to get powerful multimedia applications in an easy and faster way. Some examples of use of GStreamer to implement basic multimedia pipelines can be found at LeopardBoard 365 GStreamer Pipelines - Legacy SDK.

SDK common errors

Bash is not the default shell

Error

bash is not your default shell 
Please run: 
    sudo rm /bin/sh 
    sudo ln -s /bin/bash /bin/sh 
make: *** [.oscheck] Error 255 

Solution: Set bash as your default shell. Run the following commands.

sudo rm /bin/sh 
sudo ln -s /bin/bash /bin/sh 

Missing packages in host computer

If you are running the "make config" command for the first time, you may need to install some packages in order to compile the SDK. You might receive a message as follows:

work@work-laptop:leopard-dm365$ make config 
The system is ubuntu-10.04 running in a 32 bit architecture 
SYSID: ubuntu-10.04_32 
Checking for host packages required by the SDK build system: 
    buildsystem (build-essential) is installed 
 >> libtool (libtool) is NOT installed 
    make (make) is installed 
 >> ncurses (libncurses5-dev) is NOT installed 
    texinfo (texinfo) is installed 
 >> minicom (minicom) is NOT installed 
    perl (perl) is installed 
    quilt (quilt) is installed 
    dc (dc) is installed 
    subversion (subversion) is installed 
 >> curl (curl) is NOT installed 
    quilt (quilt) is installed 
 >> libusb (libusb-dev) is NOT installed 
 >> perl-expect (libexpect-perl) is NOT installed 
 >> mono (mono-devel) is NOT installed 
There are missing packages, please install them: 
 apt-get install libtool libncurses5-dev minicom curl libusb-dev libexpect-perl mono-devel 
make: *** [.oscheck] Error 1 

Use the apt-get command to install the missing packages, for example, if you get the following message:

 >> curl (curl) is NOT installed 

Then you should install that package as follows:

sudo apt-get install curl

arm-linux-gnueabi-gcc: command not found

If you have not installed the toolchain yet, you will get the following erros:

kernel/bounds.c 
/bin/sh: arm-linux-gnueabi-gcc: command not found 
make[3]: *** [kernel/bounds.s] Error 127 
make[2]: *** [prepare0] Error 2 
make[2]: Leaving directory `/home/work/leopard-dm365/kernel/linux-2.6.32' 
make[1]: *** [build] Error 2 
make[1]: Leaving directory `/home/work/leopard-dm365/kernel' 
make: *** [kernel_build] Error 2 

You need to install the toolchain, follow the instructions Install here.

Unable to find the dvsdk

Error:

	        echo "Unable to find the file $DVSDK_DIR/Rules.make. Aborting" ; exit 1 ; \ 
	    fi \ 
	fi 

You need to install dvsdk_3_10_00_19 provided by Texas Instruments 
You can abort now and install the dvsdk_3_10_00_19 binary package on the default path 
at /home/work/dvsdk/dvsdk_3_10_00_19, so it will be automatically detected next time you try to build. 
Otherwise you can enter the location where you installed the package below. 

Please provide the path to dvsdk_3_10_00_19 installation location or press ctrl-c to abort 

You need to download and install the dvsdk in your home directory.

Autotools and automake not found

Error:

  checking for automake-1.6 >= 1.7 ... not found. 
  checking for automake-1.5 >= 1.7 ... not found. 
  .
  .
  .
  checking for autoconf-2.53 >= 2.52 ... not found. 
  checking for autoconf-2.52 >= 2.52 ... not found. 

You need to install the package autoconf by running the following command:

sudo apt-get install autoconf2.59 
Navigation
Toolbox