EM-X270: Linux: Angstrom
- 1 Introduction
- 2 Package contents
- 3 Package management on EM-X270
- 4 EM-X270 specific device options
- 5 Power management
- 6 OpenEmbedded
- 7 Known problems and limitations
- 8 See also
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.
- 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
- 2.6.23/uImage-2.6.23-em-x270 - ready to run Linux kernel 2.6.23 image for EM-X270
- 2.6.23/linux-2.6.23-em-x270.config - Linux kernel 2.6.23 configuration file
- 2.6.23/linux-2.6.23-em-x270.pacth - patch vs. Linux kernel 2.6.23 with support for EM-X270 peripherals
- 2.6.26/uImage-2.6.26-em-x270 - ready to run Linux kernel 2.6.26 image for EM-X270
- 2.6.26/linux-2.6.26-em-x270.config - Linux kernel 2.6.26 configuration file
- 2.6.26/linux-2.6.26-em-x270.pacth - patch vs. Linux kernel 2.6.26 with support for EM-X270 peripherals
- wifi/gspi.ko - Marvell GSPI wifi driver for 2.6.26 Linux kernel
- wifi/gspi8xxx.ko - Marvell GSPI wifi driver for 2.6.26 Linux kernel
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.stable/conf/machine/cl-xscale.conf - machine definition file
- org.openembedded.stable/packages/linux/cl-xscale_2.6.23.bb - recipe to build Linux kernel for EM-X270
- org.openembedded.stable/packages/linux/cl-xscale-2.6.23/ - files needed to build Linux kernel for EM-X270
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
- install_modules.sh - the script builds and then installs kernel modules (used in create_image.sh)
- install_utils.sh - the script builds utilities, using OE's devshell, and installs them (also used in create_image.sh)
- patches/ - patches used by the fixup-angstrom.sh (also contains firmware for Marvell wifi adapter)
- updater/ - sources of EM-X270 updater application
- examples/ - some application examples for EM-X270
- uboot-env/ - sources of utility for accessing U-Boot environment (fw_printenv, fw_setenv)
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 is connected to BTUART of PXA270 processor and can be accessed through /dev/ttyS1 device node. In Angstrom Linux for EM-X270, it can be 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".
GSM/GPRS modem voice lines are connected to EM-X270 Audio Codec and can be accessed via the standard ALSA APIs. The Phone and Mono controls in alsamixer are used to control the incoming and outgoing volume respectively.
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.
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):
# 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 is connected to STUART of PXA270 processor and can be accessed through /dev/ttyS2 device node.
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 (see kernel/wifi directory of the Angstrom Linux package). The driver uses chip/bus specific firmware (also redistributed in binary form), which should reside in /lib/firmware/ and is loaded automatically by the driver. The driver is called gspi and can be enabled using
echo 1 > /sys/devices/platform/wlan/pwr_on modprobe gspi8xxx iwconfig eth1 essid <your_ESSID>
You can use Linux standard iwconfig, iwscan, iwevent, iwgetid, iwlist, iwpriv, iwspy, wpa_supplicant utilities.
EM-X270 has an on board CSR BlueCore4-ROM chipset with an on chip antenna. Currently Linux Kernel default hci_usb driver is used along with BlueZ 3.23 to operate the device. For various setup configurations and instructions please consult Official Linux Bluetooth HOWTOs page.
EM-X270 with EB-X270 extender board supports connection of standard VGA display. To direct graphics output to VGA append "display=vga" 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"
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
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 partially EM-X270. So you may have some of the settings described below already setup.
To configure OpenEmbedded you need to place the current build configuration file 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
and the machine configuration file cl-xscale.conf from CompuLab package to /stuff/your branch/conf/machine/cl-xscale.conf
cp /path/to/x270-em-linux/oe/org.openembedded.stable/conf/machine/cl-xscale.conf /stuff/your branch/conf/machine
or you can 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/cl-xscale 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.