Difference between revisions of "CM-T3730: Linux: Angstrom"

From Compulab Mediawiki
Jump to: navigation, search
(See also)
(Introduction)
Line 1: Line 1:
== Introduction ==
+
= Introduction =
 
+
The example run-time Linux filesystem image for CM-T3730 is based on Angstrom Linux 2012. The [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres CompuLab Linux package for CM-T3730] includes ready to run Angstrom Linux filesystem image, Linux kernel and source code patches.
The example run-time Linux filesystem image for CM-T3730 is based on Angstrom Linux 2012. The [http://compulab.co.il/products/computer-on-modules/cm-t3730/ CompuLab Linux package for CM-T3730] includes ready to run Angstrom Linux filesystem image, Linux kernel and source code patches.
 
  
 
The default Angstrom Linux image includes more than 1000 software packages. Among them:
 
The default Angstrom Linux image includes more than 1000 software packages. Among them:
Line 8: Line 7:
 
* Enlightenment v0.16 desktop manager
 
* Enlightenment v0.16 desktop manager
 
* Firefox and Midory web browsers
 
* Firefox and Midory web browsers
* MPlayer and omapfbplay media players
+
* Totem, MPlayer and omapfbplay media players
 
* GStreamer with multiple plugins
 
* GStreamer with multiple plugins
 +
* The Graphics SDK version 4.05.00.03 including the Linux graphics (SGX) drivers and ready to run SGX functionality demos
 +
* The Digital Video SDK (DVSDK) version 4.03.00.06 including Linux kernel modules, multimedia and DSP packages and ready to run DSP functionality demos
  
 
The [[CM-T3730: Linux: Getting started|Getting started with Linux on CM-T3730]] page provides a brief introduction on how to install the run-time Linux image. This article describes package structure and peripheral device options specific to the CM-T3730.
 
The [[CM-T3730: Linux: Getting started|Getting started with Linux on CM-T3730]] page provides a brief introduction on how to install the run-time Linux image. This article describes package structure and peripheral device options specific to the CM-T3730.
  
== Package contents ==
+
= Package contents =
  
=== version.txt ===
+
== version.txt ==
 
The contents of the {{filename|version.txt}} identifies the package version.
 
The contents of the {{filename|version.txt}} identifies the package version.
  
=== images ===
+
== images ==
 
* {{filename|uImage-cm-t3730.bin}} - ready to run Linux kernel image binary for CM-T3730
 
* {{filename|uImage-cm-t3730.bin}} - ready to run Linux kernel image binary for CM-T3730
 
* {{filename|Angstrom-image-cm-t3730.tar.bz2}} - archive of Angstrom root file system
 
* {{filename|Angstrom-image-cm-t3730.tar.bz2}} - archive of Angstrom root file system
 
* {{filename|bootscr.img}} - U-Boot script used for booting kernel from MMC/SD card with root file system on MMC/SD card
 
* {{filename|bootscr.img}} - U-Boot script used for booting kernel from MMC/SD card with root file system on MMC/SD card
  
=== kernel ===
+
== kernel ==
* {{filename|uImage-3.0.32-cm-t3730-2.bin}} - ready to run Linux kernel 3.0.32-cm-t3730-2 for CM-T3730
+
* {{filename|uImage-3.0.38-cm-t3730-3.bin}} - ready to run Linux kernel 3.0.38-cm-t3730-3 for CM-T3730
* {{filename|linux-3.0.32-cm-t3730-2.defconfig}} - Linux kernel 3.0.32-cm-t3730-2 configuration file
+
* {{filename|linux-3.0.38-cm-t3730-3.config}} - Linux kernel 3.0.38-cm-t3730-3 configuration file
* {{filename|linux-3.0.32-cm-t3730-2.patch}} - patch vs. [http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=091ce3d38e5e57cf7dd44d66335725910e928f59 Linux stable kernel 3.0.32] with support for CM-T3730 peripherals
+
* {{filename|linux-3.0.38-cm-t3730-3.patch}} - patch vs. [http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=ce05b1d31e57b7de6b814073e88bdd403ce71229 Linux stable kernel 3.0.38] with support for CM-T3730 peripherals
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|linux-3.0.32-cm-t3730-2.patch}})
+
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|linux-3.0.38-cm-t3730-3.patch}})
  
