I have 3 different CuBox i (i2eX, i4x4, and i4pro). hwclock runs fine on 2 of them, but on i2eX I get following error:
$this->bbcode_second_pass_code('', '
[root@alarm-i2eX ~]# hwclock
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
')
Same time
$this->bbcode_second_pass_code('', '[root@alarm-i2eX ~]# hwclock -w')
produces no error.
More output from hwclock:
$this->bbcode_second_pass_code('', '
[root@alarm-i2eX ~]# hwclock -w --rtc /dev/rtc1
[root@alarm-i2eX ~]# hwclock -w --rtc /dev/rtc0
[root@alarm-i2eX ~]# hwclock --rtc /dev/rtc0
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
[root@alarm-i2eX ~]# hwclock --rtc /dev/rtc1
2019-09-14 14:02:10.921915-05:00
')
Looks like /dev/rtc0 is broken but /dev/rtc1 works fine just on this particular board.
Are they the same /dev/rtc0 and /dev/rtc1? Does it really work fine the /dev/rtc1? Is it a bug or a hardware failure? Is it possible to get /dev/rtc0 to get to work as expected?