Jetson TX2i RTC

I have a TX2i on a custom carrier board that has no battery backup for the RTC. The system also has no internet access thus NTP is not an option.

What is the best way to configure the system time in this case? I’d like to control what the time is on system boot in a predictable manner.

Currently I see this in the sys log after each boot:
$dmesg | grep clock
[ 1.658420] tegra_rtc c2a0000.rtc: setting system clock to 2000-01-03 16:40:31 UTC (946917631)

Where does this time value come from?

Also note the system clock gets changed from the above time:
[ 1.869247] systemd[1]: System time before build time, advancing clock.
$ date
Sun Jan 28 16:03:59 UTC 2018

Is there a way I can set what I want system time to be at boot?

For your case you can hard code below driver for your request.

kernel/kernel-4.9/drivers/rtc/hctosys.c

For your case you can hard code below driver for your request.

kernel/kernel-4.9/drivers/rtc/hctosys.c

Thanks. That is an option.

Where does the RTC value come from after a power cycle? I am reliably currently seeing:
Jan 28 15:58:17 gh-csp19 kernel: tegra_rtc c2a0000.rtc: setting system clock to 2000-01-01 01:00:13 UTC (946688413)

I’d expect the clock to be 0 since it had no power but instead I see 946688413.

Yes, should be 0 after power loss, I think rtc driver check if power loss to restore a default value(946688413)