Usage of alternative RTC

I’m using an alternative RTC that is attached via I2C to the Iris-Board. The driver is working correctly and automatically loaded on startup. Reading and writing to the RTC using hwclock works fine. I also managed to redirect the symlink /dev/rtc to my new rtc using a udev rule. My new rtc is always available as /dev/rtc2.

However I did not manage to configure my system in a manner that it uses my new RTC to sync the systemclock on startup. I can do it manually using hwclock -s. But I think this should be done using timesyncd, right? How can I tell timedatectl to use my RTC?

2nd question: How do I change the default settings of timedatectl using yocto? Is there a configuration file in /etc? I would like to disable NTP sync and use my RTC in localtime.

Best regards,
Michael

I think my question is related to the following thread: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=785445

hi @michaelg

Could you provide the dmesg log in a file?

I can do it manually using hwclock -s. But I think this should be done using timesyncd, right? How can I tell timedatectl to use my RTC.

You can create a service which runs automatically at Startup. Alternatively you can set after disabling ntp the command timedatectl ----adjust-system-clock

Best regards, Jaski

Hi @jaski.tx

Please find my dmesg log in the attachement: dmesg log

In the meantime I disabled ntp (timedatectl set-ntp false) and set the RTC as localtime (timedatectl set-local-rtc true). And before I launch my application I exectued hwclock -s. This seems to work as the systemclock is overwritten from the RTC now. However shortly thereafter and automatic ntp sync seems to take place although it is disabled. Do I need to disable it somewhere else?

hi
Thanks for your Input. Disabling NTP is not that easy. You may have a look here.