CM-T3730: Linux: Building images

From Compulab Mediawiki
Revision as of 13:59, 13 June 2012 by Grinberg (talk | contribs) (Graphics SDK)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 creation of custom Linux images for CM-T3730.

OpenEmbedded setup

Creation of custom Linux images for CM-T3730 requires installation of OpenEmbedded (OE) framework. Getting Started section of OpenEmbedded User Manual describes the framework installation process.

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

The OpenEmbedded framework must be configured in order to build images for CM-T3730. Example configuration for Angstrom Linux image creation for CM-T3730 can be found in oe/local.conf file in 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}/oe/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 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.

Graphics SDK

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. The current CM-T3730 Linux package contains pre-built graphics kernel modules and graphics demo applications that were built using OpenEmbedded 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 Graphics kernel modules using OE

  • Clean the previously built modules
bitbake omap3-sgx-modules -c clean
  • Build the modules again
bitbake omap3-sgx-modules
  • Re-build the Angstrom image as described here or manually place the ${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:
opkg install /path/to/omap3-sgx-modules_1.6.16.4117-r1i.9_cm-t3730.ipk 

Building Graphics kernel modules outside of OE

  • Download the Graphics SDK 4.05.00.03. The download does not require any registration.
  • Install the SDK on a Linux host machine. Please refer to the following installation guide for more details.
  • Apply patches in order to fix the Graphics SDK v4.05.00.03 compile time errors:
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 Makifile.SDK /path/to/cm-t3730-linux/extra/Graphics_SDK_4_05_00_03/patches/0002-SDK-export-TOOLCHAIN-variable-when-build-OGLESDEMOS.patch
  • Setup environment variables and build the graphics kernel modules. Please refer to the following build guide for more details.
make OMAPES=5.x all_km
  • Install the graphics kernel modules into your rootfs:
sudo make OMAPES=5.x install_km
  • Boot up your CM-T3730 device and run the SDK configuration script on the device:
root@cm-t3730:~# /etc/init.d/omap-demo

See also