Files
onefinity-firmware/scripts/bbserial-rebind.service
Henrik Muehe 8224ab8f97 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.
2026-05-03 14:06:44 +02:00

22 lines
665 B
Desktop File

[Unit]
Description=Unbind ttyAMA0 from pl011 and reload bbserial
DefaultDependencies=no
After=systemd-modules-load.service local-fs.target
Before=bbctrl.service
ConditionPathExists=/sys/bus/amba/drivers/uart-pl011
[Service]
Type=oneshot
RemainAfterExit=yes
# Tolerate the device already being bound elsewhere or the module
# already being loaded — the goal is the end state (bbserial owns
# ttyAMA0), not running the steps.
ExecStart=/bin/sh -c '\
echo 3f201000.serial > /sys/bus/amba/drivers/uart-pl011/unbind 2>/dev/null || true; \
/sbin/modprobe -r bbserial 2>/dev/null || true; \
/sbin/modprobe bbserial \
'
[Install]
WantedBy=multi-user.target