Angstrom Linux for EM-X270

From Compulab Mediawiki
Revision as of 06:56, 8 September 2008 by Mike (talk | contribs) (oe)
Jump to: navigation, search

Introduction

The run-time Linux image for EM-X270 is based on Angstrom Linux 2007.1. The CompuLab Linux package for EM-X270 includes ready to run NAND flash image, Linux kernel configuration and source code patches, and OpenEmbedded configuration files used to build the Angstrom Linux image. The package also features LiveDisk image for easy installation of the run-time Angstrom Linux on EM-X270.

The default Angstrom Linux image takes less than 50Mbyte of flash space, and includes above 300 software packages. Among them:

  • Core system
  • X11 Windowing System
  • Matchbox desktop manager
  • Minimo web browser
  • PIM suite
  • Phone dialer

The Getting started with Linux on EM-X270 page gives brief introduction on how to setup and start using the run-time Linux image. Here we describe in more detail package structure and peripheral devices options specific to EM-X270.

Package contents

images

  • LiveDisk.zip - archive contains files for USB LiveDisk.
  • em_x270.img.bz2 - ready to run image for EM-X270 NAND flash.
  • angstrom-em-x270.tar.bz2 - archive of root file system

kernel

  • uImage-2.6.23-em-x270 - ready to run Linux kernel image for EM-X270
  • linux-2.6.23-em-x270.config - Linux kernel configuration file
  • linux-2.6.23-em-x270.pacth - patch vs. Linux kernel 2.6.23 with support for EM-X270 peripherals

oe

The oe directory contains configuration files and EM-X270 specific package definition for OpenEmbedded. These files should reside under the OpenEmbedded root on your host system. Please consult OpenEmbedded documentation for further details.

  • build/conf/local.conf - configuration file used to build Angstrom Linux image for EM-X270
  • org.openembedded.dev/conf/machine/em-x270.conf - machine definition file
  • org.openembedded.dev/packages/linux/em-x270_2.6.23.bb - recipe to build Linux kernel for EM-X270
  • org.openembedded.dev/packages/linux/em-x270-2.6.23/ - files needed to build Linux kernel for EM-X270

utilities

utilities directory contains miscellaneous utilities useful for development

  • create_image.sh - the script creates an image compatible with EM-X270 updater application
  • fixup-angstrom.sh - the script used to update several configuration files in the Angstrom Linux image before deploying the image to the device
  • patches/ - patches used by the fixup-angstrom.sh
  • updater/ - sources of EM-X270 updater application

Package management on EM-X270

Angstrom Linux on EM-X270 includes ipkg package manager. It can be run either from command line, or using GUI. Tap "Settings" -> "Package Manager" to start the application, select packages you'd like to install and press "Apply" button.

EM-X270 specific device options

Certain on-board devices may be of particular interest for EM-X270 application developers. We provide here details of their operation in Angstrom Linux for EM-X270.

GSM/GPRS modem

GSM/GPRS modem is connected to BTUART of PXA270 processor and can be accessed through /dev/ttyS1 device node. In Angstrom Linux for EM-X270 it can operated either by GSMD daemon and a Dialer front end for voice calls, or PPPD daemon for data connection. At the system startup GSMD is enabled and it it possible to issue voice phone calls using Dialer application. If you'd like to switch to data communications using GPRS, you shoud tap "Other" -> "GPRS". To switch back to voice calls mode tap "Other" -> "GSM".

The data connection with GPRS modem may require update of provider-specific details in /etc/ppp/gprs-connect, /etc/ppp/gprs-options and /etc/ppp/pap-secrets files.


/etc/ppp/gprs-connect

TIMEOUT         60
ABORT           'BUSY'
ABORT           'ERROR'
ABORT           'NO CARRIER'
''              'AT'
OK              AT+CGDCONT=1,"IP","internet","0.0.0.0",0,0
OK              ATD*99***1#
CONNECT         ''

The string "internet" in this example containts the APN (Access Point Name ) address of your GPRS provider. Contact your provider to find out what is the right address and username/password to use. The username and password should reside in /etc/ppp/pap-secrets (both are a in the below example):