=== oe ===
+
== oe ==
 
The {{filename|oe}} directory contains configuration files and CM-T3730 specific package definition for OpenEmbedded.
 
The {{filename|oe}} directory contains configuration files and CM-T3730 specific package definition for OpenEmbedded.
 
* {{filename|base-revision}} - the OpenEmbedded commit id that was used to create the Angstrom root file system image.
 
* {{filename|base-revision}} - the OpenEmbedded commit id that was used to create the Angstrom root file system image.
 
* {{filename|local.conf}} - configuration file used to build Angstrom Linux image for CM-T3730. This file should be placed in ${OEBASE}/build/conf directory.
 
* {{filename|local.conf}} - configuration file used to build Angstrom Linux image for CM-T3730. This file should be placed in ${OEBASE}/build/conf directory.
* {{filename|patches}} - collection of patches that were applied on top of the commit id in {{filename|base-revision}}.
+
* {{filename|openembedded-cm-t3730-3.patch}} - patch vs. OE commit id specified in the {{filename|base-revision}} to support CM-T3730
 +
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|openembedded-cm-t3730-3.patch}})
 +
* {{filename|extra}} - directory contains miscellaneous files and examples
 +
** {{filename|oe_sample_appl.zip}} - archive of a sample Bitbake recipe that allows building a basic "Hello world" application
  
=== utilities ===
+
== utilities ==
 
The {{filename|utilities}} directory contains miscellaneous utilities useful for development
 
The {{filename|utilities}} directory contains miscellaneous utilities useful for development
 
* {{filename|tftpd32.zip}} - TFTP server for Windows users
 
* {{filename|tftpd32.zip}} - TFTP server for Windows users
Line 41: Line 45:
 
* {{filename|bootscr.src}} - U-Boot script used for booting kernel from MMC/SD card with root file system on MMC/SD card
 
* {{filename|bootscr.src}} - U-Boot script used for booting kernel from MMC/SD card with root file system on MMC/SD card
  
=== extra ===
+
== extra ==
The {{filename|extra}} directory contains graphics (SGX) related files inside the {{filename|Graphics_SDK_4_05_00_03}} directory
+
The {{filename|extra}} directory contains files that are not directly connected to the Linux kernel or the OE framework
* {{filename|gfxsdkdemos.tar.bz2}} - archive of ready to run SGX functionality demonstrations
+
* {{filename|dvsdk_04_03_00_06}} - directory contains DSP related files
* {{filename|patches}} - collection of patches that fix the Graphics SDK v4.05.00.03 compile time errors
+
** {{filename|dvsdk_04_03_00_06-cm-t3730-3.patch}} - patch that provides support for mainline Linux kernel and CM-T3730 device with the DVSDK
 +
** {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|dvsdk_04_03_00_06-cm-t3730-3.patch}})
 +
* {{filename|Graphics_SDK_4_05_00_03}} - directory contains graphics (SGX) related files
 +
** {{filename|graphics_sdk_04_05_00_03-cm-t3730-3.patch}} - patch that fixes the Graphics SDK v4.05.00.03 compile time errors
 +
** {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|graphics_sdk_04_05_00_03-cm-t3730-3.patch}})
  
== Using Angstrom Linux on CM-T3730 ==
+
= Using Angstrom Linux on CM-T3730 =
=== Display options ===
+
 
 +
== Display options ==
 
CM-T3730 evaluation platform has four video output interfaces: LCD, DVI, LVDS and TV-out. Default configuration of Angstrom Linux for CM-T3730 uses DVI as primary video output. It is possible to switch between the DVI and LCD interfaces on the fly. TV-out can be used simultaneously with LCD or DVI interface.<br>
 
CM-T3730 evaluation platform has four video output interfaces: LCD, DVI, LVDS and TV-out. Default configuration of Angstrom Linux for CM-T3730 uses DVI as primary video output. It is possible to switch between the DVI and LCD interfaces on the fly. TV-out can be used simultaneously with LCD or DVI interface.<br>
 
