Apr 28, 2011 03:32:59 PM, Andrew Benton wrote: > According to 55-lfs.rules udev should run the setclock script > when /dev/rtc becomes available. > Does /dev/rtc exist? > Maybe you configured your kernel without real time clock support?
It seems we're in the fortunate situation here where people can choose their individual way of skinning the cat. In the hwclock manual section, "How hwclock Accesses the Hardware Clock": hwclock uses many different ways to get and set Hardware Clock values. The most normal way is to do I/O to the device special file /dev/rtc, which is presumed to be driven by the rtc device driver. However, this method is not always available. For one thing, the rtc driver is a relatively recent addition to Linux. Older systems don't have it. ... I do have /dev/rtc (set up by "udev" now). I always had it in the kernel and set up one way or another. However I always did "setclock" _before_ starting "udev", for various reasons, like seeing some reasonable times of device creation. Anyway, this was LFS bootscript style in the past, thus my confusion not seeing "setclock' script as part of a 'rcsysinit.d' sequence. Actually, to be exact, "rtc" was set in "modules". Even today, in 'rcsysinit.d', I have ... modules setclock udev ... with "modules" empty :(. In my case, setclock does something like hwclock --hctosys --localtime and I've always relied on the CMOS battery holding up solid. Notes: 1. Even if I delete the rtc device: [/dev]$ ls -l rtc crw-r--r-- 1 root root 10, 135 2011-04-28 16:04 rtc [/dev]$ rm -f rtc the command 'hwclock --hctosys --localtime' still works OK (so the manual is relatively good, after all :). As I implied, no complaints on the boot-up where /dev/rtc hasn't been born yet.. 2. As a life style, I frequently connect into cyberspace from the command line and in doing so I update my time from the satellites ntpd -q 3. Maybe I should put "rtc" back in "modules" so hwclock is "forced" to use '/dev/rtc' (?) Thanks, -- Alex -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
