Florian Philipp <li...@binarywings.net> [12-02-06 20:00]:
> Am 06.02.2012 19:39, schrieb meino.cra...@gmx.de:
> > Michael Mol <mike...@gmail.com> [12-02-06 19:20]:
> >> On Mon, Feb 6, 2012 at 12:51 PM,  <meino.cra...@gmx.de> wrote:
> >>> Hi,
> >>>
> >>> to get the correct system time I use ntp-client in the boot process.
> >>> Furthermore in /etc/conf.d/hwclock I set:
> >>>
> >>>    # Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known 
> >>> as
> >>>    # Greenwich Mean Time).  If that clock is set to the local time, then
> >>>    # set CLOCK to "local".  Note that if you dual boot with Windows, then
> >>>    # you should set it to "local".
> >>>    clock="UTC"
> >>>
> >>>    # If you want to set the Hardware Clock to the current System Time
> >>>    # (software clock) during shutdown, then say "YES" here.
> >>>    # You normally don't need to do this if you run a ntp daemon.
> >>>    clock_systohc="YES"
> >>>
> >>>    # If you want to set the system time to the current hardware clock
> >>>    # during bootup, then say "YES" here. You do not need this if you are
> >>>    # running a modern kernel with CONFIG_RTC_HCTOSYS set to y.
> >>>    # Also, be aware that if you set this to "NO", the system time will
> >>>    # never be saved to the hardware clock unless you set
> >>>    # clock_systohc="YES" above.
> >>>    clock_hctosys="NO"
> >>>
> >>>    # If you wish to pass any other arguments to hwclock during bootup,
> >>>    # you may do so here. Alpha users may wish to use --arc or --srm here.
> >>>    clock_args=""
> >>>
> >>> In the kernel config file I had set:
> >>>
> >>>    CONFIG_RTC_HCTOSYS=y
> >>>    CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
> >>>
> >>> I would exspect that after a reboot of the system which system time is
> >>> correctly set via ntp-client that the hwclock and system time only
> >>> differ in a small amount of time.
> >>>
> >>> But:
> >>> solfire:/home/mccramer>hwclock
> >>> Mon Feb  6 19:05:11 2012  -0.172569 seconds
> >>> solfire:/home/mccramer>date
> >>> Mon Feb  6 18:49:37 CET 2012
> >>> solfire:/home/mccramer>
> >>
> >> I don't know the CET tz, but I can see that the minutes don't match
> >> up. I assume you rand the two commands within seconds of each other.
> >> Is this true immediately after bootup, or does it take a while to get
> >> that far off? It could be that your hardware clock is drifting, and
> >> the system won't reset it until it goes to shutdown.
> >>
> >> -- 
> >> :wq
> >>
> > 
> > Hi Michael,
> > thank you for your reply.
> > I set the configuration as mentioned above and booted twice with about
> > five minutes wait.
> > The commands were executed within seconds, yes.
> > All hardware clocks drifts, but this is not the problem.
> > The problem is that the hardware clock is not set to the system time
> > in contradiction to what I think the comments in the config are 
> > saying.
> > 
> > How can I fix that?
> > 
> > Thank you very much in advance for any help!
> > Best regards,
> > mcc
> > 
> > 
> > 
> 
> Is your RTC driver compiled into the kernel? The "httosys" function of
> the kernel takes place before any modules can be loaded and will fail if
> your CMOS clock driver is a module.
> 
> Activating clock_hctosys in /etc/conf.d/hwclock should solve this as it
> takes place later in the boot process.
> 
> Regards,
> Florian Philipp
> 


As I wrote the kernel is configured


         CONFIG_RTC_HCTOSYS=y
         CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

so there is no module, the functionality is compiled into the kernel.

And as I wrote I am using the ntp_client to set the system time via
ntp/ntp_client later in the boot process to get the correct system
time.



Reply via email to