Linux implementation of the OMAP3 display subsystem is described in detail in {{filename|[http://gitorious.org/linux-omap-dss2/linux/blobs/master/Documentation/arm/OMAP/DSS Documentation/arm/OMAP/DSS]}} file in the Linux kernel source tree.  
 
Linux implementation of the OMAP3 display subsystem is described in detail in {{filename|[http://gitorious.org/linux-omap-dss2/linux/blobs/master/Documentation/arm/OMAP/DSS Documentation/arm/OMAP/DSS]}} file in the Linux kernel source tree.  
  
==== Display resolutions ====
+
=== Display resolutions ===
 
* The Toppoly LCD supplied with CM-T3730 evaluation kit supports 480x640 resolution with 18 bits per color
 
* The Toppoly LCD supplied with CM-T3730 evaluation kit supports 480x640 resolution with 18 bits per color
 
* DVI output can be configured for standard resolutions using kernel command line parameter {{parameter|omapfb.mode}}:
 
* DVI output can be configured for standard resolutions using kernel command line parameter {{parameter|omapfb.mode}}:
Line 59: Line 68:
 
* TV-out supports PAL and NTSC standards
 
* TV-out supports PAL and NTSC standards
  
==== Examples ====
+
=== Examples ===
===== Switch from LCD to DVI =====
+
 
 +
==== Switch from LCD to DVI ====
 
<pre>
 
<pre>
 
mgr0=/sys/devices/platform/omapdss/manager0
 
mgr0=/sys/devices/platform/omapdss/manager0
Line 78: Line 88:
 
</pre>
 
</pre>
  
===== Clone GFX overlay to LCD and TV =====
+
==== Clone GFX overlay to LCD and TV ====
 
<pre>
 
<pre>
 
ovl0=/sys/devices/platform/omapdss/overlay0
 
ovl0=/sys/devices/platform/omapdss/overlay0
Line 104: Line 114:
 
</pre>
 
</pre>
  
===== Switch TV-out from PAL to NTSC =====
+
==== Switch TV-out from PAL to NTSC ====
 
<pre>
 
<pre>
 
tv=/sys/devices/platform/omapdss/display2
 
tv=/sys/devices/platform/omapdss/display2
Line 112: Line 122:
 
</pre>
 
</pre>
  
=== GPIO access ===
+
== GPIO access ==
 
Linux provides simple and convenient GPIO access via {{filename|sysfs}} interface. A GPIO should be exported using {{filename|/sys/class/gpio/export}}. After the GPIO is exported it is possible to change its direction and value using {{filename|/sys/class/gpio/gpioX/direction}} and {{filename|/sys/class/gpio/gpioX/value}} attributes.
 
Linux provides simple and convenient GPIO access via {{filename|sysfs}} interface. A GPIO should be exported using {{filename|/sys/class/gpio/export}}. After the GPIO is exported it is possible to change its direction and value using {{filename|/sys/class/gpio/gpioX/direction}} and {{filename|/sys/class/gpio/gpioX/value}} attributes.
  
==== Example ====
+
=== Example ===
 
The following example demonstrates how to configure GPIO 140 as output and produce a 1usec pulse:
 
The following example demonstrates how to configure GPIO 140 as output and produce a 1usec pulse:
 
 
<pre>
 
<pre>
 
echo 140 > /sys/class/gpio/export
 
echo 140 > /sys/class/gpio/export
Line 127: Line 136:
 
</pre>
 
</pre>
  
=== Angstrom Linux package management ===
+
== Angstrom Linux package management ==
 
Angstrom Linux for CM-T3730 includes {{cmd|opkg}} package manager. It can be run from terminal command line.
 
Angstrom Linux for CM-T3730 includes {{cmd|opkg}} package manager. It can be run from terminal command line.
  
== See also ==
+
== Digital Video SDK ==
 +
=== Overview ===
 +
The Digital Video SDK (DVSDK) version 4.03.00.06 provides multiple resourses for evaluation and application development for the TI DM3730 platform. Current CM-T3730 Linux package contains the following pre-built DVSDK components:
 +
Multimedia Package, DSP Package, and several demo applications for functionality demonstration and validation.
 +
 
 +
Multimedia Package includes:
 +
* Multimedia Framework Product (MFP)
 +
** Codec Engine Framework
 +
** Framework Components
 +
** Linux Utils (CMEM)
 +
** XDAIS (eXpress DSP Algorithm Interoperability Standard)
 +
* Davinci Multimedia Application Interface (DMAI)
 +
* DSP Optimized codecs
 +
** Encoders: H.264, MPEG-4, JPEG, G711
 +
** Decoders: H.264, MPEG-4, MPEG-2, AAC. JPEG, G711
 +
* DSP accelerated Gstreamer TI plugin
 +
 
 +
DSP Package includes:
 +
* C6000 code generation tool chain
 +
* DSP/BIOS Real Time Operating System
 +
* DSPLink Inter Processor Communication
 +
* C6Accel - easy access to DSP accelerated function libraries
 +
* C6Run - tool to easily run C code on the DSP
 +
 
 +
The DVSDK was built outside of OpenEmbedded framework and intensively tested with Linux kernel version 3.0.38.
 +
For custom Linux kernel build, the DVSDK must be re-built to avoid compatibility issues.
 +
This section describes how to configure Linux kernel at boot time and run DVSDK demos.
 +
For detailed DVSDK build instruction please refer to the [[CM-T3730:_Linux:_Building_images#Digital_Video_SDK|CM-T3730: Linux: Building images]] page.
 +
 
 +
=== Kernel parameters ===
 +
The framebuffer plains 1 and 2 must be enabled in the kernel command line for the GStreamer-TI package will work correctly:
 +
<pre>
 +
vram=18M omapfb.vram=0:6M,1:6M,2:6M
 +
</pre>
 +
Additionally, DSP kernel modules require a memory "window" in the kernel memory to allocate a heap buffer of 73MB at 0x83700000.
 +
This memory must not be used by any other module or process, so the following parameters must be added to the kernel command line:
 +
<pre>
 +
mem=55M@0x80000000 mem=128M@0x88000000
 +
</pre>
 +
{{Note|We do not recommend using DVSDK on CM-T3730 devices with less then 256MB of RAM.}}
 +
 
 +
=== Running Demos ===
 +
Current CM-T3730 Linux package contains pre-built and ready to run DVSDK functionality demo programs.
 +
For additional information about the DVSDK demos please refer to the
 +
[http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/latest/exports/TMS320DM3730_Software_Developers_Guide.pdf DVSDK Software Developers Guide].
 +
 
 +
==== DSPLink Examples ====
 +
The DSPLink includes several sample application examples. Use the following example to run the demo applications on CM-T3730:
 +
<pre>
 +
root@cm-t3730:~# cd /usr/share/ti/ti-dsplink-examples/
 +
root@cm-t3730:/usr/share/ti/ti-dsplink-examples# ./ti-dsplink-examples-run.sh
 +
</pre>
 +
 
 +
==== C6Accel Apps ====
 +
The C6Accel package includes a small test application for benchmarking all the DSP kernel APIs for fixed point and floating point calculations.
 +
To run the application, run the following commands on CM-T3730:
 +
<pre>
 +
root@cm-t3730:~# cd /usr/share/ti/c6accel-apps/
 +
root@cm-t3730:~# ./c6accel_app
 +
</pre>
 +
 
 +
==== DMAI Apps ====
 +
The Davinci Multimedia Application Interface (DMAI) includes small sample applications (and also source code).
 +
To run a DMAI sample application, make sure the current directory on CM-T3730 is {{filename|ti-dmai-apps}}:
 +
<pre>
 +
root@cm-t3730:~# cd /usr/share/ti/ti-dmai-apps/
 +
</pre>
 +
 
 +
===== Decode Examples =====
 +
To decode an H.264 BP encoded video to a YUV file execute:
 +
<pre>
 +
root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./video_decode_io2_dm3730.x470MV -c h264dec \
 +
-i /usr/share/ti/data/videos/davincieffect_480p30.264 -o h264_test_output.yuv
 +
</pre>
 +
To decode a JPEG encoded image to a YUV file execute:
 +
<pre>
 +
root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./image_decode_io1_dm3730.x470MV -c jpegdec \
 +
-i /usr/share/ti/data/images/remi003_422i.jpg -o jpeg_test_output.yuv
 +
</pre>
 +
To decode an AAC encoded audio:
 +
<pre>
 +
root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./audio_decode_io1_dm3730.x470MV -c aachedec \
 +
-i /usr/share/ti/data/sounds/davincieffect_lc.aac -o aac_test_output.pcm
 +
</pre>
 +
 
 +
===== Encode Examples =====
 +
To encode 100 frames of resolution 720x480 from a YUV file to an H.264 BP encoded file execute:
 +
<pre>
 +
root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./video_encode_io1_dm3730.x470MV -c h264enc \
 +
-i h264_test_output.yuv -o output.264 -r 720x480 -n 100
 +
</pre>
 +
To encode a YUV file to a JPEG encoded file execute:
 +
<pre>
 +
root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./image_encode_io1_dm3730.x470MV -c jpegenc -e encode \
 +
-i jpeg_test_output.yuv -o Output.jpeg -r 720x576 --iColorSpace 3 --oColorSpace 1
 +
</pre>
 +
 
 +
== Graphics SDK ==
 +
The CM-T3730 Linux package contains pre-built and ready to run SGX functionality demo programs.
 +
The SGX configuration script must be run on CM-T3730 before first use:
 +
<pre>
 +
root@cm-t3730:~# /etc/init.d/omap-demo
 +
</pre>
 +
 
 +
=== Running Graphics SDK OpenGL ES1.x Demos ===
 +
To run OpenGL ES1.x demos, perform the following:
 +
<pre>
 +
root@cm-t3730:~# cd /opt/gfxsdkdemos/ogles
 +
root@cm-t3730:/opt/gfxsdkdemos/ogles# ./OGLESSkybox
 +
</pre>
 +
This will execute the {{filename|OGLESSkybox}} demo. Press {{parameter|‘q’}} on the CM-T3730 console to stop the demo execution.
 +
Similarly, any other OpenGL ES1.x demo can be executed.
 +
 
 +
For more information and command line options of the OpenGL ES1.x demos, please refer to the SDK user guide: {{filename|Graphics_SDK_4_05_00_03/GFX_Linux_SDK/OGLES/SDKPackage/OpenGL ES SDK.User Guide.1.20f.External.pdf}}.
 +
 
 +
=== Running Graphics SDK OpenGL ES2.0 Demos ===
 +
To run OpenGL ES2.x demos, perform the following:
 +
<pre>
 +
root@cm-t3730:~# cd /opt/gfxsdkdemos/ogles2
 +
root@cm-t3730:/opt/gfxsdkdemos/ogle2s# ./OGLES2Coverflow
 +
</pre>
 +
This will execute the {{filename|OGLES2Coverflow}} demo. Press {{parameter|‘q’}} on the CM-T3730 console to stop the demo execution.
 +
Similarly, any other OpenGL ES2.0 demo can be executed.
 +
 
 +
For more information and command line options on the OpenGL ES2.0 demos, please refer to the SDK user guide: {{filename|Graphics_SDK_4_05_00_03/GFX_Linux_SDK/OGLES2/SDKPackage/OpenGL ES 2.x SDK.User Guide.1.20f.External.pdf}}.
 +
 
 +
= See also =
 
* [[CM-T3730: Linux: Getting started]]
 
* [[CM-T3730: Linux: Getting started]]
 
* [[CM-T3730: Linux: Kernel]]
 
* [[CM-T3730: Linux: Kernel]]

Revision as of 09:05, 16 August 2012

Introduction

The example run-time Linux filesystem image for CM-T3730 is based on Angstrom Linux 2012. The CompuLab Linux package for CM-T3730 includes ready to run Angstrom Linux filesystem image, Linux kernel and source code patches.

The default Angstrom Linux image includes more than 1000 software packages. Among them:

  • Core system
  • X11 Windowing System
  • Enlightenment v0.16 desktop manager
  • Firefox and Midory web browsers
  • Totem, MPlayer and omapfbplay media players
  • GStreamer with multiple plugins
  • The Graphics SDK version 4.05.00.03 including the Linux graphics (SGX) drivers and ready to run SGX functionality demos
  • The Digital Video SDK (DVSDK) version 4.03.00.06 including Linux kernel modules, multimedia and DSP packages and ready to run DSP functionality demos

The Getting started with Linux on CM-T3730 page provides a brief introduction on how to install the run-time Linux image. This article describes package structure and peripheral device options specific to the CM-T3730.

Package contents

version.txt

The contents of the version.txt identifies the package version.

images

  • uImage-cm-t3730.bin - ready to run Linux kernel image binary for CM-T3730
  • Angstrom-image-cm-t3730.tar.bz2 - archive of Angstrom root file system
  • bootscr.img - U-Boot script used for booting kernel from MMC/SD card with root file system on MMC/SD card

kernel

  • uImage-3.0.38-cm-t3730-3.bin - ready to run Linux kernel 3.0.38-cm-t3730-3 for CM-T3730
  • linux-3.0.38-cm-t3730-3.config - Linux kernel 3.0.38-cm-t3730-3 configuration file
  • linux-3.0.38-cm-t3730-3.patch - patch vs. Linux stable kernel 3.0.38 with support for CM-T3730 peripherals
  • patches - ordered collection of patches, that form the single patch above (linux-3.0.38-cm-t3730-3.patch)

oe

The oe directory contains configuration files and CM-T3730 specific package definition for OpenEmbedded.

  • base-revision - the OpenEmbedded commit id that was used to create the Angstrom root file system image.
  • local.conf - configuration file used to build Angstrom Linux image for CM-T3730. This file should be placed in ${OEBASE}/build/conf directory.
  • openembedded-cm-t3730-3.patch - patch vs. OE commit id specified in the base-revision to support CM-T3730
  • patches - ordered collection of patches, that form the single patch above (openembedded-cm-t3730-3.patch)
  • extra - directory contains miscellaneous files and examples
    • oe_sample_appl.zip - archive of a sample Bitbake recipe that allows building a basic "Hello world" application

utilities

The utilities directory contains miscellaneous utilities useful for development

  • tftpd32.zip - TFTP server for Windows users
  • eeprom-util - CompuLab EEPROM utility for reading information found inside the EEPROM on CompuLab boards
  • bootscr.src - U-Boot script used for booting kernel from MMC/SD card with root file system on MMC/SD card

extra

The extra directory contains files that are not directly connected to the Linux kernel or the OE framework

  • dvsdk_04_03_00_06 - directory contains DSP related files
    • dvsdk_04_03_00_06-cm-t3730-3.patch - patch that provides support for mainline Linux kernel and CM-T3730 device with the DVSDK
    • patches - ordered collection of patches, that form the single patch above (dvsdk_04_03_00_06-cm-t3730-3.patch)
  • Graphics_SDK_4_05_00_03 - directory contains graphics (SGX) related files
    • graphics_sdk_04_05_00_03-cm-t3730-3.patch - patch that fixes the Graphics SDK v4.05.00.03 compile time errors
    • patches - ordered collection of patches, that form the single patch above (graphics_sdk_04_05_00_03-cm-t3730-3.patch)

Using Angstrom Linux on CM-T3730

Display options

CM-T3730 evaluation platform has four video output interfaces: LCD, DVI, LVDS and TV-out. Default configuration of Angstrom Linux for CM-T3730 uses DVI as primary video output. It is possible to switch between the DVI and LCD interfaces on the fly. TV-out can be used simultaneously with LCD or DVI interface.
Linux implementation of the OMAP3 display subsystem is described in detail in Documentation/arm/OMAP/DSS file in the Linux kernel source tree.

Display resolutions

  • The Toppoly LCD supplied with CM-T3730 evaluation kit supports 480x640 resolution with 18 bits per color
  • DVI output can be configured for standard resolutions using kernel command line parameter omapfb.mode:
    1024x768 - omapfb.mode=dvi:1024x768-24@60
    800x600 - omapfb.mode=dvi:800x600-24@60
    640x480 - omapfb.mode=dvi:640x480-24@60
  • TV-out supports PAL and NTSC standards

Examples

Switch from LCD to DVI

mgr0=/sys/devices/platform/omapdss/manager0
lcd=/sys/devices/platform/omapdss/display0
dvi=/sys/devices/platform/omapdss/display1
fb0=/sys/class/graphics/fb0

w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1`

echo "0" > $lcd/enabled
echo "" > $mgr0/display
fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
# at this point you have to switch the dvi/lcd dip-switch from the omap board
echo "dvi" > $mgr0/display
echo "1" > $dvi/enabled

Clone GFX overlay to LCD and TV

ovl0=/sys/devices/platform/omapdss/overlay0
ovl1=/sys/devices/platform/omapdss/overlay1
tv=/sys/devices/platform/omapdss/display2
fb0=/sys/class/graphics/fb0
fb1=/sys/class/graphics/fb1

w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1`

echo "0" > $ovl0/enabled
echo "0" > $ovl1/enabled

echo "" > $fb1/overlays
echo "0,1" > $fb0/overlays

echo "$w,$h" > $ovl1/output_size
echo "tv" > $ovl1/manager

echo "1" > $ovl0/enabled
echo "1" > $ovl1/enabled

echo "1" > $tv/enabled

Switch TV-out from PAL to NTSC

tv=/sys/devices/platform/omapdss/display2
echo "0" $tv/enabled
echo "ntsc" $tv/timings
echo "1" $tv/enabled

GPIO access

Linux provides simple and convenient GPIO access via sysfs interface. A GPIO should be exported using /sys/class/gpio/export. After the GPIO is exported it is possible to change its direction and value using /sys/class/gpio/gpioX/direction and /sys/class/gpio/gpioX/value attributes.

Example

The following example demonstrates how to configure GPIO 140 as output and produce a 1usec pulse:

echo 140 > /sys/class/gpio/export
echo 1 > /sys/class/gpio/gpio140/direction
echo 0 > /sys/class/gpio/gpio140/value
echo 1 > /sys/class/gpio/gpio140/value
usleep 1
echo 0 > /sys/class/gpio/gpio140/value

Angstrom Linux package management

Angstrom Linux for CM-T3730 includes opkg package manager. It can be run from terminal command line.

Digital Video SDK

Overview

The Digital Video SDK (DVSDK) version 4.03.00.06 provides multiple resourses for evaluation and application development for the TI DM3730 platform. Current CM-T3730 Linux package contains the following pre-built DVSDK components: Multimedia Package, DSP Package, and several demo applications for functionality demonstration and validation.

Multimedia Package includes:

  • Multimedia Framework Product (MFP)
    • Codec Engine Framework
    • Framework Components
    • Linux Utils (CMEM)
    • XDAIS (eXpress DSP Algorithm Interoperability Standard)
  • Davinci Multimedia Application Interface (DMAI)
  • DSP Optimized codecs
    • Encoders: H.264, MPEG-4, JPEG, G711
    • Decoders: H.264, MPEG-4, MPEG-2, AAC. JPEG, G711
  • DSP accelerated Gstreamer TI plugin

DSP Package includes:

  • C6000 code generation tool chain
  • DSP/BIOS Real Time Operating System
  • DSPLink Inter Processor Communication
  • C6Accel - easy access to DSP accelerated function libraries
  • C6Run - tool to easily run C code on the DSP

The DVSDK was built outside of OpenEmbedded framework and intensively tested with Linux kernel version 3.0.38. For custom Linux kernel build, the DVSDK must be re-built to avoid compatibility issues. This section describes how to configure Linux kernel at boot time and run DVSDK demos. For detailed DVSDK build instruction please refer to the CM-T3730: Linux: Building images page.

Kernel parameters

The framebuffer plains 1 and 2 must be enabled in the kernel command line for the GStreamer-TI package will work correctly:

vram=18M omapfb.vram=0:6M,1:6M,2:6M

Additionally, DSP kernel modules require a memory "window" in the kernel memory to allocate a heap buffer of 73MB at 0x83700000. This memory must not be used by any other module or process, so the following parameters must be added to the kernel command line:

mem=55M@0x80000000 mem=128M@0x88000000
Admolition note.png We do not recommend using DVSDK on CM-T3730 devices with less then 256MB of RAM.

Running Demos

Current CM-T3730 Linux package contains pre-built and ready to run DVSDK functionality demo programs. For additional information about the DVSDK demos please refer to the DVSDK Software Developers Guide.

DSPLink Examples

The DSPLink includes several sample application examples. Use the following example to run the demo applications on CM-T3730:

root@cm-t3730:~# cd /usr/share/ti/ti-dsplink-examples/
root@cm-t3730:/usr/share/ti/ti-dsplink-examples# ./ti-dsplink-examples-run.sh

C6Accel Apps

The C6Accel package includes a small test application for benchmarking all the DSP kernel APIs for fixed point and floating point calculations. To run the application, run the following commands on CM-T3730:

root@cm-t3730:~# cd /usr/share/ti/c6accel-apps/
root@cm-t3730:~# ./c6accel_app

DMAI Apps

The Davinci Multimedia Application Interface (DMAI) includes small sample applications (and also source code). To run a DMAI sample application, make sure the current directory on CM-T3730 is ti-dmai-apps:

root@cm-t3730:~# cd /usr/share/ti/ti-dmai-apps/
Decode Examples

To decode an H.264 BP encoded video to a YUV file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./video_decode_io2_dm3730.x470MV -c h264dec \
 -i /usr/share/ti/data/videos/davincieffect_480p30.264 -o h264_test_output.yuv

To decode a JPEG encoded image to a YUV file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./image_decode_io1_dm3730.x470MV -c jpegdec \
 -i /usr/share/ti/data/images/remi003_422i.jpg -o jpeg_test_output.yuv

To decode an AAC encoded audio:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./audio_decode_io1_dm3730.x470MV -c aachedec \
 -i /usr/share/ti/data/sounds/davincieffect_lc.aac -o aac_test_output.pcm
Encode Examples

To encode 100 frames of resolution 720x480 from a YUV file to an H.264 BP encoded file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./video_encode_io1_dm3730.x470MV -c h264enc \
 -i h264_test_output.yuv -o output.264 -r 720x480 -n 100

To encode a YUV file to a JPEG encoded file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./image_encode_io1_dm3730.x470MV -c jpegenc -e encode \
 -i jpeg_test_output.yuv -o Output.jpeg -r 720x576 --iColorSpace 3 --oColorSpace 1

Graphics SDK

The CM-T3730 Linux package contains pre-built and ready to run SGX functionality demo programs. The SGX configuration script must be run on CM-T3730 before first use:

root@cm-t3730:~# /etc/init.d/omap-demo

Running Graphics SDK OpenGL ES1.x Demos

To run OpenGL ES1.x demos, perform the following:

root@cm-t3730:~# cd /opt/gfxsdkdemos/ogles
root@cm-t3730:/opt/gfxsdkdemos/ogles# ./OGLESSkybox

This will execute the OGLESSkybox demo. Press ‘q’ on the CM-T3730 console to stop the demo execution. Similarly, any other OpenGL ES1.x demo can be executed.

For more information and command line options of the OpenGL ES1.x demos, please refer to the SDK user guide: Graphics_SDK_4_05_00_03/GFX_Linux_SDK/OGLES/SDKPackage/OpenGL ES SDK.User Guide.1.20f.External.pdf.

Running Graphics SDK OpenGL ES2.0 Demos

To run OpenGL ES2.x demos, perform the following:

root@cm-t3730:~# cd /opt/gfxsdkdemos/ogles2
root@cm-t3730:/opt/gfxsdkdemos/ogle2s# ./OGLES2Coverflow

This will execute the OGLES2Coverflow demo. Press ‘q’ on the CM-T3730 console to stop the demo execution. Similarly, any other OpenGL ES2.0 demo can be executed.

For more information and command line options on the OpenGL ES2.0 demos, please refer to the SDK user guide: Graphics_SDK_4_05_00_03/GFX_Linux_SDK/OGLES2/SDKPackage/OpenGL ES 2.x SDK.User Guide.1.20f.External.pdf.

See also