Wiki source code of Openwrt Boot Notes
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | |
| 2 | |||
| 3 | = initramfs-kernel = | ||
| 4 | |||
| 5 | kernel runs /init. | ||
| 6 | |||
| 7 | /init is a script which sets INITRAMFS=1 and then execs /sbin/init. | ||
| 8 | |||
| |
2.1 | 9 | /sbin/init is ELF comes from procd package. What it does (as pid=1): |
| |
1.1 | 10 | |
| 11 | * early: | ||
| 12 | ** mount /proc, /sysfs, and create /dev nodes, create /tmp subdirs etc | ||
| 13 | ** set PATH | ||
| 14 | * kmodloader in subprocess | ||
| 15 | * preinit | ||
| 16 | ** plugd in subprocess (seem to deal with firmware) | ||
| 17 | ** /etc/preinit in subprocess | ||
| |
2.1 | 18 | * when /etc/preinit is done then it execvp the "real" /sbin/procd |
| |
1.1 | 19 | |
| 20 |