Difference between revisions of "CM-T3730: Linux: Building images"

From Compulab Mediawiki
Jump to: navigation, search
(Graphics SDK)
 
(Applying Patches)
Line 1: Line 1:
 
== Angstrom Linux images ==
 
== Angstrom Linux images ==
The run-time Angstrom Linux image for CM-T3730 is created using [http://www.openembedded.org OpenEmbedded] framework. The OpenEmbedded framework can also be used for creation of custom Linux images for CM-T3730.
+
The run-time Angstrom Linux image for CM-T3730 is created using [http://www.openembedded.org OpenEmbedded] framework. The OpenEmbedded framework can also be used for building custom Linux images.
  
 
=== OpenEmbedded setup ===
 
=== OpenEmbedded setup ===
Creation of custom Linux images for CM-T3730 requires installation of OpenEmbedded (OE) framework. [http://docs.openembedded.org/usermanual/usermanual.html#chapter_getting_oe Getting Started] section of [http://docs.openembedded.org/usermanual/usermanual.html OpenEmbedded User Manual] describes the framework installation process.
+
Building custom Linux images for CM-T3730 requires installation of OpenEmbedded (OE) framework. The framework installation process is described in [http://docs.openembedded.org/usermanual/usermanual.html#chapter_getting_oe Getting Started] section of [http://docs.openembedded.org/usermanual/usermanual.html OpenEmbedded User Manual].
  
This article assumes that the [http://docs.openembedded.org/usermanual/usermanual.html#chapter_getting_oe Getting Started] instructions have been followed and the same directory structure and all the tools installed.
+
This article assumes that the [http://docs.openembedded.org/usermanual/usermanual.html#chapter_getting_oe Getting Started] instructions have been followed precisely and the same directory structure and all the tools were installed.
Also this article will use the $OEBASE variable to denote the base directory of the OpenEmbedded.
+
Also this article will use the $OEBASE variable to denote the base directory of the OpenEmbedded framework.
  
The OpenEmbedded framework must be configured in order to build images for CM-T3730.
+
The OpenEmbedded framework must be configured prior to building images for CM-T3730.
Example configuration for Angstrom Linux image creation for CM-T3730 can be found in {{filename|oe/local.conf}} file in [http://compulab.co.il/wp-content/uploads/2012/06/cm-t3730_linux_2012-06-11.zip CM-T3730 Linux package].
+
Example configuration for Angstrom Linux image creation for CM-T3730 can be found in {{filename|oe/local.conf}} file of the [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres CM-T3730 Linux package].
 
The {{filename|oe/local.conf}} file must be copied to {{filename|${OEBASE}/build/conf}} directory:
 
The {{filename|oe/local.conf}} file must be copied to {{filename|${OEBASE}/build/conf}} directory:
 
<pre>
 
<pre>
Line 20: Line 20:
 
* Create a branch for CM-T3730 development. CM-T3730 patches are generated vs. commit b50fde72d5789b3185f9a7c64924280bb063cfad in org.openembedded.dev branch of the OpenEmbedded git tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
 
* Create a branch for CM-T3730 development. CM-T3730 patches are generated vs. commit b50fde72d5789b3185f9a7c64924280bb063cfad in org.openembedded.dev branch of the OpenEmbedded git tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
 
<pre>
 
<pre>
cd {$OEBASE}/oe/openembedded
+
cd $OEBASE/openembedded
 
git checkout -b cm-t3730-dev b50fde72d5789b3185f9a7c64924280bb063cfad
 
git checkout -b cm-t3730-dev b50fde72d5789b3185f9a7c64924280bb063cfad
 
</pre>
 
</pre>
* Apply CM-T3730 patches
+
* Apply CM-T3730 patches:
 
<pre>
 
<pre>
 
git am /path/to/cm-t3730-linux/oe/patches/*
 
git am /path/to/cm-t3730-linux/oe/patches/*
Line 29: Line 29:
  
 
=== Building Angstrom Linux images ===
 
=== Building Angstrom Linux images ===
* Setup environment variables
+
* Setup environment variables:
 
<pre>
 
<pre>
 
export OEBASE=/path/to/oe
 
export OEBASE=/path/to/oe
Line 37: Line 37:
 
export BB_ENV_EXTRAWHITE="OEBASE"
 
export BB_ENV_EXTRAWHITE="OEBASE"
 
</pre>
 
</pre>
* Build Angstrom Linux image
+
* Build Angstrom Linux image:
 
<pre>
 
<pre>
 
bitbake beagleboard-demo-image
 
bitbake beagleboard-demo-image
Line 44: Line 44:
 
Once bitbake has finished, the image is created and placed into the {{filename|${OEBASE}/build/arm/tmp/deploy/eglibc/images/cm-t3730}} directory.
 
Once bitbake has finished, the image is created and placed into the {{filename|${OEBASE}/build/arm/tmp/deploy/eglibc/images/cm-t3730}} directory.
 
Default configuration creates two types of images: {{filename|.tar.bz2}}, and {{filename|.ubi}}.
 
Default configuration creates two types of images: {{filename|.tar.bz2}}, and {{filename|.ubi}}.
The {{filename|.tar.bz2}} archive should be extracted to the third partition of the CM-T3730 MMC/SD card.
+
The {{filename|.tar.bz2}} archive should be extracted to the rootfs (third) partition of the CM-T3730 MMC/SD card.
Alternatively it can be extracted to a directory on the host workstation. This directory may be used as networked root filesystem for the device.
+
Alternatively, it can be extracted to a directory on the host workstation. This directory may be used as networked root filesystem for CM-T3730.
  
== Graphics SDK ==
+
== User Application ==
The Graphics SDK version 4.05.00.03 includes the Linux graphics (SGX) drivers and OpenGLES1.1, 2.0 and OpenVG demos for all TI platforms.
+
There are multiple ways to build user space applications that can run on the CM-T3730.
The current CM-T3730 Linux package contains pre-built graphics kernel modules and graphics demo applications that were built using [http://www.openembedded.org OpenEmbedded] framework.
+
This article will focus on building user application with OE framework.
If a custom Linux kernel must be created, the graphics kernel modules must be re-built in order to avoid versioning issues.
+
 
The SGX modules can be built with or outside of OpenEmbedded framework depending on how the custom Linux kernel is built.
+
=== Building user application using OE ===
 +
Once the OpenEmbadded framework is properly set up and configured on your host machine it can be used for building any kind of applications targeted for CM-T3730.
 +
This task requires creating a new Bitbake recipe. For more details about Bitbake options as well as writing Bitbake recipes please refer the [http://docs.openembedded.org/bitbake/html/ Bitbake user manual] and the [http://docs.openembedded.org/usermanual/usermanual.html#chapter_recipes Recipes] section in the [http://docs.openembedded.org/usermanual/usermanual.html OE user manual].
 +
 
 +
The [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres CM-T3730 Linux package] provides a sample Bitbake recipe that allows building a basic "Hello World!" application.
 +
This chapter assumes that the OpenEmbadded framework has been properly setup and configured on your Linux host machine.
 +
Extract the {{filename|oe-sample-appl}} archive content to the {{filename|${OEBASE}/openembedded/recipes/}} directory:
 +
<pre>
 +
unzip /path/to/cm-t3730-linux/oe/extra/oe_sample_appl.zip -d ${OEBASE}/openembedded/recipes/
 +
</pre>
 +
Setup the environment variables as shown in [[CM-T3730:_Linux:_Building_images#Building_Angstrom_Linux_images|Building Angstrom Linux images]] chapter and build the sample application:
 +
<pre>
 +
bitbake oe-sample-appl
 +
</pre>
 +
Once the build is complete, copy the {{filename|oe-sample-appl}} package to the working root filesystem on CM-T3730:
 +
<pre>
 +
cp ${OEBASE}/build/arm/tmp/deploy/eglibc/ipk/armv7a/oe-sample-appl_0.0.1-r0.9_armv7a.ipk /path/to/cm-t3730/rootfs/home/root/
 +
</pre>
 +
Install the package and run the application:
 +
<pre>
 +
root@cm-t3730:~# opkg install /home/root/oe-sample-appl_0.0.1-r0.9_armv7a.ipk
 +
Installing oe-sample-appl (0.0.1-r0.9) to root...
 +
Configuring oe-sample-appl.
 +
root@cm-t3730:~#
 +
root@cm-t3730:~# oe_sample_appl
 +
Hello World!
 +
root@cm-t3730:~#
 +
</pre>
 +
 
 +
=== Building user application using OE Devshell ===
 +
Although creating a new Bitbake recipe is quite simple task, sometimes avoiding it seems more preferred. However in this case various environment variables have to be set manually.
 +
For example: {{parameter|CC}} and {{parameter|PATH}} must be set to values suitable for cross-compiling.
 +
The OE [http://docs.openembedded.org/usermanual/usermanual.html#id320082 devshell addon] provides you with an interactive shell that has all the appropriate variables set for cross-compiling.
 +
To use the shell, build the {{filename|devshell}} recipe:
 +
<pre>
 +
bitbake devshell
 +
</pre>
 +
Extract the application source code from the {{filename|${OEBASE}/openembedded/recipes/oe-sample-appl/oe-sample-appl_0.0.1.tar.gz}} archive:
 +
<pre>
 +
tar xvf ${OEBASE}/openembedded/recipes/oe-sample-appl/oe-sample-appl_0.0.1.tar.gz -C /path/to/oe-sample-appl/source/
 +
</pre>
 +
Start the devshell and change directory to the {{filename|oe-sample-appl}} source code location and build the application:
 +
<pre>
 +
${OEBASE}/build/arm/tmp/deploy/eglibc/addons/arm-angstrom-linux-gnueabi-angstrom-cm-t3730-devshell
 +
[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe$cd /path/to/oe-sample-appl/source/
 +
[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe-sample-appl/source$make
 +
NOTE: make
 +
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/path/to/oe/build/arm/tmp/sysroots/armv7a-angstrom-linux-gnueabi
 +
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2  -c -o sample_appl.o oe_sample_appl.c
 +
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/path/to/oe/build/arm/tmp/sysroots/armv7a-angstrom-linux-gnueabi
 +
-o oe_sample_appl oe_sample_appl.o
 +
[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe-sample-appl/source$
 +
</pre>
 +
Once the build is complete, copy the {{filename|oe-sample-appl}} application to the working root filesystem on CM-T3730:
 +
<pre>
 +
[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe-sample-appl/source$cp ./oe_sample_appl /path/to/cm-t3730/rootfs/home/root/
 +
</pre>
 +
Run the application on CM-T3730:
 +
<pre>
 +
root@cm-t3730:~#
 +
root@cm-t3730:~# ./oe_sample_appl
 +
Hello World!
 +
root@cm-t3730:~#
 +
</pre>
 +
Please refer to the [http://docs.openembedded.org/usermanual/usermanual.html#usage_devshell Devshell] section in the OE User Manual pages for more details.
 +
 
 +
== Digital Video SDK ==
 +
The Digital Video SDK (DVSDK) version 4.03.00.06 includes Linux kernel modules, multimedia and digital signal processing (DSP) packages and ready to run DSP functionality demos.
 +
The DVSDK for CM-T3730 was built outside of OpenEmbedded framework and tested with Linux kernel version 3.0.38.
 +
If a custom Linux kernel must be used on CM-T3730, the DVSDK must be re-built in order to avoid compatibility issues.
  
=== Building Graphics kernel modules using OE ===
+
=== Building DVSDK outside of OE ===
* Clean the previously built modules
+
At each stage the [http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/latest/exports/TMS320DM3730_Software_Developers_Guide.pdf Software Developers Guide] can be refered for more details.
 +
* Download the [http://software-dl-1.ti.com/dsps/forms/self_cert_export.html?prod_no=dvsdk_dm3730-evm_04_03_00_06_setuplinux&ref_url=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/latest/ Digital Video SDK  4.03.00.06]. Note that the download requires registration.
 +
* Install the SDK on a Linux host machine. The DVSDK supports Ubuntu 10.04 LTS 32-bit host only.
 +
<pre>
 +
./dvsdk_dm3730-evm_04_03_00_06_setuplinux
 +
</pre>
 +
* Setup the DVSDK by executing the {{filename|setup.sh}} script:
 +
<pre>
 +
export DVSDK=/path/to/dvsdk
 +
cd ${DVSDK}
 +
./setup.sh
 +
</pre>
 +
* Manually edit the {{filename|Rules.make}} file. Set the following environment variables to appropriate values:
 +
** LINUXKERNEL_INSTALL_DIR=/path/to/cm-t3730/linux/kernel
 +
** EXEC_DIR=/path/to/cm-t3730/rootfs
 +
{{Note|Please make sure the {{filename|libx11-6}} package is installed in the CM-T3730 root filesystem.}}
 +
* Apply CM-T3730 patches:
 
<pre>
 
<pre>
bitbake omap3-sgx-modules -c clean
+
patch -p1 < /path/to/cm-t3730-linux/extra/dvsdk_04_03_00_06/dvsdk_04_03_00_06-cm-t3730-3.patch
 
</pre>
 
</pre>
* Build the modules again
+
* Build the DVSDK:
 
<pre>
 
<pre>
bitbake omap3-sgx-modules
+
make clean
 +
make all
 
</pre>
 
</pre>
* Re-build the Angstrom image as described [[CM-T3730: Linux: Building images#Building Angstrom Linux images|here]] or manually place the {{filename|${OEBASE}/build/arm/tmp/deploy/eglibc/ipk/cm-t3730/omap3-sgx-modules_1.6.16.4117-r1i.9_cm-t3730.ipk}} package into your target root filesystem and then install it:
+
* Install the DVSDK into the CM-T3730 root filesystem:
 
<pre>
 
<pre>
opkg install /path/to/omap3-sgx-modules_1.6.16.4117-r1i.9_cm-t3730.ipk
+
sudo make install
 
</pre>
 
</pre>
  
=== Building Graphics kernel modules outside of OE ===
+
== Graphics SDK ==
* Download the [http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/4_05_00_03/index_FDS.html Graphics SDK 4.05.00.03]. The download does not require any registration.
+
The Graphics SDK version 4.05.00.03 includes the Linux graphics (SGX) drivers, OpenGLES1.1, OpenGLES2.0 and OpenVG demos for all TI platforms.
* Install the SDK on a Linux host machine. Please refer to the following [http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide#Install_steps installation guide] for more details.
+
The CM-T3730 Linux package contains pre-built graphics kernel modules and graphics demo applications that were built outside of OpenEmbedded framework.
* Apply patches in order to fix the Graphics SDK v4.05.00.03 compile time errors:
+
If a custom Linux kernel must be created, the graphics kernel modules must be re-built in order to avoid versioning issues.
 +
 
 +
=== Building Graphics SDK outside of OE ===
 +
* Download the [http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/4_05_00_03/index_FDS.html Graphics SDK 4.05.00.03].
 +
* Install the SDK on a Linux host machine. Please refer to the [http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide#Install_steps installation guide] for more details.
 +
* Apply the patch from [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres CM-T3730 Linux package]:
 
<pre>
 
<pre>
 
cd /path/to/Graphics/SDK/4/05/00/03/
 
cd /path/to/Graphics/SDK/4/05/00/03/
patch Makifile.KM /path/to/cm-t3730-linux/extra/Graphics_SDK_4_05_00_03/patches/0001-KM-remove-devmem2-from-build-targets.patch
+
patch -p1 < /path/to/cm-t3730-linux/extra/Graphics_SDK_4_05_00_03/graphics_sdk_04_05_00_03-cm-t3730-3.patch
patch Makifile.SDK /path/to/cm-t3730-linux/extra/Graphics_SDK_4_05_00_03/patches/0002-SDK-export-TOOLCHAIN-variable-when-build-OGLESDEMOS.patch
 
 
</pre>
 
</pre>
* Setup environment variables and build the graphics kernel modules. Please refer to the following [http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide#Build_steps build guide] for more details.
+
* Setup the environment variables by editing the {{filename|Rules.make}} file. Set the following environment variables to appropriate values:
 +
** HOME=/path/to/Graphics/SDK/4/05/00/03/home/area. {{parameter|Note:}} This path does not include the {{filename|Graphics_SDK_4_05_00_03}} directory.
 +
** CSTOOL_DIR=/path/to/cross-compiler
 +
** CSTOOL_PREFIX=<cross-compiler-name-prefix>
 +
** KERNEL_INSTALL_DIR=/path/to/cm-t3730/linux/kernel
 +
** TARGETFS_INSTALL_DIR=/path/to/cm-t3730/rootfs
 +
Please refer to the [http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide#Build_steps build guide] for more details.
 +
 
 +
* Build the Graphics SDK:
 +
<pre>
 +
make OMAPES=5.x all
 +
</pre>
 +
For building graphics kernel modules only, please run the following command:
 
<pre>
 
<pre>
 
make OMAPES=5.x all_km
 
make OMAPES=5.x all_km
 
</pre>
 
</pre>
* Install the graphics kernel modules into your rootfs:
+
* Install the Graphics SDK into the CM-T3730 rootfs:
 +
<pre>
 +
sudo make OMAPES=5.x install
 +
</pre>
 +
To install graphics kernel modules only:
 
<pre>
 
<pre>
 
sudo make OMAPES=5.x install_km
 
sudo make OMAPES=5.x install_km
 
</pre>
 
</pre>
* Boot up your CM-T3730 device and run the SDK configuration script on the device:
+
* Boot up the CM-T3730 and run the SDK configuration script:
 
<pre>
 
<pre>
 
root@cm-t3730:~# /etc/init.d/omap-demo
 
root@cm-t3730:~# /etc/init.d/omap-demo

Revision as of 07:14, 16 August 2012

Angstrom Linux images

The run-time Angstrom Linux image for CM-T3730 is created using OpenEmbedded framework. The OpenEmbedded framework can also be used for building custom Linux images.

OpenEmbedded setup

Building custom Linux images for CM-T3730 requires installation of OpenEmbedded (OE) framework. The framework installation process is described in Getting Started section of OpenEmbedded User Manual.

This article assumes that the Getting Started instructions have been followed precisely and the same directory structure and all the tools were installed. Also this article will use the $OEBASE variable to denote the base directory of the OpenEmbedded framework.

The OpenEmbedded framework must be configured prior to building images for CM-T3730. Example configuration for Angstrom Linux image creation for CM-T3730 can be found in oe/local.conf file of the CM-T3730 Linux package. The oe/local.conf file must be copied to ${OEBASE}/build/conf directory:

cp /path/to/cm-t3730-linux/oe/local.conf ${OEBASE}/build/conf

CM-T3730 is currently not supported by upstream OpenEmbedded. The CM-T3730 Linux package provides patch series that introduce the machine support for OE framework.

Applying Patches

  • Create a branch for CM-T3730 development. CM-T3730 patches are generated vs. commit b50fde72d5789b3185f9a7c64924280bb063cfad in org.openembedded.dev branch of the OpenEmbedded git tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
cd $OEBASE/openembedded
git checkout -b cm-t3730-dev b50fde72d5789b3185f9a7c64924280bb063cfad
  • Apply CM-T3730 patches:
git am /path/to/cm-t3730-linux/oe/patches/*

Building Angstrom Linux images

  • Setup environment variables:
export OEBASE=/path/to/oe
cd $OEBASE
export PATH=$OEBASE/bitbake/bin:$PATH
export BBPATH=$OEBASE/build:$OEBASE/openembedded
export BB_ENV_EXTRAWHITE="OEBASE"
  • Build Angstrom Linux image:
bitbake beagleboard-demo-image

Once bitbake has finished, the image is created and placed into the ${OEBASE}/build/arm/tmp/deploy/eglibc/images/cm-t3730 directory. Default configuration creates two types of images: .tar.bz2, and .ubi. The .tar.bz2 archive should be extracted to the rootfs (third) partition of the CM-T3730 MMC/SD card. Alternatively, it can be extracted to a directory on the host workstation. This directory may be used as networked root filesystem for CM-T3730.

User Application

There are multiple ways to build user space applications that can run on the CM-T3730. This article will focus on building user application with OE framework.

Building user application using OE

Once the OpenEmbadded framework is properly set up and configured on your host machine it can be used for building any kind of applications targeted for CM-T3730. This task requires creating a new Bitbake recipe. For more details about Bitbake options as well as writing Bitbake recipes please refer the Bitbake user manual and the Recipes section in the OE user manual.

The CM-T3730 Linux package provides a sample Bitbake recipe that allows building a basic "Hello World!" application. This chapter assumes that the OpenEmbadded framework has been properly setup and configured on your Linux host machine. Extract the oe-sample-appl archive content to the ${OEBASE}/openembedded/recipes/ directory:

unzip /path/to/cm-t3730-linux/oe/extra/oe_sample_appl.zip -d ${OEBASE}/openembedded/recipes/

Setup the environment variables as shown in Building Angstrom Linux images chapter and build the sample application:

bitbake oe-sample-appl

Once the build is complete, copy the oe-sample-appl package to the working root filesystem on CM-T3730:

cp ${OEBASE}/build/arm/tmp/deploy/eglibc/ipk/armv7a/oe-sample-appl_0.0.1-r0.9_armv7a.ipk /path/to/cm-t3730/rootfs/home/root/

Install the package and run the application:

root@cm-t3730:~# opkg install /home/root/oe-sample-appl_0.0.1-r0.9_armv7a.ipk
Installing oe-sample-appl (0.0.1-r0.9) to root...
Configuring oe-sample-appl.
root@cm-t3730:~#
root@cm-t3730:~# oe_sample_appl 
Hello World!
root@cm-t3730:~#

Building user application using OE Devshell

Although creating a new Bitbake recipe is quite simple task, sometimes avoiding it seems more preferred. However in this case various environment variables have to be set manually. For example: CC and PATH must be set to values suitable for cross-compiling. The OE devshell addon provides you with an interactive shell that has all the appropriate variables set for cross-compiling. To use the shell, build the devshell recipe:

bitbake devshell

Extract the application source code from the ${OEBASE}/openembedded/recipes/oe-sample-appl/oe-sample-appl_0.0.1.tar.gz archive:

tar xvf ${OEBASE}/openembedded/recipes/oe-sample-appl/oe-sample-appl_0.0.1.tar.gz -C /path/to/oe-sample-appl/source/

Start the devshell and change directory to the oe-sample-appl source code location and build the application:

${OEBASE}/build/arm/tmp/deploy/eglibc/addons/arm-angstrom-linux-gnueabi-angstrom-cm-t3730-devshell
[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe$cd /path/to/oe-sample-appl/source/
[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe-sample-appl/source$make
NOTE: make
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/path/to/oe/build/arm/tmp/sysroots/armv7a-angstrom-linux-gnueabi
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2  -c -o sample_appl.o oe_sample_appl.c
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/path/to/oe/build/arm/tmp/sysroots/armv7a-angstrom-linux-gnueabi
-o oe_sample_appl oe_sample_appl.o
[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe-sample-appl/source$

Once the build is complete, copy the oe-sample-appl application to the working root filesystem on CM-T3730:

[OE::arm-angstrom-linux-gnueabi-angstrom-cm-t3730]:/path/to/oe-sample-appl/source$cp ./oe_sample_appl /path/to/cm-t3730/rootfs/home/root/

Run the application on CM-T3730:

root@cm-t3730:~#
root@cm-t3730:~# ./oe_sample_appl
Hello World!
root@cm-t3730:~#

Please refer to the Devshell section in the OE User Manual pages for more details.

Digital Video SDK

The Digital Video SDK (DVSDK) version 4.03.00.06 includes Linux kernel modules, multimedia and digital signal processing (DSP) packages and ready to run DSP functionality demos. The DVSDK for CM-T3730 was built outside of OpenEmbedded framework and tested with Linux kernel version 3.0.38. If a custom Linux kernel must be used on CM-T3730, the DVSDK must be re-built in order to avoid compatibility issues.

Building DVSDK outside of OE

At each stage the Software Developers Guide can be refered for more details.

  • Download the Digital Video SDK 4.03.00.06. Note that the download requires registration.
  • Install the SDK on a Linux host machine. The DVSDK supports Ubuntu 10.04 LTS 32-bit host only.
./dvsdk_dm3730-evm_04_03_00_06_setuplinux
  • Setup the DVSDK by executing the setup.sh script:
export DVSDK=/path/to/dvsdk
cd ${DVSDK}
./setup.sh
  • Manually edit the Rules.make file. Set the following environment variables to appropriate values:
    • LINUXKERNEL_INSTALL_DIR=/path/to/cm-t3730/linux/kernel
    • EXEC_DIR=/path/to/cm-t3730/rootfs
Admolition note.png Please make sure the libx11-6 package is installed in the CM-T3730 root filesystem.
  • Apply CM-T3730 patches:
patch -p1 < /path/to/cm-t3730-linux/extra/dvsdk_04_03_00_06/dvsdk_04_03_00_06-cm-t3730-3.patch
  • Build the DVSDK:
make clean
make all
  • Install the DVSDK into the CM-T3730 root filesystem:
sudo make install

Graphics SDK

The Graphics SDK version 4.05.00.03 includes the Linux graphics (SGX) drivers, OpenGLES1.1, OpenGLES2.0 and OpenVG demos for all TI platforms. The CM-T3730 Linux package contains pre-built graphics kernel modules and graphics demo applications that were built outside of OpenEmbedded framework. If a custom Linux kernel must be created, the graphics kernel modules must be re-built in order to avoid versioning issues.

Building Graphics SDK outside of OE

cd /path/to/Graphics/SDK/4/05/00/03/
patch -p1 < /path/to/cm-t3730-linux/extra/Graphics_SDK_4_05_00_03/graphics_sdk_04_05_00_03-cm-t3730-3.patch
  • Setup the environment variables by editing the Rules.make file. Set the following environment variables to appropriate values:
    • HOME=/path/to/Graphics/SDK/4/05/00/03/home/area. Note: This path does not include the Graphics_SDK_4_05_00_03 directory.
    • CSTOOL_DIR=/path/to/cross-compiler
    • CSTOOL_PREFIX=<cross-compiler-name-prefix>
    • KERNEL_INSTALL_DIR=/path/to/cm-t3730/linux/kernel
    • TARGETFS_INSTALL_DIR=/path/to/cm-t3730/rootfs

Please refer to the build guide for more details.

  • Build the Graphics SDK:
make OMAPES=5.x all

For building graphics kernel modules only, please run the following command:

make OMAPES=5.x all_km
  • Install the Graphics SDK into the CM-T3730 rootfs:
sudo make OMAPES=5.x install

To install graphics kernel modules only:

sudo make OMAPES=5.x install_km
  • Boot up the CM-T3730 and run the SDK configuration script:
root@cm-t3730:~# /etc/init.d/omap-demo

See also