Difference between revisions of "Angstrom Linux for EM-X270"
m (1 revision(s)) |
(→utilities) |
||
Line 26: | Line 26: | ||
=== kernel === | === kernel === | ||
− | * {{filename|uImage-2.6.23-em-x270}} - ready to run Linux kernel 2.6.23 image for EM-X270 | + | * {{filename|2.6.23/uImage-2.6.23-em-x270}} - ready to run Linux kernel 2.6.23 image for EM-X270 |
− | * {{filename|linux-2.6.23-em-x270.config}} - Linux kernel 2.6.23 configuration file | + | * {{filename|2.6.23/linux-2.6.23-em-x270.config}} - Linux kernel 2.6.23 configuration file |
− | * {{filename|linux-2.6.23-em-x270.pacth}} - patch vs. [http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 Linux kernel 2.6.23] with support for EM-X270 peripherals | + | * {{filename|2.6.23/linux-2.6.23-em-x270.pacth}} - patch vs. [http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 Linux kernel 2.6.23] with support for EM-X270 peripherals |
− | * {{filename|uImage-2.6.26-em-x270}} - ready to run Linux kernel 2.6.26 image for EM-X270 | + | * {{filename|2.6.26/uImage-2.6.26-em-x270}} - ready to run Linux kernel 2.6.26 image for EM-X270 |
− | * {{filename|linux-2.6.26-em-x270.config}} - Linux kernel 2.6.26 configuration file | + | * {{filename|2.6.26/linux-2.6.26-em-x270.config}} - Linux kernel 2.6.26 configuration file |
− | * {{filename|linux-2.6.26-em-x270.pacth}} - patch vs. [http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2 Linux kernel 2.6.26] with support for EM-X270 peripherals | + | * {{filename|2.6.26/linux-2.6.26-em-x270.pacth}} - patch vs. [http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2 Linux kernel 2.6.26] with support for EM-X270 peripherals |
+ | * {{filename|wifi/gspi.ko}} - Marvell GSPI wifi driver for 2.6.26 Linux kernel | ||
+ | * {{filename|wifi/gspi8xxx.ko}} - Marvell GSPI wifi driver for 2.6.26 Linux kernel | ||
=== oe === | === oe === | ||
Line 38: | Line 40: | ||
* {{filename|build/conf/local.conf}} - configuration file used to build Angstrom Linux image for EM-X270 | * {{filename|build/conf/local.conf}} - configuration file used to build Angstrom Linux image for EM-X270 | ||
− | * {{filename|org.openembedded. | + | * {{filename|org.openembedded.stable/conf/machine/cl-xscale.conf}} - machine definition file |
− | * {{filename|org.openembedded. | + | * {{filename|org.openembedded.stable/packages/linux/cl-xscale_2.6.23.bb}} - recipe to build Linux kernel for EM-X270 |
− | * {{filename|org.openembedded. | + | * {{filename|org.openembedded.stable/packages/linux/cl-xscale-2.6.23/}} - files needed to build Linux kernel for EM-X270 |
=== utilities === | === utilities === | ||
Line 48: | Line 50: | ||
* {{filename|create_image.sh}} - the script creates an image compatible with EM-X270 updater application | * {{filename|create_image.sh}} - the script creates an image compatible with EM-X270 updater application | ||
* {{filename|fixup-angstrom.sh}} - the script used to update several configuration files in the Angstrom Linux image '''before''' deploying the image to the device | * {{filename|fixup-angstrom.sh}} - the script used to update several configuration files in the Angstrom Linux image '''before''' deploying the image to the device | ||
− | * {{filename|patches/}} - patches used by the fixup-angstrom.sh | + | * {{filename|install_modules.sh}} - the script builds and then installs kernel modules (used in create_image.sh) |
+ | * {{filename|install_utils.sh}} - the script builds utilities, using OE's devshell, and installs them (also used in create_image.sh) | ||
+ | * {{filename|patches/}} - patches used by the fixup-angstrom.sh (also contains firmware for Marvell wifi adapter) | ||
* {{filename|updater/}} - sources of EM-X270 updater application | * {{filename|updater/}} - sources of EM-X270 updater application | ||
+ | * {{filename|examples/}} - some application examples for EM-X270 | ||
+ | * {{filename|uboot-env/}} - sources of utility for accessing U-Boot environment ({{filename|fw_printenv}}, {{filename|fw_setenv}}) | ||
== Package management on EM-X270 == | == Package management on EM-X270 == | ||
Line 96: | Line 102: | ||
=== Wireless LAN === | === Wireless LAN === | ||
Wireless LAN on EM-X270 supports 802.11b. Currently Angstrom Linux for EM-X270 does not enable this interface automaticaly. | 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 | + | 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 {{filename|kernel/wifi}} directory of the Angstrom Linux package). The driver uses chip/bus specific firmware (also redistributed in binary form), which should reside in {{filename|/lib/firmware/}} and is loaded automatically by the driver. The driver is called gspi and can be enabled using |
<pre> | <pre> | ||
echo 1 > /sys/devices/platform/wlan/pwr_on | echo 1 > /sys/devices/platform/wlan/pwr_on | ||
− | modprobe | + | modprobe gspi8xxx |
iwconfig eth1 essid <your_ESSID> | iwconfig eth1 essid <your_ESSID> | ||
</pre> | </pre> | ||
− | You can use Linux standard {{cmd|iwconfig}}, {{cmd|iwscan}}, {{cmd|iwevent}}, {{cmd|iwgetid}}, {{cmd|iwlist}}, {{cmd|iwpriv}}, {{cmd|iwspy}} utilities. | + | You can use Linux standard {{cmd|iwconfig}}, {{cmd|iwscan}}, {{cmd|iwevent}}, {{cmd|iwgetid}}, {{cmd|iwlist}}, {{cmd|iwpriv}}, {{cmd|iwspy}}, {{cmd|wpa_supplicant}} utilities. |
+ | |||
+ | === Bluetooth === | ||
+ | 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 [http://wiki.bluez.org/wiki/HOWTO Official Linux Bluetooth HOWTOs page]. | ||
=== VGA display === | === VGA display === | ||
− | EM-X270 with EB-X270 extender board supports connection of standard VGA display. To direct graphics output to VGA append {{parameter|"display=vga"}} to kernel command line. Tap keyboard icon on the panel, tap "Other" -> "Terminal", and in the terminal window do | + | EM-X270 with EB-X270 extender board supports connection of standard VGA display. To direct graphics output to VGA append {{parameter|1="display=vga"}} to kernel command line. Tap keyboard icon on the panel, tap "Other" -> "Terminal", and in the terminal window do |
<pre> | <pre> | ||
Line 145: | Line 154: | ||
Here we assume that you followed the [http://www.openembedded.org/index.php/Getting_Started Getting Started] instructions and you have the same directory structure. | Here we assume that you followed the [http://www.openembedded.org/index.php/Getting_Started 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 | + | 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 {{filename|1=local.conf}} from CompuLab package to {{filename|1=/stuff/build/conf/local.conf}}: | ||
<pre> | <pre> | ||
Line 151: | Line 162: | ||
</pre> | </pre> | ||
− | + | and the machine configuration file {{filename|cl-xscale.conf}} from CompuLab package to {{filename|/stuff/your branch/conf/machine/cl-xscale.conf}} | |
+ | |||
+ | <pre> | ||
+ | cp /path/to/x270-em-linux/oe/org.openembedded.stable/conf/machine/cl-xscale.conf /stuff/your branch/conf/machine | ||
+ | </pre> | ||
+ | |||
+ | or you can use all OpenEmbedded related files from [http://www.compulab.co.il/x270em/download/x270-em-linux.zip CompuLab Linux package for EM-X270]: | ||
<pre> | <pre> | ||
Line 164: | Line 181: | ||
</pre> | </pre> | ||
− | After some time the image will be created and put into {{filename|1=/stuff/build/tmp/deploy/glibc/images/ | + | After some time the image will be created and put into {{filename|1=/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. |
== Known problems and limitations == | == Known problems and limitations == | ||
− | |||
− | |||
== See also == | == See also == |
Revision as of 14:48, 24 December 2008
Contents
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
- 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
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.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
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
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 (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.
Bluetooth
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.
VGA display
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"
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 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.