- 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.
22 lines
665 B
Desktop File
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
|