Files
onefinity-firmware/scripts
Henrik Muehe 8e3b7a29e5 Cold-boot: 4 optimisations cutting bbctrl listen by ~8s on the Pi
Measured on onefinity.local (Pi 3, Raspbian Stretch, bbctrl 1.6.7).

Before -> after:
  bbctrl listen           boot+20.6s  ->  boot+12.4s   (-8.2s)
  host -> /api/config/load    28.2s   ->     22.5s    (-5.7s)

The 4 changes (each independently revertable):

1. scripts/bbserial-rebind.service: do the bbserial unbind + reload
   in a dedicated unit ordered Before=bbctrl.service, instead of in
   rc.local AFTER bbctrl is already listening on the serial port.
   Eliminates a full bbctrl restart mid-boot.

2. scripts/bbctrl.service: drop "After=network.target". bbctrl talks
   to the AVR on a local serial port and to the LCD on I2C; it does
   not need DHCP / network-online to come up. Also adds explicit
   ordering after the new bbserial-rebind unit.

3. scripts/rc.local.fast: trimmed rc.local that no longer touches
   bbserial and backgrounds 'startx' so chromium launches in
   parallel with bbctrl rather than after rc.local finishes.

4. src/py/bbctrl/Planner.py: lazy-import camotics.gplan. Costs ~130ms
   on cold cache, deferred from import-time to ctrl.mach init.

5. (bonus) src/py/bbctrl/Log.py: tolerate FileNotFoundError in
   _rotate(). The improved boot path exposed a pre-existing log
   rotator bug that crashed bbctrl on first start when bbctrl.log.16
   was missing.
2026-05-01 10:07:23 +02:00
..
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2020-10-15 23:17:21 -04:00
2021-03-09 23:48:03 -08:00
2021-03-09 23:48:03 -08:00
2021-12-08 10:04:36 -08:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2023-02-07 07:16:43 +08:00
2023-02-07 07:16:43 +08:00
2021-12-08 10:26:30 -08:00
2020-08-27 23:20:27 -04:00
2021-02-26 18:55:10 -05:00
2021-03-09 23:27:32 -08:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2021-03-07 21:22:23 -08:00
2023-02-07 07:28:15 +08:00
2020-08-27 23:20:27 -04:00
2021-03-05 21:36:03 -08:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00
2020-08-27 23:20:27 -04:00