target/rk3568: use non rk808 rtc if exists
This commit is contained in:
parent
b307aec258
commit
e2d212aef7
|
@ -16,10 +16,12 @@ boot() {
|
|||
}
|
||||
|
||||
start() {
|
||||
[ -e "/dev/rtc" ] && RTC_DEV=/dev/rtc
|
||||
[ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -s -u -f $RTC_DEV
|
||||
}
|
||||
|
||||
stop() {
|
||||
[ -e "/dev/rtc" ] && RTC_DEV=/dev/rtc
|
||||
[ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -w -u -f $RTC_DEV && \
|
||||
logger -t sysfixtime "saved '$(date)' to $RTC_DEV"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=00
|
||||
|
||||
boot() {
|
||||
if [ -e /sys/class/rtc/rtc1/device/modalias ]; then
|
||||
grep -q 'rk808-rtc' /sys/class/rtc/rtc1/device/modalias || ln -s rtc1 /dev/rtc
|
||||
fi
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
. /lib/functions.sh
|
||||
|
||||
preinit_set_gpio() {
|
||||
# ref package/base-files/files/etc/init.d/gpio_switch
|
||||
|
|
Loading…
Reference in New Issue