I apologize in advance for my kindergarten-level working knowledge of Linux.
I am developing a wildlife camera based on Pi Zero. To conserve battery power the Pi will remain powered down until an Arduino supervisor (http://spellfoundry.com/product/sleepy-pi-2/) detects motion via a passive infrared sensor. Once motion is detected it is critical to get the Pi booted up and running my python camera script ASAP to capture the pictures.
I am not too keen on learning buildroot to try create my own custom fast-boot os image and DietPi seems to have GREAT potential as a lightweight customizable platform for my application, but it still takes ~19 seconds to boot (see systemd-analyze critical-chain output below). I would still like to cut that in half or better and would really appreciate any suggestions for how to improve it!
Removing networking is one obvious optimization as it takes 3+ seconds (even with static IP) and is not needed to take a picture. Moreover, I specifically want to keep WLAN powered down to save battery except for one specific scheduled time per day when it will wake-up and "phone home" to Google Drive. How can I do this?
What about dietpi-boot, ramdisk and/or dev-mmcblk0p1 services, which together total over 13 secs? Can these be sped up in any way? FWIW, I am already using a very fast SD card.
Anything further that can be done with overclocking (there only seems to be one profile available for Pi Zero)?
Code: Select all
systemd-analyze critical-chain: graphical.target @18.846s └─multi-user.target @18.838s └─getty.target @18.836s └─email@example.com @18.828s └─rc-local.service @18.792s └─[1;31mdietpi-boot.service @13.924s +4.847s[0m └─[1;31mdietpi-ramdisk.service @11.396s +2.414s[0m └─basic.target @11.367s └─timers.target @11.339s └─systemd-tmpfiles-clean.timer @11.339s └─sysinit.target @11.272s └─[1;31mnetworking.service @7.974s +3.216s[0m └─local-fs.target @7.718s └─[1;31mboot.mount @7.525s +152ms[0m └─[1;firstname.lastname@example.org @6.344s +570ms[0m └─dev-mmcblk0p1.device @6.241s