firefly-rk3288 RTC

firefly-rk3288 RTC的电池口RTC_BAT安装了电池,ubuntu系统下,掉电系统时间不保存吗?

固件版本:FIREFLY-RK3288-UBUNTU18.04-GPT-20200707-1553

  • 添加服务,/lib/systemd/system/hwclock-save.service
  • 使能服务,systemctl enabled hwclock-save
[Unit]
Description=hwclock-save

[Service]
Type=oneshot
ExecStart=/sbin/hwclock --hctosys --localtime
ExecStop=/sbin/hwclock --systohc --localtime
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

时间的蝴蝶 发表于 2020-12-21 10:37

  • 添加服务,/lib/systemd/system/hwclock-save.service
  • 使能服务,systemctl enabled hwclock-save

使能服务的时候:unknown operation enabled
直接搞了个shell脚本开机运行hctosys。

systemctl enable hwclock-save