-
Notifications
You must be signed in to change notification settings - Fork 1.2k
hwclock on Raspberry Pi 2 with DS1307 RTC: operates correctly in util-linux 2.30.1, fails in 2.31 #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I guess we need
@jwpi ? |
I can't speak to the general case, but the proposed fix works in my particular case:
|
On 11/22/2017 04:23 AM, Karel Zak wrote:
@jwpi ?
As the commit says, util-linux requires kernel >= 2.6.0 and the rtc
interface has not returned EINVAL for unimplemented ioctls since v2.5.8.
So it's your call Karel, does util-linux have a minimum kernel version?
See both commits below:
commit 1d5cffa
Author: J William Piggott <elseifthen@gmx.com>
Date: Sun Jul 23 20:16:03 2017 -0400
hwclock: fix unimplemented ioctl test
The rtc driver has not returned EINVAL for unimplemented ioctls since
v2.5.8 in 2002. However, it does return it for other errors; making the
current test potentially problematic. Since 9f3d0fc util-linux assumes
kernel >= 2.6.0 so remove EINVAL as an ioctl test.
commit 9f3d0fc
Author: Ruediger Meier <ruediger.meier@ga-group.nl>
Date: Thu Jun 29 04:09:06 2017 +0200
docs: remove some old history from manpages
We assume that users will have a kernel >= 2.6.0 and removel
references to earlier kernels. There are still a few ones
left.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
Hmm, interesting. I would think that my kernel is sufficiently current:
Could the fact that I'm compiling the rtc-ds1307 driver into my kernel be making a difference?
I'll try running hwclock against the stock kernel with loadable RTC driver, but it will take me a bit of time. |
On 11/22/2017 02:45 PM, Ed Snow wrote:
Hmm, interesting. I would think that my kernel is sufficiently current:
```
$ uname -a
Linux Corvus 4.9.60-1-ARCH #1 SMP Mon Nov 6 10:03:15 PST 2017 armv7l GNU/Linux
I was wrong. The RTC returns ENOTTY when an ioctl is unrecognized, but
it looks like RTC_UIE_ON, which is rtc_update_irq_enable(), does return
EINVAL when it is unsupported.
drivers/rtc/interface.c:458
if (rtc->uie_unsupported) {
err = -EINVAL;
goto out;
}
So commit 1d5cffa should be reverted.
My apologies to all for the regression.
|
The change will in v2.31.1 (probably end of Nov). |
On 11/23/2017 04:36 AM, Karel Zak wrote:
The change will in v2.31.1 (probably end of Nov).
Just a friendly reminder Karel, for the bug fix release?
|
Ah, ... already December. OK, I'l fix it ASAP. |
On a Raspberry Pi 2 with DS1307 RTC running Arch Linux ARM with util-linux 2.30.1:
But with util-linux 2.31:
Reverting the function synchronize_to_clock_tick_rtc in hwclock-rtc.c to its definition in branch stable/v2.30 restores some semblance of correct operation (which is not to say that this is the fix to the problem):
For other users experiencing the same problem, see thread https://archlinuxarm.org/forum/viewtopic.php?f=57&t=12222.
The text was updated successfully, but these errors were encountered: