When and where is Is Debian 7.5 2014-05-14 synchronizing omap_rtc with the system clock?

I have installed the Debian 7.5 2014-05-14 image onto my BeagleBone Black. Very early in the boot process, Debian appears to synchronize (or attempt thereof) the time reported by the omap_rtc device (that would be the RTC built into the AM3359 processor that gets mapped to /dev/rtc0). This can be demonstrated by the following line in dmsg:

[ 1.025090] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

I am trying to determine exactly when and where the event that logs this dmesg entry happens in the boot process.

Right here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/rtc/hctosys.c#n59

Regards,

I have installed the Debian 7.5 2014-05-14 image onto my BeagleBone Black. Very early in the boot process, Debian appears to synchronize (or attempt thereof) the time reported by the omap_rtc device (that would be the RTC built into the AM3359 processor that gets mapped to /dev/rtc0). This can be demonstrated by the following line in dmsg:

[ 1.025090] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

I am trying to determine exactly when and where the event that logs this dmesg entry happens in the boot process.

You need to change “CONFIG_RTC_HCTOSYS_DEVICE” to rtc1 in your kernel .config file.

Regards,
John

This will get the kernel to use rtc1. I’m unable to verify it right now, but one will have to make sure the proper module is loaded if required. You will also have to disable hwclock in systemd or it’s going to reset the time back to whatever rtc0 thinks the time is. The systemd authors have chosen to rewrite hwclock and the rtc0 value is hardcoded into the binary. There also is NO way to change the rtc used in their version as in the original version of hwclock. I’ve been beating my head against the wall on this for some time now. When I’m able to get my BBB plugged in again and get a bit of spare time I dig into it more again. Mike