Install the RTC module on GPIO pins 1, 3, 5, 7
- Add or edit
usercfg.txt
and add
dtparam=i2c_arm=on
dtoverlay=i2c-rtc,ds3231
- Edit
/etc/mkinitfs/mkinitfs.conf
and add a featurerpirtc
, then rebuild initramfs
mkinitfs
- Add hwclock service
rc-update del swclock boot
rc-update add hwclock boot
- Write current time
hwclock -w
- If alpine not install as sys mode, you need save your changes
lbu commit
- Reboot