Changes

Jump to: navigation, search
Accessing the rtc device
</pre>
A proper ''systemd'' script can be used for sysnchronizing synchronizing the system clock from the hardware rtc device:
<pre>
Description=Synchronise System clock to hardware RTC
DefaultDependencies=no
After=systemd-modules-loadntpdate.serviceBefore=systemd-journald.service time-sync.target sysinit.target shutdown.target
Conflicts=shutdown.target
Type=oneshot
RemainAfterExit=yes
ExecStart=/etcsbin/hwrtc.shhwclock -f /dev/rtc1 --hctosys
RestrictRealtime=yes
[Install]
WantedBy=sysinitmulti-user.target</pre> where the startup script is <code>/etc/hwrtc.sh</code> used for probing the <code>rtc-ds1307</code> kernel module: <pre>#!/bin/sh modprobe rtc-ds1307sleep 1hwclock -f /dev/rtc1 --hctosys exit 0
</pre>
8,154
edits

Navigation menu