3.0 KiB
3.0 KiB
Boot and Init
Init System
The rootfs uses BusyBox init via /etc/inittab. There is no systemd unit layout in this extraction.
Important /etc/inittab behavior:
- Mounts proc at
/proc. - Creates
/dev/ptsand/dev/shm. - Runs
mount -a. - Creates
/run/lock/subsys. - Runs
swapon -a. - Links
/dev/fd,/dev/stdin,/dev/stdout, and/dev/stderrinto proc fd paths. - Sets hostname from
/etc/hostname. - Runs
/etc/init.d/rcS. - On shutdown, runs
/etc/init.d/rcK, thenswapoff -a, thenumount -a -r.
Console gettys are present but commented out:
- Serial console:
console::respawn:/sbin/getty -L console 0 vt100 - HDMI console:
tty1::respawn:/sbin/getty -L tty1 0 vt100
That means the extracted configuration does not spawn an interactive login shell by default.
rcS Startup Order
/etc/init.d/rcS runs all /etc/init.d/S??* files in lexical order. For this rootfs:
| Order | Script | Purpose |
|---|---|---|
| 01 | S01seedrng |
Seed RNG support. Comment references /data/seedrng. |
| 01 | S01syslogd |
Starts syslog daemon. |
| 02 | S02klogd |
Starts kernel log daemon. |
| 02 | S02sysctl |
Applies sysctl settings. |
| 10 | S10udev |
Starts udev. |
| 12 | S12lvds_panel |
Starts boot display on the LVDS panel. |
| 30 | S30dbus |
Starts D-Bus. |
| 40 | S40bluetoothd |
Starts Bluetooth daemon. |
| 40 | S40network |
Runs /sbin/ifup -a. |
| 50 | S50crond |
Starts cron daemon. No cron job files were present under /etc/cron* in this extraction. |
| 55 | S55spike3 |
Spike-specific Bluetooth, audio, and module setup. |
| 95 | S95game |
Kernel update check, persistent directory setup, core dump policy, monitors, game launch, update scanner. |
Shutdown Order
/etc/init.d/rcK reverses the /etc/init.d/S??* list and calls each script with stop.
Spike-specific Boot Actions
S12lvds_panel:
- Sources
/etc/init.d/shared. - Starts
$BOOT_DISPLAYin the background. $BOOT_DISPLAYresolves first to/games/spike3/bin/boot_display, falling back to/usr/local/spike/boot_display.
S55spike3:
- Runs
bluetoothctl power on. - Registers a
KeyboardOnlyBluetooth agent and makes it the default agent. - Starts BlueALSA as A2DP source:
/usr/bin/bluealsa -p a2dp-source &. - Loads
i2c-dev,exfat, andfuse.
S95game:
- Checks staged kernel update files under
/connectivity/os_update. - Runs a previous
/connectivity/os_update/post_install_hook.shif present. - Creates persistent ALSA/Bluetooth directories under
/connectivity. - Ensures
/var/lib/alsa,/var/lib/bluetooth, and/var/lib/bluealsapoint into/connectivity. - Overrides hostname from
/connectivity/hostnameif present. - Prepares
/connectivity/dump/cores. - Sets
ulimit -c unlimited. - Sets core pattern to
/connectivity/dump/cores/core.%h.%t. - Starts
reboot_monitor,conagent_monitor, andgame_monitorif/games/gameexists. - Starts
/etc/init.d/updatein the background so USB/downloaded.spkupdates can interrupt the running game.