CM-T3530: Linux: Angstrom
Introduction
The example run-time Linux filesystem image for CM-T3530 is based on Angstrom Linux 2009. The CompuLab Linux package for CM-T3530 includes ready to run NAND flash image, Linux kernel configuration and source code patches, and OpenEmbedded configuration files used to build the Angstrom Linux filesystem image.
The default Angstrom Linux image takes approximately 250 megabytes of flash space, and includes more than 1000 software packages. Among them:
- Core system
- X11 Windowing System
- Enlightment E17 desktop manager
- Firefox and Midory web browsers
- Office applications
- GIMP
- Totem, MPlayer and omapfbplay media players
The Getting started with Linux on CM-T3530 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-T3530.
Package contents
version.txt
The contents of the version.txt identifies the package version.
images
- Angstrom-image.ubi - ready to run Angstrom Linux image for installation onto CM-T3530 NAND
- uImage-cm-t35.bin - kernel image binary for installation onto CM-T3530 NAND
- Angstrom-image.tar.bz2 - archive of root file system
- bootscr.img - U-Boot script used for image installation
- kernel.img - Kernel image required for NAND image installation
- ramdisk.img - Ramdisk image required for NAND image installation
kernel
- additional_modules - additional modules required by CM-T3530 for video playback. Please refer the Video modules installation guide for more information.
- first_release - previously released Linux kernel image, configuration files and patch for CM-T3530
- uImage-2.6.32-cm-t35-3.bin - ready to run Linux kernel 2.6.32-cm-t35-3 for CM-T3530
- linux-2.6.32-cm-t35-3.defconfig - Linux kernel 2.6.32-cm-t35-3 configuration file
- linux-2.6.32-omap1-cm-t35.pm.defconfig - Linux kernel 2.6.32-omap1 configuration file with enabled power management features same as in previous release
- linux-2.6.32-cm-t35-3.patch - patch vs. Linux-omap kernel 2.6.32 with support for CM-T3530 peripherals
oe
The oe directory contains configuration files and CM-T3530 specific package definition for OpenEmbedded.
- local.conf - configuration file used to build Angstrom Linux image for CM-T3530. This file should be placed in ${OEBASE}/build/conf directory.
- cm-t35.patch - CM-T3530 specific additions to OpenEmbedded.
- base-revision - specifies revision of OpenEmbedded git tree used as a baseline for CM-T3530 patches generation.
utilities
utilities directory contains miscellaneous utilities useful for development
- Angstrom-image.cfg - configuration file used by ubinize utility for Angstrom-image.ubi generating. For more information about UBIFS images please refer the Linux Development for ARM modules article.
- first_boot.scr - U-Boot script for booting kernel and ramdisk from MMC/SD card or network.
- tftpd32.zip - TFTP server for Windows users.
- capture - simple video capture example.
Using Angstrom Linux on CM-T3530
Display options
CM-T3530 evaluation platform has four video output interfaces: LCD, DVI, LVDS and TV-out. Default configuration of Angstrom Linux for CM-T3530 uses Toppoly LCD supplied with the evaluation kit as primary video output. It is possible to switch between LCD and DVI 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-T3530 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
3D Demos
Angstrom Linux for CM-T3530 includes OpenGLES libraries and 3D demos. OMAP3 3D support is limited to 16-bit colors, therefore it is necessary to ensure that display subsystem has proper color mode configuration. For example for 1024x768 resolution the omapfb.mode should be set to omapfb.mode=dvi:1024x768-16@60.
The OpenGLES demos can be found in /usr/demos/ directory in the target filesystem.
Video playback
Angstrom Linux for CM-T3530 supports playback of MPEG2, MPEG4 and H.264 video formats. For further information regarding video playback, please refer to Video playback article.
GPIO access
Linux provides simple and convenient GPIO access via sysfs interface. A GPIO should be requested 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-T3530 includes opkg package manager. It can be run either from command line, or using GUI. Go to "Settings" -> "Package Manager" to start the application, select packages you'd like to install and press "Apply" button.
Power management
The Angstrom Linux for CM-T3530 supports very low power sleep mode and dynamic frequency scaling. Please refer to CM-T3530: Linux: Power management article for further details.