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

From Compulab Mediawiki
Jump to: navigation, search
(images)
 
(See also)
Line 119: Line 119:
  
 
== See also ==
 
== See also ==
* [[CM-T3730: Linux: Getting started|Getting started with Linux on CM-T3730]]
+
* [[CM-T3730: Linux: Getting started]]
* [[CM-T3730: Linux: Kernel|Linux kernel for CM-T3730]]
+
* [[CM-T3730: Linux: Kernel]]
 +
* [[CM-T3730: Linux: Camera]]
 
* [[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 11:32, 3 April 2012

Introduction

The example run-time Linux filesystem image for CM-T3730 is based on Angstrom Linux 2009. The CompuLab Linux package for CM-T3730 includes ready to run Angstrom Linux filesystem image and Linux kernel configuration and source code patches.

The default Angstrom Linux image 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-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 - kernel image binary for installation onto CM-T3730
  • Angstrom-image.tar.bz2 - archive of root file system
  • bootscr.img - U-Boot script used for image installation

kernel

  • uImage-3.0-cm-t3730-1.bin - ready to run Linux kernel 3.0-cm-t3730-1 for CM-T3730
  • linux-3.0-cm-t3730-1.defconfig - Linux kernel 3.0-cm-t3730-1 configuration file
  • linux-3.0-cm-t3730-1.patch - patch vs. Linux kernel 3.0 with support for CM-T3730 peripherals

utilities

utilities directory contains miscellaneous utilities useful for development

  • tftpd32.zip - TFTP server for Windows users.


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 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