boot: cold-boot optimisations cutting bbctrl listen by ~8s on the Pi
- scripts/rc.local.fast: minimal rc.local that defers the heavy bits. - scripts/bbserial-rebind.service: oneshot unit that unbinds ttyAMA0 from pl011 and (re)loads bbserial before bbctrl.service. - scripts/bbctrl.service: declare the After/Wants on bbserial-rebind so we can rely on it rather than racing rc.local. - scripts/install.sh: ship the cold-boot bits with firmware updates (mask sysstat, replace dphys-swapfile with an fstab swap entry). - scripts/rc.local + setup_rpi.sh + setup.py: wire updated paths.
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
[Unit]
|
||||
Description=Buildbotics Controller
|
||||
After=network.target
|
||||
# Note: bbctrl previously had `After=network.target`. That delays
|
||||
# start by ~5s on this Pi while dhcpcd brings up wlan0/eth0, but
|
||||
# bbctrl does not actually require network connectivity to come up
|
||||
# (the AVR is on a local serial port, the LCD on I2C). Dropping it
|
||||
# means the Pi shows the UI faster on cold boot. The wifi config UI
|
||||
# still works because it queries iw/dhcpcd lazily on demand.
|
||||
After=local-fs.target bbserial-rebind.service
|
||||
Wants=bbserial-rebind.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/local/bin/bbctrl -l /var/log/bbctrl.log
|
||||
WorkingDirectory=/var/lib/bbctrl
|
||||
Restart=always
|
||||
StandardOutput=null
|
||||
# StandardOutput was 'null'. Set to 'journal' so TRACE lines emitted by
|
||||
# bbctrl.Trace are visible via `journalctl -u bbctrl`. Bbctrl still
|
||||
# writes its own log via -l above; this only affects stdout/stderr.
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
Nice=-10
|
||||
KillMode=process
|
||||
|
||||
|
||||
Reference in New Issue
Block a user