/etc/ppp/pap-secrets

# Secrets for authentication using PAP
# client	server	secret			IP addresses
  'a'		 *	 'a'			*

It is important to set the user field of /etc/ppp/gprs-options to the same username.

GPS reciever

GPS reciever is connected to STUART of PXA270 processor and can be accessed through /dev/ttyS2 device node.

Wireless LAN

Wireless LAN on EM-X270 supports 802.11b. Currently Angstrom Linux for EM-X270 does not enable this interface automaticaly. The driver for wireless LAN chip present on EM-X270 is provided by the chip manufacturer and therefore redistributed by CompuLab in binary form. The driver is called bgw200 and can be enabled using

echo 1 > /sys/devices/platform/wlan/pwr_on
modprobe bgw200
iwconfig eth1 essid <your_ESSID>

You can use Linux standard iwconfig, iwscan, iwevent, iwgetid, iwlist, iwpriv, iwspy utilities.

VGA display

EM-X270 with EB-X270 extender board supports connection of standard VGA display. To direct graphics output to VGA append {{{1}}} to kernel command line. Tap keyboard icon on the panel, tap "Other" -> "Terminal", and in the terminal window do

su
cmd_line=`fw_printenv boot_angstrom | cut -d= -f2- | \
          sed 's/setenv bootargs/setenv bootargs display=vga/'`
fw_setenv boot_angstrom $cmd_line

If you would like to use mouse rather than touchscreen, you should edit the /etc/matchbox/session file and change "-use_cursor no" to "-use_cursor yes"

Power management

Angstrom Linux for EM-X270 allows user to take full advantage of EM-X270 flexible power management capabilities. It supports very low power sleep mode, provides abitity to swtich on and off certain units power and implements charging supervision mechanism for battery powered operation mode.

Battery Charger Management

When EM-X270 operates as a battery powered device, battery monitoring and charging is supervised by the Linux kernel. It detects insertion and removal of USB OTG connector and performs operations necessary to ensure safe battery charging.

On-board Devices Power Control

The on-board WiFi interface, GPS reciever and cellular voice and GSM/GPRS modem can be switched on and off on the fly. Linux kernel for EM-X270 defines *`pwr_on`* attribute for these devices. The attributes can be accessed via sysfs:

/sys/devices/platform/wlan/pwr_on
/sys/devices/platform/gps/pwr_on
/sys/devices/platform/gprs/pwr_on

Writing 1 to appropriate attribute file will enable the device power and writng 0 will disable it. For instance, to enable the GSM/GPRS unit:

echo 1 > /sys/devices/platform/gprs/pwr_on

OpenEmbedded

Angstrom Linux images for EM-X270 are built with OpenEmbedded development environment. If you would like to build custom image you need to install the OpenEmbedded environment. Getting Started page of OpenEmbedded documentation describes the installation process.

Here we assume that you followed the Getting Started instructions and you have the same directory structure.

After you completed the installation of OpenEmbedded, you need to configure it to be able to build images for EM-X270. Recent versions of OpenEmbedded support EM-X270 and the only thing you need is to place local.conf from CompuLab package to /stuff/build/conf/local.conf:

cp /path/to/x270-em-linux/oe/build/conf/local.conf /stuff/build/conf

Another possibility is to use all OpenEmbedded related files from CompuLab Linux package for EM-X270:

cp -r /path/to/x270-em-linux/oe/* /stuff/

Now you are ready to build Linux images for EM-X270:

cd /stuff/build
bitbake x11-image

After some time the image will be created and put into /stuff/build/tmp/deploy/glibc/images/em-x270 directory. Default configuration creates two types of images: tar, and jffs2. The jffs2 image can be transfered to the EM-X270 on-board NAND flash. The tar archive can be extracted to some directory on the host workstation, and this directory can be used as networked root filesystem for the device.

Known problems and limitations

  • Wireless LAN sometimes disconnects from Access Point

See also