FS#18078 - [initscripts] does not create /dev/rtc node correctly, so hwclock fails
Attached to Project:
Arch Linux
Opened by Glenn McCarthy (Rotech) - Saturday, 30 January 2010, 21:06 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 09 June 2010, 17:42 GMT
Opened by Glenn McCarthy (Rotech) - Saturday, 30 January 2010, 21:06 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 09 June 2010, 17:42 GMT
|
Details
Description:
rc.sysinit does not create the /dev/rtc device node correctly on my system. My /dev/rtc0 looks like this when created by UDEV crw-rw-r-- 1 root audio 10, 135 Jan 31 09:45 /dev/rtc rc.sysinit finds the major number like this RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null) RTC_MAJOR="${RTC_MAJOR%% *}" Then creates the device as such /bin/mknod /dev/rtc0 c $RTC_MAJOR 0 For my system it needs to be like this. I don't know what causes mine to be different from what is obviously "the norm" RTC_MAJOR=$(/bin/grep -w misc /proc/devices 2>/dev/null) RTC_MAJOR="${RTC_MAJOR% *}" RTC_MINOR=$(/bin/grep -w rtc /proc/misc 2>/dev/null) RTC_MINOR="${RTC_MINOR% *}" /bin/mknod /dev/rtc0 c $RTC_MAJOR $RTC_MINOR /bin/ln -s /dev/rtc0 /dev/rtc Additional info: * package version(s) initscripts 2010.01-1 |
This task depends upon
Closed by Thomas Bächler (brain0)
Wednesday, 09 June 2010, 17:42 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in upcoming 2010.06-2
Wednesday, 09 June 2010, 17:42 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in upcoming 2010.06-2
Device Drivers->Character Devices
CONFIG_RTC:
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
will get access to the real time clock (or hardware clock) built
into your computer.
Which is working perfectly for me if I change the mknod line in rc.sysinit
I still don't really understand the differences between these two different RTC's and they both worked for hwclock, but doesn't matter, problem solved. Thanks for your help, I guess this can be closed now.
1) Get the major/minor from sysfs
2) Check whether the "other rtc" can be built as a module and try to load that if you can.
/sbin/modprobe rtc >/dev/null 2>&1
/sbin/modprobe genrtc >/dev/null 2>&1