Setting up to use have persistent date/time
Including script to set orin time
Change-Id: Idc5820ea6173af2deb97995e86af544a0befe0f3
Signed-off-by: Jim Ostrowski <yimmy13@gmail.com>
diff --git a/frc971/orin/build_rootfs.py b/frc971/orin/build_rootfs.py
index ea15cf8..92ff11c 100755
--- a/frc971/orin/build_rootfs.py
+++ b/frc971/orin/build_rootfs.py
@@ -1259,6 +1259,14 @@
target(["systemctl", "enable", "frc971"])
target(["systemctl", "enable", "frc971chrt"])
+ # Set up HW clock to use /dev/rtc0 and install hwclock service
+ target(["ln", "-sf", "/dev/rtc0", "/dev/rtc"])
+ target_unescaped(
+ "sed -i s/ATTR{hctosys}==\\\"1\\\"/ATTR{hctosys}==\\\"0\\\"/ /lib/udev/rules.d/50-udev-default.rules"
+ )
+ copyfile("root:root", "644", "etc/systemd/system/hwclock.service")
+ target(["systemctl", "enable", "hwclock"])
+
target(["apt-file", "update"])
target(["ldconfig"])