Files
onefinity-firmware/scripts/rc.local
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

32 lines
695 B
Bash

#!/bin/bash
# Mount /boot read only
mount -o remount,ro /boot
# Load bbserial
echo 3f201000.serial > /sys/bus/amba/drivers/uart-pl011/unbind
modprobe -r bbserial
modprobe bbserial
# Set SPI GPIO mode
gpio mode 27 alt3
# Create browser memory limited cgroup
if [ -d sys/fs/cgroup/memory ]; then
CGROUP=/sys/fs/cgroup/memory/chrome
mkdir $CGROUP
chown -R pi:pi $CGROUP
echo 650000000 > $CGROUP/memory.soft_limit_in_bytes
echo 750000000 > $CGROUP/memory.limit_in_bytes
fi
# Reload udev
/etc/init.d/udev restart
# Stop boot splash so it doesn't interfere with X if GPU enabled and to save CPU
plymouth quit
# Start X in /home/pi
cd /home/pi
sudo -u pi startx -- -nocursor