Number
|
Page
|
Caption
|
Listing
|
6-1
|
6-4
|
Contents of Minimal File System
|
/
|-- bin
| |-- busybox
| '-- sh -> busybox
|-- dev
| '-- console
|-- etc
| '-- init.d
| '-- rcS
'-- lib
|-- ld-2.3.2.so
|-- ld-linux.so.2 -> ld-2.3.2.so
|-- libc-2.3.2.so
'-- libc.so.6 -> libc-2.3.2.so
5 directories, 8 files
|
6-2
|
6-7
|
Final Boot Steps from main.c
|
...
if (execute_command) {
run_init_process(execute_command);
printk(KERN_WARNING "Failed to execute %s. Attempting "
"defaults...\n", execute_command);
}
run_init_process("/sbin/init");
run_init_process("/etc/init");
run_init_process("/bin/init");
run_init_process("/bin/sh");
panic("No init found. Try passing init= option to kernel.");
}
|
6-3
|
6-11
|
Final Boot Steps from main.c
|
|
6-4
|
6-12
|
Runlevel Directory Structure on Beagle
|
$ ls -dl /etc/rc*
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rc0.d
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rc1.d
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rc2.d
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rc3.d
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rc4.d
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rc5.d
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rc6.d
drwxr-xr-x 2 root root 4096 Mar 13 20:18 /etc/rcS.d
|
6-5
|
6-12
|
Example Runlevel Directory on Beagle
|
$ ls -ls rc5.d/
total 0
0 lrwxrwxrwx 1 root root 20 Mar 13 20:18 S05led-config -> ../init.d/led-config
0 lrwxrwxrwx 1 root root 18 Mar 13 20:18 S10dropbear -> ../init.d/dropbear
0 lrwxrwxrwx 1 root root 14 Mar 13 20:18 S20apmd -> ../init.d/apmd
0 lrwxrwxrwx 1 root root 16 Mar 13 20:18 S20dbus-1 -> ../init.d/dbus-1
0 lrwxrwxrwx 1 root root 16 Mar 13 20:18 S20syslog -> ../init.d/syslog
0 lrwxrwxrwx 1 root root 22 Mar 13 20:18 S21avahi-daemon -> ../init.d/avahi-daen
0 lrwxrwxrwx 1 root root 17 Mar 13 20:18 S22connman -> ../init.d/connman
0 lrwxrwxrwx 1 root root 17 Mar 13 20:18 S30ntpdate -> ../init.d/ntpdate
0 lrwxrwxrwx 1 root root 20 Mar 13 20:18 S50usb-gadget -> ../init.d/usb-gadget
0 lrwxrwxrwx 1 root root 16 Mar 13 20:18 S99gpe-dm -> ../init.d/gpe-dm
0 lrwxrwxrwx 1 root root 19 Mar 13 20:18 S99rmnologin -> ../init.d/rmnologin
0 lrwxrwxrwx 1 root root 20 Mar 4 22:09 S99zzapsplash -> ../init.d/zzapsplash
|
6-6
|
6-
|
Example Runlevel Directory on Beagle
|
|
6-13
|
6-23
|
Kernel initramfs Build Directory
|
total 60
-rw-r--r-- 1 yoder yoder 1620 Mar 8 11:19 Kconfig
-rw-r--r-- 1 yoder yoder 1876 Mar 8 11:19 Makefile
-rw-r--r-- 1 yoder yoder 741 Mar 9 12:43 built-in.o
-rwxr-xr-x 1 yoder yoder 18280 Mar 8 13:03 gen_init_cpio
-rw-r--r-- 1 yoder yoder 12536 Mar 8 11:19 gen_init_cpio.c
-rw-r--r-- 1 yoder yoder 1024 Mar 8 11:19 initramfs_data.S
-rw-r--r-- 1 yoder yoder 133 Mar 8 13:03 initramfs_data.cpio.gz
-rw-r--r-- 1 yoder yoder 741 Mar 8 13:03 initramfs_data.o
-rw-r--r-- 1 yoder yoder 0 Mar 8 13:18 modules.order
|
6-14
|
6-25
|
Kernel initramfs Build Directory
|
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
dir /root 0700 0 0
|
6-15
|
6-25
|
Minimal initramfs contents
|
$ tree .../usr/myinitramfs_root/
.
|-- bin
| |-- busybox
| `-- sh -> busybox
|-- dev
| `-- console
|-- etc
| `-- init.d
| `-- rcS
`-- init -> /bin/sh
4 directories, 5 files
|