Openwrt Boot Notes

Version 3.1 by Leon Poon on 2019/01/05 14:49

 

initramfs-kernel

kernel runs /init.

/init is a script which sets INITRAMFS=1 and then execs /sbin/init.

/sbin/init is ELF comes from procd package. What it does (as pid=1):

  • early:
    • mount /proc, /sysfs, and create /dev nodes, create /tmp subdirs etc
    • set PATH
  • kmodloader in subprocess (waits until done)
  • preinit
    • plugd in subprocess (seem to deal with firmware)
    • /etc/preinit in subprocess
  • when /etc/preinit is done then it execvp the "real" /sbin/procd