Professional Documents
Culture Documents
Version numbers
About BSPs
Booting
User space
C library
System interface
Linux kernel
Generic services
Kernel space
Device drivers
Hardware
Embedded Linux Quick Start Guide
Kernel and user space
2.6.27.54
2.6.32.24
e.g. Beagleboard
Architecture
Board
COTS boards
Board support
Typical procedure is
tar xjf linux-2.6.34.tar.bz2
cd linux-2.6.34
patch -p 1 < ../linux-2.6.34-some_bsp.patch
cp ../some_bsp-kernel.config .config
make oldconfig
Kernel modules
Disadvantages
10
Kernel configuration
Files generated
.config
include/linux/autoconf.h
11
Make targets
Files generated
vmlinux
arch/arm/boot/zImage
arch/arm/boot/uImage
12
see Documentation/kernel-parameters.txt
Some examples
console: device to send kernel messages to, e.g.
console=ttyS0,115200
13
Busybox
14
15
Loaded from:
network: nfs
16
slow boot
17
Roll-Your-Own (RYO)
Buildroot
OpenEmbedded
ngstrm
Ubuntu or Debian
18
Busybox
Web - http://www.busybox.net
init
19
Busybox example
# ls -l /bin
lrwxrwxrwx 1
lrwxrwxrwx 1
lrwxrwxrwx 1
-rwxr-xr-x 1
lrwxrwxrwx 1
...
root
root
root
root
root
root
root
root
root
root
7
7
7
744480
7
2008-08-06
2008-08-06
2008-08-06
2008-05-16
2008-08-06
11:44
11:44
11:44
15:46
11:44
20
init
Busybox init
e.g. by buildroot
System V init
e.g. by Angstrom
21
Busybox init
/etc/init.d/rcS
#! /bin/sh
echo "Starting rcS"
mount -t proc proc /proc
mount -t sysfs sysfs /sys
ifconfig lo 127.0.0.1
ifconfig eth0 192.168.1.101
22
System V init
System V runlevels
0 is halt
1 is single user
6 is reboot
23
System V inittab
Format:
id:runlevels:action:process
Default runlevel = 5
id:5:initdefault:
si::sysinit:/etc/init.d/rcS
~~:S:wait:/sbin/sulogin
l0:0:wait:/etc/init.d/rc
l1:1:wait:/etc/init.d/rc
l2:2:wait:/etc/init.d/rc
l3:3:wait:/etc/init.d/rc
l4:4:wait:/etc/init.d/rc
l5:5:wait:/etc/init.d/rc
l6:6:wait:/etc/init.d/rc
0
1
2
3
4
5
6
z6:6:respawn:/sbin/sulogin
S:2345:respawn:/sbin/getty 38400 ttyS1
24
Initialisation scripts
# ls /etc/init.d
alignment.sh
banner
bootmisc.sh
checkroot
devpts.sh
dropbear
finish.sh
functions
halt
hostname.sh
hwclock.sh
modutils.sh
mountall.sh
mountnfs.sh
networking
populate-volatile.sh
ramdisk
rc
rcS
reboot
rmnologin
save-rtc.sh
sendsigs
single
sysfs.sh
syslog
syslog.busybox
udev
udev-cache
umountfs
umountnfs.sh
urandom
25
Create by hand:
mknod /dev/ttyS0 c 4 64
udev pros
udev cons
slow
26
No limit on size
Step 1. Export a directory on the development host with a line like this
in /etc/exports
/home/chris/rootdir *(rw,sync,no_subtree_check,no_root_squash)
27
28
29
Summary
Kernel
User space
30