Files
luckfox-pico/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-buildroot-tiny/etc/init.d/S99rtcinit
2024-11-18 20:53:05 +08:00

17 lines
215 B
Bash
Executable File

#!/bin/sh
case $1 in
start)
if [ "$(hwclock | grep "1969")" ]; then
echo "RTC time calibration"
date -s 2024-01-01
hwclock -w
else
echo "RTC does not require time calibration"
fi
;;
*)
exit 1
;;
esac