Difference between revisions of "Angstrom Linux for EM-X270"

From Compulab Mediawiki
Jump to: navigation, search
(oe)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction ==
+
#REDIRECT [[EM-X270: Linux: Angstrom]]
 
 
The run-time Linux image for EM-X270 is based on Angstrom Linux 2007.1. The [http://www.compulab.co.il/x270em/download/x270-em-linux.zip 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 ===
 
 
 
* {{filename|LiveDisk.zip}} - archive contains files for USB LiveDisk.
 
* {{filename|em_x270.img.bz2}} - ready to run image for EM-X270 NAND flash.
 
* {{filename|angstrom-em-x270.tar.bz2}} - archive of root file system
 
 
 
=== kernel ===
 
 
 
* {{filename|uImage-2.6.23-em-x270}} - ready to run Linux kernel image for EM-X270
 
* {{filename|linux-2.6.23-em-x270.config}} - Linux kernel 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
 
 
 
=== oe ===
 
 
 
The {{filename|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 [http://wiki.openembedded.net/index.php/Documentation OpenEmbedded documentation] for further details.
 
 
 
* {{filename|build/conf/local.conf}} - configuration file used to build Angstrom Linux image for EM-X270
 
* {{filename|org.openembedded.dev/conf/machine/em-x270.conf}} - machine definition file
 
* {{filename|org.openembedded.dev/packages/linux/em-x270_2.6.23.bb}} - recipe to build Linux kernel for EM-X270
 
* {{filename|org.openembedded.dev/packages/linux/em-x270-2.6.23/}} - files needed to build Linux kernel for EM-X270
 
 
 
=== utilities ===
 
 
 
{{filename|utilities}} directory contains miscellaneous utilities useful for development
 
 
 
* {{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|patches/}} - patches used by the fixup-angstrom.sh
 
* {{filename|updater/}} - sources of EM-X270 updater application
 
 
 
== Package management on EM-X270 ==
 
Angstrom Linux on EM-X270 includes {{cmd|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 {{filename|/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 {{filename|/etc/ppp/gprs-connect}}, {{filename|/etc/ppp/gprs-options}} and {{filename|/etc/ppp/pap-secrets}} files.
 
 
 
----
 
'''/etc/ppp/gprs-connect'''
 
<pre>
 
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        ''
 
</pre>
 
----
 
 
 
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 {{filename|/etc/ppp/pap-secrets}} (both are '''a''' in the below example):
 
 
 
----
 
'''/etc/ppp/pap-secrets'''
 
<pre>
 
# Secrets for authentication using PAP
 
# client server secret IP addresses
 
  'a' * 'a' *
 
</pre>
 
----
 
 
 
It is important to set the '''user''' field of {{filename|/etc/ppp/gprs-options}} to the same username.
 
 
 
=== GPS reciever ===
 
 
 
GPS reciever is connected to STUART of PXA270 processor and can be accessed through {{filename|/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
 
 
 
<pre>
 
echo 1 > /sys/devices/platform/wlan/pwr_on
 
modprobe bgw200
 
iwconfig eth1 essid <your_ESSID>
 
</pre>
 
 
 
You can use Linux standard {{cmd|iwconfig}}, {{cmd|iwscan}}, {{cmd|iwevent}}, {{cmd|iwgetid}}, {{cmd|iwlist}}, {{cmd|iwpriv}}, {{cmd|iwspy}} utilities.
 
 
 
=== 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
 
 
 
<pre>
 
su
 
cmd_line=`fw_printenv boot_angstrom | cut -d= -f2- | \
 
          sed 's/setenv bootargs/setenv bootargs display=vga/'`
 
fw_setenv boot_angstrom $cmd_line
 
</pre>
 
 
 
If you would like to use mouse rather than touchscreen, you should edit the {{filename|/etc/matchbox/session}} file and change {{parameter|"-use_cursor no"}} to {{parameter|"-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:
 
 
 
<pre>
 
/sys/devices/platform/wlan/pwr_on
 
/sys/devices/platform/gps/pwr_on
 
/sys/devices/platform/gprs/pwr_on
 
</pre>
 
 
 
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:
 
 
 
<pre>
 
echo 1 > /sys/devices/platform/gprs/pwr_on
 
</pre>
 
 
 
== 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. [http://www.openembedded.org/index.php/Getting_Started Getting Started] page of OpenEmbedded documentation describes the installation process.
 
 
 
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 and the only thing you need is to place {{filename|1=local.conf}} from CompuLab package to {{filename|1=/stuff/build/conf/local.conf}}:
 
 
 
<pre>
 
cp /path/to/x270-em-linux/oe/build/conf/local.conf /stuff/build/conf
 
</pre>
 
 
 
Another possibility is to use all OpenEmbedded related files from [http://www.compulab.co.il/x270em/download/x270-em-linux.zip CompuLab Linux package for EM-X270]:
 
 
 
<pre>
 
cp -r /path/to/x270-em-linux/oe/* /stuff/
 
</pre>
 
 
 
Now you are ready to build Linux images for EM-X270:
 
 
 
<pre>
 
cd /stuff/build
 
bitbake x11-image
 
</pre>
 
 
 
After some time the image will be created and put into {{filename|1=/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 ==
 
* [[Getting started with Linux on EM-X270]]
 
* [http://www.kernel.org The Linux Kernel Archives]
 
* [http://www.arm.linux.org.uk/ The ARM Linux Project]
 
* [http://www.linux-mtd.infradead.org/ Memory Technology Device (MTD) Subsystem for Linux]
 
* [http://www.angstrom-distribution.org Angstrom Distribution]
 
* [http://www.openembedded.org OpenEmbedded]
 
* [http://pokylinux.org Poky Linux]
 

Latest revision as of 15:41, 22 December 2009