CM-T3530: Linux: Angstrom

From Compulab Mediawiki
Revision as of 14:21, 23 December 2009 by Mike (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

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

  • uImage-2.6.32-omap1-cm-t35.bin - ready to run Linux kernel 2.6.32-omap1 for CM-T3530
  • linux-2.6.32-omap1-cm-t35.defconfig - Linux kernel 2.6.32-omap1 configuration file
  • linux-2.6.32-omap1-cm-t35.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

  • first_boot.scr - U-Boot script for booting kernel and ramdisk from MMC/SD card or network.
  • tftpd32.zip - TFTP server for Windows users

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.

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.

See also