DM365 Leopard SDK Legacy Getting Started Guide

From RidgeRun Developer Connection

(Difference between revisions)
Jump to:navigation, search
m
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.
== GNU Toolchain Installation ==
== GNU Toolchain Installation ==
Line 10: Line 10:
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.
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:#FFFF00">
+
<pre style="background:#FFFFC0">
firefox http://support.ridgerun.com/leoparddm365sdk/downloads
firefox http://support.ridgerun.com/leoparddm365sdk/downloads
</pre>
</pre>
Line 20: Line 20:
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.
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:#FFFF00">
+
<pre style="background:#FFFFC0">
sudo tar -C / -xjf $HOME/Downloads/toolchain.tar.bz2  
sudo tar -C / -xjf $HOME/Downloads/toolchain.tar.bz2  
</pre>
</pre>
Line 26: Line 26:
Verify your GNU toolchain is installed properly.
Verify your GNU toolchain is installed properly.
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
ls /opt/arm-linux-gnueabi/bin
ls /opt/arm-linux-gnueabi/bin
</pre>
</pre>
Line 48: Line 48:
Configure the features you want to have in your board using:  
Configure the features you want to have in your board using:  
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make config
make config
</pre>
</pre>
Line 54: Line 54:
Compile the SDK:  
Compile the SDK:  
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make
make
</pre>
</pre>
Line 61: Line 61:
the booting process at the bootloader prompt:  
the booting process at the bootloader prompt:  
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
minicom
minicom
</pre>
</pre>
Line 68: Line 68:
  Hit any key to stop autoboot: ...
  Hit any key to stop autoboot: ...
is displayed. Then close your minicom session.
is displayed. Then close your minicom session.
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make installbootloader
make installbootloader
</pre>
</pre>
Line 74: Line 74:
Power cycle your target hardware, and install uboot environment / kernel / FS on the target (per your SDK configuration choices):  
Power cycle your target hardware, and install uboot environment / kernel / FS on the target (per your SDK configuration choices):  
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make install
make install
</pre>
</pre>
Line 92: Line 92:
3. On your devdir root directory type:  
3. On your devdir root directory type:  
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make sd_boot_recover device=/dev/sdX
make sd_boot_recover device=/dev/sdX
</pre>
</pre>
Line 104: Line 104:
2. Type
2. Type
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make install sd_boot_recover
make install sd_boot_recover
</pre>  
</pre>  
Line 122: Line 122:
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:  
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make config
make config
</pre>
</pre>
Line 130: Line 130:
Finally compile your changes and install
Finally compile your changes and install
-
<pre style="background:#FFFF00">
+
<pre style="background:#FFFFC0">
make
make
make install
make install
Line 167: Line 167:
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:  
-
<pre style="background:#00FFFF">
+
<pre style="background:#C0FFFF">
loadmodules.sh
loadmodules.sh
fbset -disable
fbset -disable
Line 176: Line 176:
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:  
-
<pre style="background:#00FFFF">
+
<pre style="background:#C0FFFF">
echo "COMPOSITE" &gt; /sys/class/davinci_display/ch0/output
echo "COMPOSITE" &gt; /sys/class/davinci_display/ch0/output
echo "COMPONENT" &gt; /sys/class/davinci_display/ch0/output
echo "COMPONENT" &gt; /sys/class/davinci_display/ch0/output
Line 185: Line 185:
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:  
-
<pre style="background:#00FFFF">
+
<pre style="background:#C0FFFF">
CMEMK Error: Failed to find a pool which fits &lt;poolsize&gt;
CMEMK Error: Failed to find a pool which fits &lt;poolsize&gt;
</pre>   
</pre>   
Line 191: Line 191:
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  
-
<pre style="background:#00FFFF">
+
<pre style="background:#C0FFFF">
Loading CMEM from 0x&lt;startaddr&gt; to 0x&lt;endaddr&gt;
Loading CMEM from 0x&lt;startaddr&gt; to 0x&lt;endaddr&gt;
</pre>
</pre>
Line 197: Line 197:
then type:  
then type:  
-
<pre style="background:#00FFFF">
+
<pre style="background:#C0FFFF">
rmmod cmemk
rmmod cmemk
modprobe cmemk phys_start=&lt;startaddr&gt; phys_end=&lt;endaddr&gt; pools=&lt;somepools&gt;, &lt;mynewpools&gt;
modprobe cmemk phys_start=&lt;startaddr&gt; phys_end=&lt;endaddr&gt; pools=&lt;somepools&gt;, &lt;mynewpools&gt;
Line 208: Line 208:
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  
-
<pre style="background:#00FFFF">
+
<pre style="background:#C0FFFF">
alsamixer
alsamixer
</pre>
</pre>
   
   
and modify as desired.
and modify as desired.

Revision as of 14:56, 13 October 2010

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

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.

Toolchain Installation

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.


SDK Installation

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

With this links available, the first step is to checkout the repository:

svn co <repositoryLink>

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.

Several packages are needed in order to compile the SDK. 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

Compile the SDK:

make

The next step is to install the bootloader 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:

minicom

Reboot the board and stop the autoboot when

Hit any key to stop autoboot: ...

is displayed. Then close your minicom session.

make installbootloader

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.

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.

1. Insert the SDcard to the host port

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

3. On your devdir root directory type:

make sd_boot_recover device=/dev/sdX

where sdX is your device mounting point.

1. Insert the SD card (if you already inserted it, disconnect and connect again).

2. Type

make install sd_boot_recover

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

4. Power up the board, it will automatically erase the NAND flash, and burn UBL, u-boot, kernel and filesystem

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

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

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
Resolution 720P-60 720P-60 NTSC
davinci_enc_mngr.ch0_output DVI COMPOSITE COMPONENT
davinci_enc_mngr.ch0_mode 720P-60 720P-60 NTSC
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.

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.

Navigation
Toolbox