Angstrom Manual
Angstrom Manual
Angstrom Manual
– Embedded Power –
1 [email protected]
2 [email protected]
CONTENTS CONTENTS
Contents
Thanks 1
License 2
I History 3
II Installation 5
1 Warnings 6
2 Installation options 7
3 Loopback Image 8
3.1 Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 LiveRam Disks 10
4.1 Interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 The Linux Boot Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 Easy Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4 Hard Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4.1 In Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4.2 In Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4.2.1 The Python Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4.2.2 The Outfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.2.3 HaRET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.2.4 zImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.2.5 Initrd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.2.6 The Startup Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.2.7 Automatizing The Task . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.5 Kexecboots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.5.1 Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.5.2 Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.5.2.1 Overriding the Default Version . . . . . . . . . . . . . . . . . . . . . . 15
4.5.2.2 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.5.3 Role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
i
CONTENTS CONTENTS
6 Hardware 21
6.1 Supported Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.1.1 Installation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.1.2 List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7 After Installation 24
7.1 First Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.1.1 Security Before Everything . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.1.2 Internationalization and Localization . . . . . . . . . . . . . . . . . . . . . . . . 24
7.1.2.1 Two Main Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.1.2.2 Locale and Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
III Building 27
9 Introduction 31
10 Packaging System 32
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
10.2 Core Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
10.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
10.4 Selecting Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
10.5 Format of Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
10.6 Sw. fr. Cons. Img. to X Serv. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
11 Use 35
11.1 The User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
11.2 Checking the Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
11.3 Global Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
11.3.1 Basic Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
11.3.2 With USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
11.3.2.1 On the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
11.3.2.2 On the Slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
11.3.3 With Bluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
11.3.4 With WiFi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
11.3.4.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
11.3.4.2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
ii
CONTENTS CONTENTS
11.3.4.3 WEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
11.3.4.4 WPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
11.3.4.5 Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
11.3.5 Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
11.4 Errors You Could Encounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
iii
CONTENTS CONTENTS
Thanks
(Luca Merciadri) would sincerely want to thanks Andrea Adami for his information about
I kexec-stuff, Yuri Bushmelev for his details on kexec-stuff, Gregory Graeme for his first answer,
Kooi Koen for his idea of setting up a seperate git repo on the Ångström site or gitorious, and
modifying it slightly, Lex Landa for his investment about hx4700, and for his precious help (in
particular: Section 10.2, p. 32, Subsections 4.5.1, 4.5.2, 4.5.2.1, resp. 15, p. 15, p. 15), Kelly Price for
his info about the kexecboot kernels.
1
License
he Angström Manual is under Creative Commons (CC) BY-SA license. In this, BY and SA globally
T mean ([3, 4]) that others can remix, tweak, and build upon our work, even for commercial
reasons, as long as others credit us and license their creations under the identitcal terms. All new
works based on this will carry the same license, so any derivatives will also allow commercial use.
You are thus free to
1. You must attribute the work in the manner specified by Luca Merciadri,
2. If you alter, transform, or build upo, this work, you may distribute the resulting work only
under the same, similar or a compatible license.
Any of the above conditions can be waived if you get permission from Luca Merciadri, as Luca
Merciadri holds the copyright.
In no way are any of the following rights affected by the license:
• Rights other persons may have either in the work itself or in how the work is used, such as
publicity or private rights.
http://creativecommons.org/licenses/by-sa/3.0/legalcode.
History
3
Ångström was started by a small group of people who worked on the OpenEmbedded,
OpenZaurus and OpenSimpad projects to unify their effort to make a stable and user-friendly
distribution for embedded devices like handhelds, set top boxes and network-attached storage
devices and more.
OpenEmbedded is used by Ångström but Ångström is not OpenEmbedded Ångström.
4
Part II
Installation
5
CHAPTER 1. WARNINGS
CHAPTER 1
Warnings
efore beginning to speak about Ångström, here are some problems you could encounter when
B trying it:
1. Installing Ångström could result in a bricked device, with the consequences of this: your
device could be completely unuseful.
3. Trying Ångström on older PocketPC, Windows Mobile and Windows CE devices is not without
any danger: it erases the content of the RAM. If you want to exit Ångström, you are obliged to
proceed to a hard-reset. The result of this hard-reset is that you lose all your personal data,
programs, etc. After hard-resetting your device, you will find your system, in the same state as
when you first booted your device after having bought it.
These things being said, enjoy reading this, and try Ångström on your embedded device!
6
CHAPTER 2. INSTALLATION OPTIONS
CHAPTER 2
Installation options
3. Using a loopback image. Like the external storage option, but using a monolithic file.
These options are highly device dependent, so the instructions are broken down per device
group.
7
CHAPTER 3. LOOPBACK IMAGE
CHAPTER 3
Loopback Image
Contents
3.1 Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1 Use
ccording to [6] and to my tests, the use of a loopback image for Ångström is done by following
A these steps:
1. Once you are in http://www.angstrom-distribution.org/releases/2007.12/images/,
2. Download two files:
(a) a .img.bz2 one;
(b) a .exe one,
3. Place them on an extension card, in the same (root) directory,
4. Launch from your OS the .exe file,
5. Choose the .img.bz2 image once Ångström will have asked you which image it should use,
by
(a) Naviguating between images with the “physical” arrows of your device (if so),
(b) Pressing between the four “physical” arrows of your device (to confirm, if so).
3.2 Interest
Once these steps have been performed, Ångström will be executed. If you choose to read the image
from your extension card (and it should be so), all the things you will modify under Ångström (i.e.
new sessions, etc.), will be written on the extension card.
8
CHAPTER 3. LOOPBACK IMAGE 3.2. INTEREST
Consequently, even if you hard-reset the device, doing all the given steps will, if you have already
tried Ångström at least once, using the same extension card as the one you are using now, let you
use the session you defined, all your parameters being written in the memory of your extension
card.
9
CHAPTER 4. LIVERAM DISKS
CHAPTER 4
LiveRam Disks
Contents
4.1 Interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 The Linux Boot Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 Easy Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4 Hard Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.5 Kexecboots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1 Interest
iveRam Disks is an interesting way to try Ångström without any great danger1 (as you only lose
L personal data and programs, i.e. internal configuration). However, all the changes you will do
will not be kept.
A LiveRam Disk is simply a .exe file which can be executed from the File Explorer of your
Windows Mobile Edition.
It should be clear in your mind that these LiveRam Disks are less interesting for the developers;
as a result, they are less “up-to-date.” If you want to use up-to-date LiveRam Disks, you will have
to do some tricky things which will be given in 4.4, p. 11.
We shall give the important info about these two possibilities. To simplify the presentation, we
shall denote by “easy version” a version which is directly available on a website, and which is ready
to execute, on the opposite of “hard versions,” whose file is the result of a compilation of different
files.
We begin by a rough explanation about how Linux boots.
10
CHAPTER 4. LIVERAM DISKS 4.3. EASY VERSIONS
1. A boot loader finds the kernel image on the disk, loads it into memory, and starts it,
6. The last processes that init starts as part of the boot sequence allow you to log in.
Angstrom-x11-image-liveramdisk-2007.12-hx4700.exe
You simply use such a file by launching it in the WM File Explorer. That is really straightforward.
4.4.1 In Theory
To build this exe file, there is a Python script. It is called make-bootbundle.py. Its usage is described
by:
2. <outfile>: the name of the file you will launch in the WM File Explorer.
To understand what they mean, you need some basic knowledge in Linux/UNIX systems which
will not be detailed here. That is a prerequisite.
2 In the http://www.angstrom-distribution.org/releases/2007.12/images/hx4700/ directory.
3 (See http://www.mail-archive.com/[email protected]/msg02710.html.)
11
CHAPTER 4. LIVERAM DISKS 4.4. HARD VERSIONS
4.4.2 In Practice
Practically, you may wonder how all these files can be found, as, even with some searches on the
Internet, you may still be wondering where they are.
#!/usr/bin/env python
import sys
import os
import stat
import struct
import getopt
import re
if len(args) != 4:
print "make-bootbundle - Make a standalone HaRET boot bundle with kernel and initrd"
print "Usage: make-bootbundle.py -o <outfile> <path to haret.exe> <zImage> <initrd> <script>"
sys.exit(0)
outfile = opts["-o"]
exe.seek(0, 2)
exe.write("HARET1\0\0")
exe.write(struct.pack("i", kernelSt[stat.ST_SIZE]))
exe.write(struct.pack("i", initrdSt[stat.ST_SIZE]))
exe.write(struct.pack("i", scriptSt[stat.ST_SIZE]))
exe.write(struct.pack("i", 0))
exe.write(struct.pack("i", 0))
exe.write(struct.pack("i", 0))
exe.close()
if opts.has_key("-v"):
haretSt = os.stat(args[0])
print "HaRET:\t", haretSt[stat.ST_SIZE]
print "Kernel:\t", kernelSt[stat.ST_SIZE]
print "Initrd:\t", initrdSt[stat.ST_SIZE]
print "Script:\t", scriptSt[stat.ST_SIZE]
print "Header:\t", 8 + 4*6
print "-------------"
print "Total:\t", \
haretSt[stat.ST_SIZE] + kernelSt[stat.ST_SIZE] + \
initrdSt[stat.ST_SIZE] + scriptSt[stat.ST_SIZE] + 8 + 4*6
12
CHAPTER 4. LIVERAM DISKS 4.4. HARD VERSIONS
4.4.2.3 HaRET
The HaRET bootloader is already an old thing: it was also used in Familiar. The latest one4 is
haret-0.5.2.exe.
4.4.2.4 zImage
The easiest thing is to use the Narcissus image generator5 from Ångström’s website. It will generate
a file like6 hx4700-full-x11-image-hx4700.tar.bz2 for the hx4700. You then go to its folder
named boot, and extract the corresponding zImage. For example, it is here zImage-2.6.21-hh20.
Its numbering is the kernel’s numbering, as the zImage is the kernel.
4.4.2.5 Initrd
The initrd file is under the form of a .cpio.gz. For example, its current name is initramfs.cpio.gz.
You can use the following bash script to make the initrd (thanks to Lex Landa for this):
#!/bin/sh
# Execute this from the initrd root dir.
su
find . | cpio -o -H newc | gzip -9 > ../initramfs.cpio.gz
13
CHAPTER 4. LIVERAM DISKS 4.4. HARD VERSIONS
#!/bin/sh
dt="‘date +%d%m%y-%H%M%S‘"
What it actually does is use the predefined files, and give a date-related name to the boot bundle
file (i.e. the .exe that you will execute from the WM File Explorer).
You can evidently modify it as you want.
4.4.3 Summary
You will find here a summary of all these files. I suggest you to download them at the place of
copying the code of this booklet, as, for Python scripts, indentation is important, and it could be
broken by the output of this document.
or http://www.student.montefiore.ulg.ac.be/~merciadri/angstrom/files/haret-0.5.2.exe
If you use such a LiveRam Disk, Linux should boot in something like 10 seconds.
14
CHAPTER 4. LIVERAM DISKS 4.5. KEXECBOOTS
4.5 Kexecboots
4.5.1 Credits
Yuri Bushmelev, Thomas Kunze and Matthew Allum are the authors of the kexecboot.
4.5.2 Building
The OpenEmbedded (http://www.openembedded.org) system is used to build kexecboot. Please
see the “Getting Started” for this, for example at
http://wiki.openembedded.net/index.php/Getting_started
document for instructions when setting up OpenEmbedded. Please ensure that you have updated
your OpenEmbedded tree recently (do
git pull
bitbake linux-kexecboot -b \
../openembedded/recipes/kexecboot/linux-kexecboot_2.6.32.bb
for 2.6.32. This will build kexecboot with a 2.6.32 kernel. Depending on the options specified in
conf/local.conf, the kexecboot files may be written in a variety of formats.
There are other kexecboot recipe files, such as (2010):
initramfs-kexecboot-image.bb
kexecboot-cfg_0.1.bb
kexecboot_git.bb
linux-kexecboot_2.6.21-hh20.bb
linux-kexecboot_2.6.24.bb
linux-kexecboot_2.6.26.bb
linux-kexecboot_2.6.29.bb
linux-kexecboot_2.6.32+2.6.33-rc3.bb
linux-kexecboot_2.6.32.bb
More specifically, the bitbake process consists of downloading and building the cross-
compiler toolchain, native toolchain and kernel, and building the cpio-format initramfs image
(linux-kexecboot-image) for the kexecboot system. This image is used as a ramdisk-based root
filesystem, and its purpose is to mount one or more filesystems, locate the replacement kernel (and
root filesystem) and call the kexecboot kernel routine to replace the kernel.
Before the kernel is built, any patches are downloaded and applied, depending on the machine
type which is selected. The kernel image is compressed and written, along with the initramfs
filesystem.
15
CHAPTER 4. LIVERAM DISKS 4.5. KEXECBOOTS
The kexecboot kernel’s command line arguments are set in the default recipe file, i.e.
recipes/kexecboot/linux-kexecboot.inc. The CMDLINE variable is set conditionally, depending
on the platform (any, poodle, akita, collie, spitz and hx4700). The default kernel configuration
is read from file defconfig and in the do_configure_append() section, some edits are made to
remove various configure options, and add others. CONFIG_BLK_DEV_INITRD and CONFIG_KEXEC are
enabled, and the initramfs source file is set to initramfs.cpio.gz. Kernel modules are disabled
and the kernel is built with the configuration in file .config.
The require line in linux-kexecboot.inc includes ../linux/linux.inc, which builds the
kexecboot kernel. Conditional tests decide whether OABI or EABI support should be included, set
the Linux logo type, Thumb instruction set support, endianness and other options.
The kernel name is set with the following lines:
KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${PV}-${PR}-${MACHINE}"
KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}"
Where is KERNEL IMAG
set?
The do_stage() and do_install() steps are set to empty functions, meaning that they will
have no effect: the kernel and initramfs are built only, and no other actions occur. The generated
images will be written in various locations Which locations?
Hardware : Sharp-Collie
The line is checked for a colon and if found, Sharp-Collie would be appended to the zImage- string,
so /mnt/boot/zImage-Sharp-Collie is looked for.
4.5.2.2 Remarks
4.5.3 Role
A kexecboot kernel is, in a more precise way, a kernel that has the kexec feature called; this feature can
load other, normal kernels in and boot into them. This allows the main kernel used in Ångström to
be upgraded without flashing the device whole. The kexecboot kernel needs to be small and slim
enough that it can fit into the NAND, yet be able to handle the managing RAM initdisk used to
find and select the new kernel to boot off of. It should also (in minimal variant) have support all
’bootable’ storages (NAND, CF, SD/MMC, etc).
Similar projects include “Two Kernel Monte” and CoreBoot.
Kexecboot development was started to solve following problems:
16
CHAPTER 4. LIVERAM DISKS 4.5. KEXECBOOTS
1. Zauruses with default bootloader and MTD partitioning have only 1.2 Mb of free space in
NAND to hold kernel. Modern kernels are too big to fit into that constraints without significal
loss in features (even with separate modules),
2. Some devices (such as Zauruses) have no possibility to boot from other media (SD/MMC/CF)
with default bootloader.
2. check that the partition’s filesystem is known (according to fstype.c from klibc and
/proc/filesystems),
(a) if boot.cfg is found, then parse it and do some additional things (load custom icon for
example);
(b) if boot.cfg is not found, then check for default kernels (/boot/zImage, /zImage),
Kexecboot binary can be started as non-init process too, so you can run it in your own image at any
time too.
Latest kexecboot release was 0.5. The development version is 0.6.
4.5.5 Consequences
As the kexecboot kernel embeds a very limited initramfs, it contains just a couple of static binaries
(kexec and kexecboot). Kexec is the tool (see kexec-tools), kexecboot is the “init,” a custom-purposed
binary launching kexec with appropriate args. The name “kexecboot” was given by the author of
the project.
So, if you want to create a standard “liveramdisk” image, just enable kexec during the config of
the kernel and deploy kexec-tools in your image.
4.5.6 Screenshots
Here are pictures (taken from [2]) of a v0.4 kexecboot.
17
CHAPTER 4. LIVERAM DISKS 4.5. KEXECBOOTS
(a)
(b)
No
Two
bootable
par-
par-
ti-
ti-
tions
tions
from
found.
SD-
card.
18
CHAPTER 5. DIFF. IMG. FOR DIFF. PURP.
CHAPTER 5
ccording to [5], there are different types of images. They are represented at Table 5.1.
AName Description
base-image Very minimal system without GUI. SSH login over built-in networking
(usbnet, ethernet port, . . . ). This is indended for headless devices
with very small amount of flash (like routers) or for special-purpose installs
(such as standalone portable servers, automation controllers, data loggers, etc.).
console-image Usable system without GUI. Can connect to net via BT/WiFi/USB.
Should handle devices connected via CF or USB Host.
minimal-gpe-image Very minimal system with X11 GUI, on which you may install
software you need. Suitable for devices with minuscule amount of flash and for
DIY fans. NOT suitable for first-time users.
x11-image Like console-image but with X11 environment.
x11-gpe-image x11-image with GPE PIM suite preinstalled.
x11-pimlico-image x11-image with OpenedHand Pimlico PIM suite
preinstalled (VGA screen is recommended).
x11-office-image x11-image with GNOME Office preinstalled
(Abiword, Gnumeric, etc.).
Table 5.1: Different types of images for Ångström, for different purposes.
Images like x11-gpe and big are provided for selected devices which come with large secondary
storage (like Microdrives). If there are no such images for your device, you do not lose anything:
you can easily install any software you need from the feeds.
If you are in doubt which image to choose, use x11-image: it is intended as a starting point for
majority of users, offering basic GUI tools to control the device and devoid of application software
which not every user may need, thus offering good compromise between usability, size required,
and free space available.
5.1 Formats
There are also different formats for each image. They are summarized at Table 5.2.
19
CHAPTER 5. DIFF. IMG. FOR DIFF. PURP. 5.1. FORMATS
Extension Description
.tar.gz, .tar.bz2, .cpio.gz Archived root filesystem (rootfs), suitable
for installing to a secondary storage by
simply unpacking (the secondary storage
must be already formatted appropriately,
usually with ext2 filesystem)
.ext2, .ext2.bz2, .img,img.bz2 Integral filesystem image, which can be
copied (e.g. using dd)
to a secondary storage partition directly.
.jffs2 Flash image, which can be flashed
to internal flash ROM of the specific device
.summary.jffs2 Same as .jffs2, but with extended “summary”
information allowing to mount flash filesystem quicker.
(Suggested if space allows.)
.exe Executables for WinCE devices.
Bigger files are LiveRam Disks,
Smaller files are bootmanagers (see Chapter 3, p. 8)
zImage Standalone kernel image for ad-hoc boot-loaders
Table 5.2: Different formats of images for Ångström, for different purposes.
20
CHAPTER 6. HARDWARE
CHAPTER 6
Hardware
nfortunately, embedded devices vary greatly in their architecture and system software, and
U as of now, no generic installation procedure suitable for all of them is available.
6.1 Supported Devices
6.1.1 Installation Procedure
Here are the devices which are known to be supported:
(a) kexecboot: For the Zaurus, a special “kernel+initramfs” has been developed. This special-
purpose kernel is small enough to be flashed on NAND and features a framebuffer
graphical menu for the selection of boot media containing the kernel to be kexec’ed.
Multi-partition cards and lots of filesystems are supported. The kernels to be launched
are searched for in /boot of each available partition. There is a also a configuration file
(/boot/boot.cfg) which allows selection of other kernels, custom kernel command lines,
and specifies the label and the icon for each instance;
(b) How to install: Just unpack zaurus-installer-YOURMACHINE.tar.gz on a free (FAT
or EXT2/3 formatted) partition: the package contains the kexecboot-kernel and the
updater.sh utility. Then proceed as usual for flashing (switch off, pull battery out, insert
battery again, before inserting AC plug, press OK and Power On. In the Japanese Menu
select “4” and finally “3” for SD card or “4” for CF). See Figure 6.1.1 for a screenshot;
(c) For the SL-5500 (collie) and optionally for other Zaurus too, flashing is possible just
using the routines of the original firmware: reset the unit, Press “C” and “D” buttons
during restart. That is specialized. For this, please read http://linuxtogo.org/gowiki/
CollieInstall;
(d) If you want a rootfs in NAND, this must be in the .jffs2 format. Just rename
your-image-rootfs.jffs2 to initrd.bin and copy it on the card with updater.sh.
The image will be flashed on mtd2,
21
CHAPTER 6. HARDWARE 6.1. SUPPORTED DEVICES
2. Sharp Zaurus family (old method, kernel in NAND). Please follow the following links,
according to your device:
6.1.2 List
Roughly speaking, the following devices are supported:
1. Acer n50,
2. Beagle Boards,
4. HP’s
(a) h1940;
(b) h2200, but you may read this: http://www.angstrom-distribution.org/ipaq-h2200-series;
(c) h3900;
(d) h4000;
(e) h63xx;
(f) hx2000;
(g) hx4700 (one of the devices amongst the most supported ones);
(h) rx1950;
(i) rx3000;
(j) rx3115,
6. iMate Jasjar,
22
CHAPTER 6. HARDWARE 6.1. SUPPORTED DEVICES
23
CHAPTER 7. AFTER INSTALLATION
CHAPTER 7
After Installation
2. Localization (l19n): Having support in the system for particular locality, from time and
monetary data to messages output by applications.
Ångström is targetted at the wide user community throughout the world, and consequently
provides good i18n and l19n support, with basic i18n support available out of the box with standard
X11 GUI images. As a contemporary Linux system, Ångström uses UTF-8 encoding. Ångström’s
images come with English UTF-8 locale (en_GB) which is suitable to get good i18n support. Make
sure that you select “English(Great Britain)” when logging into X11 session. You select the locale for
24
CHAPTER 7. AFTER INSTALLATION 7.1. FIRST STEPS
session when logging into X, “Language” dropdown. After Ångström install, it will contain two
choices: “English(C locale)” (just “English” in older builds) and “English(Great Britain).” Make sure
you avoid “English(C locale)” as it does not actually offer any i18n, limiting used charset to ASCII.
To get further regarding l19n support than generic i18n above, one needs to configure proper
locale for libc(C runtime library). As said earlier, Ångström’s images come with en_GB locale
preinstalled (and this was apparently not the best choice, as most people would expect en_US to be
default-available).
To install more libc locales, use packages with names locale-base-LL-VV, where LL is the
language code and VV is the variant code, both converted to lowercase. For example, you may use
Once the package has been installed, a new choice will be available in X11 login.
Some bugs are known with the Shell and the encodings.
25
CHAPTER 8. BUG TRACKING SYSTEM
CHAPTER 8
For the bug tracking system, please use BugZilla (http://bugs.openembedded.org/). That is the
easiest way to solve problems together.
26
Part III
Building
27
ll Ångström images are built using OpenEmbedded. We here describe the steps (coming
A from [8]) which are necessary to setup an environment where you can build images and
packages yourself. You may find more info for the needed packages on your host and possible
tweaks (SElinux, . . . ) at [9].
Here are the steps you need to do:
export OETREE="${HOME}/OE"
mkdir -p ${OETREE} && cd ${OETREE}
git clone git://git.openembedded.org/openembedded.git openembedded
cd openembedded
git checkout origin/stable/2009 -b stable/2009
cd ${OETREE}/openembedded
git pull
(a) Download
http://www.angstrom-distribution.org/files/source-me.txt
to ${OETREE};
(b) Setup local.conf for our needs:
mkdir -p ${OETREE}/build/conf
cp ${OETREE}/openembedded/contrib/angstrom/local.conf ${OETREE}/build/conf/
Optionally, you can open ${OETREE}/build/conf/local.conf in your favourite editor
and add:
MACHINE ?= "<your machine>"
where
"<your machine>"
is replaced with the machine you want to build for, such as
i. beagleboard for the OMAP3 beagleboard.org board,
ii. c7x0 for pxa25x zaurus clamshells (SL-C700, SL-C750, SL-C760, SL-C860, SL-7500),
iii. spitz for pxa27x zaurus clamshells with a microdrive (SL-C3000, SL-C3100, SL-
C3200),
iv. akita for pxa27x zaurus clamshells without a microdrive (SL-C1000),
v. tosa for the SL-C6000,
vi. h2200 for the iPAQ h2200 series,
vii. hx4700 for the iPAQ hx4700,
viii. fic-gta01 for the neo1973 phone;
You may also check
28
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/conf/machine?h=
stable/2009.
(c) Start building. Use
# set environment variables
source source-me.txt
#Go to the OE tree
cd ${OETREE}/openembedded
#Make sure it’s up to date
git pull --rebase
#Start building
# you can specify machine on the cmdline:
MACHINE=yourmachine bitbake base-image ; MACHINE=yourmachine bitbake console-image x11-image
# If you have set it in local.conf you can do:
bitbake base-image ; bitbake console-image x11-image
Building for a different machine or C library is just a matter of changing the MACHINE= or
ANGSTROMLIBC statement in local.conf to a new value. There is ABSOLUTELY no need for
using different directories for that; Angstrom takes care of all the details, it was specifically
designed for this.
29
Part IV
30
CHAPTER 9. INTRODUCTION
CHAPTER 9
Introduction
he Ångström system1 is a Linux distribution (distro) for embedded devices (PDAs, Beagleboards,
T Mobile Phones, etc.). The Ångström community was started by a group of people who worked
on the OpenEmbedded, OpenZaurus and OpenSimpad projects. They aim to create a stable, user
friendly linux distribution for embedded devices.
Using Linux on an embedded device is an interesting thing. Users of such devices are often
unsatisfied by the bad quality of the built-in OS’es and softwares on their embedded devices. Or
a Linux aficionados is always unhappy to use something else than an UNIX-based system. The
advantage of UNIX-based systems is well-known, and does not enter in the scope of this booklet.
For these reasons, there are now Linux-based distros for embedded devices.
31
CHAPTER 10. PACKAGING SYSTEM
CHAPTER 10
Packaging System
10.1 Introduction
s any modern distribution, Ångström is fully package-based. However, as interaction with
A the device during initial setup phase is difficult, Ångström is bootstrapped using an “image,”
which is essentially a set of core packages already merged into archive or filesystem image. This
image is installed using device-specific means, and provides basic Ångström functionality.
Adhering with the Ångström’s aim of flexibility and best practices of Linux system management,
the images provide only core packages, allowing users to customize system to their needs by easily
installing any required software from a wealth of Ångström’s feeds. However, as a convenience to
users, different kinds of images are provided, for example, with (core packages of) different GUI
environments pre-installed.
32
CHAPTER 10. PACKAGING SYSTEM 10.3. COMMANDS
10.3 Commands
• To look for a given package, you may have a look at
http://www.angstrom-distribution.org/repo/
opkg update
• To automatically upgrade every package which needs to be upgraded on your device, you
could use
opkg upgrade
/var/log/opkgupgrade.log
opkg list
• Once you know the name of the package you want to install, such as packagename, you then
use
to install it. If you have it on your disk, you can then use
If you want all its dependencies to be removed too, you then use
33
CHAPTER 10. PACKAGING SYSTEM 10.4. SELECTING PACKAGES
34
CHAPTER 11. USE
CHAPTER 11
Use
/etc/angstrom-version
uname -a
35
CHAPTER 11. USE 11.3. GLOBAL NETWORKING
ifconfig
ifconfig interfacename up
or
ifup interfacename
or
ifdown interfacename
net.ipv4.ip_forward = 1
to it, or replacing
net.ipv4.ip_forward = 0
by
net.ipv4.ip_forward = 1
if
36
CHAPTER 11. USE 11.3. GLOBAL NETWORKING
net.ipv4.ip_forward = 0
sysctl -p /etc/sysctl.conf
net.ipv4.ip_forward = 1
config_usb0=( "192.168.129.1" )
/etc/sysconfig/network/ifcfg-usb0
with
BOOTPROTO=’static’
STARTMODE=’auto’
USERCONTROL=’yes’
NAME=’Sharp Zaurus’
IPADDR=’192.168.129.1’
BROADCAST=’192.168.129.255’
NETMASK=’255.255.255.0’
NETWORK=’192.168.129.0’
PREFIXLEN=’’
modprobe g_ether
ifconfig -a
37
CHAPTER 11. USE 11.3. GLOBAL NETWORKING
should display some devices, but at least usb0. If necessary, you may run
ifup usb0
(if usb0 is already there, no need1 for it). You can then modify the IP stuff with either the GUI of
your front-end (X11, GPE, . . . ), or by appending
1. PPP over rfcomm was previously popular with PDAs like Palms and some WindowsMo-
bile/PocketPC/WinCE devices. It is not so efficient, but is useful if you are connecting the
device to a Windows computer. On the Ångström device you need to create the appropriate
files in /etc/ppp and then trigger the PPP connection using the command
(XXX being the profile); this then results in a ppp0 device appearing.
If the called device is correctly set up, the ppp0 device will end up with the correct IP address
and default route, and the local DNS resolver will probably also be set correctly, otherwise use
ifconfig ppp0
route add default gw x.x.x.x
to tweak settings,
pand -listen
38
CHAPTER 11. USE 11.3. GLOBAL NETWORKING
on the other where the xx’s are the parts of the MAC address of the other device (use
hciconfig -a
ifconfig bnep0
route add
), just as with any other network connection. You might also need to tweak /etc/resolv.conf on
the Ångström device so it can resolve names into IP addresses. It should be possible to create
a bnep0 entry in /etc/network/interfaces for this.
In both cases, it is likely that you are using the other end of the Bluetooth connection as a
gateway to allow the Ångström device to access the internet (e.g. access mail, browse the web, install
from software feeds). If the remote box is running Linux you may want to set up masquerading on
its external/outbound interface and thus allow the Ångström device to access hosts and networks
other than the gateway. Do not forget neither to turn on ipv4forwarding just as in Subsubsection
11.3.2.1, p. 36. The equivalent in Windows is “Internet Connection Sharing,” accessed through the
properties for the external interface.
modprobe hx4700-acx
modprobe acx debug=0
in a terminal before being able to use WiFi. If you do not want to modprobe specific modules
manually, you can add them in /etc/modules, just like in every normal UNIX system.
39
CHAPTER 11. USE 11.3. GLOBAL NETWORKING
11.3.4.2 Commands
Commands for WiFi are supposed to be known (iwconfig, iwlist, . . . ), as they are universal. Here
are some basic commands for you, if you are too lazy to have a look at man pages:
• List networks:
where scan can be replaced by scanning and where interface is often wlan0,
As in the other methods, you are also able to bring up the interface issuing
ifup interface
ifdown interface
where interface is often wlan0 (it can be verified using ifconfig). If iwconfig and related
commands are missing (your $PATH being correct, or after having tried with /sbin/iwconfig), be
sure to install the wireless-tools package.
For WEP/WPA/PSK, you need to edit /etc/network/interfaces, as explained in the following
lines.
11.3.4.3 WEP
Here is an example for WEP encryption:
11.3.4.4 WPA
Here is an example for WPA/PSK encryption:
40
CHAPTER 11. USE 11.4. ERRORS YOU COULD ENCOUNTER
#/etc/wp_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="(your SSID)"
proto=WPA
pairwise=TKIP
psk= (quoted text or hexadecimal number)
priority=1
}
(You may have a look at http://linux.die.net/man/5/wpa_supplicant.conf.) You also need to
install the package wpa_supplicant.
11.3.4.5 Drivers
There are roughly two different drivers:
1. hostap: supports WEP and WPA,
2. acx: supports WEP.
11.3.5 Firewall
Just like in every normal Linux distro, you may use the following trivial firewall:
iptables -P OUTPUT ACCEPT
iptables -P INPUT DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
To make this happen on boot-up, you may create a script with these lines, put it into
/etc/init.d/firewall, and make soft links to the script from the rc3.d and rc5.d directories.
41
CHAPTER 12. GETTING MORE HELP
CHAPTER 12
he objective of this booklet was to provide an easy way to find fresh info about Ångström.
T It is particularly difficult to find recent info on such a subject when the community is not
really big. Fortunately, despite being a small community, users are active. The principal concepts
are evoked here, and feel free to send an e-mail to any contributor (and to me) if there are any
interesting things to say which could be nice to put here. That being said, there are other websites
which you can find any other info on. For example, one can find some interesting information
in [5]. There is also the principal http://www.angstrom-distribution.org/ website, and the
mailinglist (see http://www.angstrom-distribution.org/contact and http://lists.linuxtogo.
org/pipermail/angstrom-distro-users/ for this).
42
INDEX INDEX
Index
.cpio.gz, 20 x11-office-image, 19
.exe, 20 x11-pilico-image, 19
.ext2, 20
.ext2.bz2, 20 zImage, 13, 14
.img, 20
.img.bz2, 20
.jffs2, 20
.summary.jffs2, 20
.tar.bz2, 20
.tar.gz, 20
base-image, 19
bootbundle, 14
bootmanager, 20
BugZilla, 26
console-image, 19
HaRET, 13, 14
i18n, 24
initramfs.cpio.gz, 13, 17
Initrd, see initramfs.cpio.gz
initrd, see initramfs.cpio.gz
kexecboot, 15
l19n, 24
LiveRam Disk, 10, 11, 20
Loopback image, 8
minimal-gpe-image, 19
x11-gpe-image, 19
x11-image, 19
43
BIBLIOGRAPHY BIBLIOGRAPHY
Bibliography
[3] C. Commons, Creative Commons – Attribution-Share Alike 3.0 Unported, 2009. http://
creativecommons.org/licenses/by-sa/3.0/.