[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [WORKAROUND]what sets the time at boot?



On 2009-08-20 17:24 +0200, Hugo Vanwoerkom wrote:

> Sven Joachim wrote:
>> On 2009-08-19 20:37 +0200, Hugo Vanwoerkom wrote:
>>
>>> Sven Joachim wrote:
>>>> On 2009-08-19 19:08 +0200, Hugo Vanwoerkom wrote:
>>>>
>>>>> Hugo Vanwoerkom wrote:
>>>>>> So my question is: who at boot time is responsible for realizing
>>>>>> that the hwclock is kept in local time and UTC time?
>>>>>>
>>>>> And the answer is: /etc/init.d/hwclock.sh and
>>>>> /etc/init.d/hwclockfirst.sh do that from package util-linux.
>>>> They don't do this anymore unless your system is not using udev.
>>>>
>>>>> It's a bug:
>>>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542443
>>>> In which you state that you don't have /dev/rtc.  I'm not sure that
>>>> systems without that file are supported.
>>>>
>>> How does one go about getting /dev/rtc?
>>
>> ,----
>> | % grep -i rtc /boot/config-$(uname -r) | grep -v ^#
>> | CONFIG_HPET_EMULATE_RTC=y
>> | CONFIG_RTC_LIB=y
>> | CONFIG_RTC_CLASS=y
>> | CONFIG_RTC_HCTOSYS=y
>> | CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
>> | CONFIG_RTC_INTF_SYSFS=y
>> | CONFIG_RTC_INTF_PROC=y
>> | CONFIG_RTC_INTF_DEV=y
>> | CONFIG_RTC_DRV_CMOS=y
>> `----
>>
>> In the kernel configuration, select "Device Drivers" -> "Real Time Clock"
>> and check the options.  Note that udev should create a symlink
>> /dev/rtc -> rtc0 automatically for you.
>>
>
> This is what I get:
>
> ...
> /home/hugoThu Aug 20-10:17:33HDC3# grep -i rtc
> /boot/config-2.6.30-1-686 | grep -v ^#

This is *not* the kernel you used when you filed #542443. 

> CONFIG_HPET_EMULATE_RTC=y
> CONFIG_RTC_LIB=y
> CONFIG_RTC_CLASS=y
> CONFIG_RTC_HCTOSYS=y
> CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
> CONFIG_RTC_INTF_SYSFS=y
> CONFIG_RTC_INTF_PROC=y
> CONFIG_RTC_INTF_DEV=y
> [...]
> CONFIG_RTC_DRV_CMOS=y

Looks good, I don't think you need the other modules.

> and that system with the new hwclock command claimed it could not read
> the system clock!

a) Do you use udev?

b) Can you access /dev/rtc0, e.g. with "hwclock -f /dev/rtc0"?

Sven


Reply to: