hwclock will call rtc driver to set time, how linux read/write time if you don't insert battery?
Regardless of whether I insert the battery or not, if the time is set to a year before 2023, it will revert to 2023 after a reboot.
When the system starts, I saw a print message, and I feel it might be related to this setting.
[ 2.803395] systemd[1]: System time before build time, advancing clock.
Hi @Alexander7
This is test log on EVK, please refer this log check your dts setting, the pcf2131 will be registered as rtc1 on EVK board.
[ 1.201043] bbnsm_rtc 44440000.bbnsm:rtc: registered as rtc0
[ 1.207097] bbnsm_rtc 44440000.bbnsm:rtc: setting system clock to 1970-01-01T00:00:00 UTC (0)
[ 3.195143] systemd-sysv-generator[176]: SysV service '/etc/init.d/save-rtc.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[ 7.794546] rtc-pcf2131-i2c 2-0053: oscillator stop detected, date/time is not reliable
[ 7.852340] rtc-pcf2131-i2c 2-0053: registered as rtc1