| Both sides previous revision Previous revision Next revision | Previous revision |
| docs:techref:process.boot [2018/03/04 07:47] – ↷ Links adapted because of a move operation | docs:techref:process.boot [2023/03/09 13:48] (current) – [Process Trinity] Drop redundant word brlin |
|---|
| ====== The Boot Process ====== | ====== The Boot Process ====== |
| | |
| | <WRAP center round alert 60%> |
| | As noted below, this page is woefully out of date |
| | </WRAP> |
| | |
| |
| | Please also see [[docs:techref:requirements.boot.process]]\\ This guide it not up-to-date! It does not mention [[docs:techref:procd]] | | | Please also see [[docs:techref:requirements.boot.process]]\\ This guide it not up-to-date! It does not mention [[docs:techref:procd]] | |
| * When is it time for [[docs:guide-user:advanced:kexec]] and when for [[docs:guide-user:additional-software:extroot_configuration]] (see particularly [[docs:guide-user:additional-software:extroot_configuration:extroot.theory]])? | * When is it time for [[docs:guide-user:advanced:kexec]] and when for [[docs:guide-user:additional-software:extroot_configuration]] (see particularly [[docs:guide-user:additional-software:extroot_configuration:extroot.theory]])? |
| * How does the [[docs:guide-user:troubleshooting:failsafe_and_factory_reset|OpenWrt FailSafe]] work? | * How does the [[docs:guide-user:troubleshooting:failsafe_and_factory_reset|OpenWrt FailSafe]] work? |
| * the [[docs:techref:flash.layout]] and the combination of [[docs:techref:filesystems#implementation.in.openwrt|Utilization of file systems in OpenWrt]] | * the [[docs:techref:flash.layout]] and the combination of [[docs:techref:filesystems#implementation_in_openwrt|Utilization of file systems in OpenWrt]] |
| * When does the tmpfs get mounted and ''/tmp'' symlinked to it and ''/var'' symlinked to ''/tmp''? | * When does the tmpfs get mounted and ''/tmp'' symlinked to it and ''/var'' symlinked to ''/tmp''? |
| |
| |
| ===== Process Trinity ===== | ===== Process Trinity ===== |
| The Machine gets powered on and some very very basic very low level hardware stuff gets done. You could connect to it over the [[docs:hardware:port.jtag|JTAG Port]] port and issue commands. | The Machine gets powered on and some very very basic very low level hardware stuff gets done. You could connect to it over the [[docs:techref:hardware:port.jtag|JTAG Port]] and issue commands. |
| |
| ==== Bootloader ==== | ==== Bootloader ==== |
| - the bootloader performs the [[wp>Power-on self-test|POST]], which is a low-level hardware initialization | - the bootloader performs the [[wp>Power-on self-test|POST]], which is a low-level hardware initialization |
| - the bootloader decompresses the Kernel image from its (known!) location on the flash storage into main memory (=RAM) | - the bootloader decompresses the Kernel image from its (known!) location on the flash storage into main memory (=RAM) |
| - the bootloader executes the Kernel with ''init=...'' option (default is ''[[docs:guide-user:base-system:notuci.config#etcpreinit|/etc/preinit]]'') | - the bootloader executes the Kernel with ''init=...'' option (default is <del>''[[docs:guide-user:base-system:notuci.config#etcpreinit|/etc/preinit]]''</del> ''/sbin/init'') |
| |
| ==== Kernel ==== | ==== Kernel ==== |
| - the Kernel further bootstraps itself (sic!) | - the Kernel further bootstraps itself (sic!) |
| - issues the command/op-code ''start_kernel'' | - issues the command/op-code ''start_kernel'' |
| - kernel scans the mtd partition //rootfs// for a valid superblock and mounts the SquashFS partition (which contains ''/etc'') once found. (More info at [[docs:techref:filesystems#technical.details]]) | - kernel scans the mtd partition //rootfs// for a valid superblock and mounts the SquashFS partition (which contains ''/etc'') once found. (More info at [[docs:techref:filesystems#technical_details]]) |
| - ''[[docs:guide-user:base-system:notuci.config#etcpreinit|/etc/preinit]]'' does pre-initialization setups (create directories, mount fs, /proc, /sys, ... ) | - ''[[docs:guide-user:base-system:notuci.config#etcpreinit|/etc/preinit]]'' does pre-initialization setups (create directories, mount fs, /proc, /sys, ... ) |
| - the Kernel ''mounts'' any other partition (e.g. jffs2 partition) under //rootfs (root file system)//. see [[docs:techref:flash.layout]], [[docs:techref:preinit_mount#mount.root.filesystem|preinit and root mount]], and also [[wp>udev]] FIXME **make sure** | - the Kernel ''mounts'' any other partition (e.g. jffs2 partition) under //rootfs (root file system)//. see [[docs:techref:flash.layout]], [[docs:techref:preinit_mount#mount.root.filesystem|preinit and root mount]], and also [[wp>udev]] FIXME **make sure** |
| **//NOTE://** [[Packages:]] you install with ''[[docs:guide-user:additional-software:opkg]]'' will likely add additional scripts! | **//NOTE://** [[Packages:]] you install with ''[[docs:guide-user:additional-software:opkg]]'' will likely add additional scripts! |
| |
| | S05defconfig | create config files with default values for platform (if config file is not exist), really does this on first start after OpenWRT installed (copy unexisted files from /etc/defconfig/$board/ to /etc/config/) | | | S05defconfig | create config files with default values for platform (if config file is not exist), really does this on first start after OpenWrt installed (copy unexisted files from /etc/defconfig/$board/ to /etc/config/) | |
| | S10boot | starts hotplug-script, mounts filesystesm, starts .., starts syslogd, ... | | | S10boot | starts hotplug-script, mounts filesystesm, starts .., starts syslogd, ... | |
| | S39usb | ''mount -t usbfs none /proc/bus/usb'' | | | S39usb | ''mount -t usbfs none /proc/bus/usb'' | |