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

From Compulab Mediawiki
Jump to: navigation, search
(extra)
(See also)
Line 134: Line 134:
 
* [[CM-T3730: Linux: Kernel]]
 
* [[CM-T3730: Linux: Kernel]]
 
* [[CM-T3730: Linux: Camera]]
 
* [[CM-T3730: Linux: Camera]]
 +
* [[CM-T3730: Linux: Building images]]
 
* [[Linux Development for ARM modules]]
 
* [[Linux Development for ARM modules]]
 
* [http://www.angstrom-distribution.org Angstrom Distribution]
 
* [http://www.angstrom-distribution.org Angstrom Distribution]

Revision as of 13:23, 2 July 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
  • MPlayer and omapfbplay media players
  • GStreamer with multiple plugins

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.32-cm-t3730-2.bin - ready to run Linux kernel 3.0.32-cm-t3730-2 for CM-T3730
  • linux-3.0.32-cm-t3730-2.defconfig - Linux kernel 3.0.32-cm-t3730-2 configuration file
  • linux-3.0.32-cm-t3730-2.patch - patch vs. Linux stable kernel 3.0.32 with support for CM-T3730 peripherals
  • patches - ordered collection of patches, that form the single patch above (linux-3.0.32-cm-t3730-2.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.
  • patches - collection of patches that were applied on top of the commit id in base-revision.

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 graphics (SGX) related files inside the Graphics_SDK_4_05_00_03 directory

  • gfxsdkdemos.tar.bz2 - archive of ready to run SGX functionality demonstrations
  • patches - collection of patches that fix the Graphics SDK v4.05.00.03 compile time errors

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.

See also