Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-embedded
Navigation:
Lists: gentoo-embedded: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-embedded@g.o
From: Christopher Friedt <chrisfriedt@...>
Subject: sysvinit: sanetime for boards without an rtc?
Date: Sat, 23 Jul 2011 13:10:13 -0400
Hi folks,

I have a couple of boards that ship by default without RTC devices and
boot time always incurs the following nasty messages in multiplicity.

...
 * One of the files in /etc/{conf.d,init.d} or /etc/rc.conf
 * has a modification time in the future!
 * One of the files in /etc/{conf.d,init.d} or /etc/rc.conf
 * has a modification time in the future!
...

A very simple solution was be to maintain an /etc/sanetime file that
would set a time other than the epoch at boot. Something within the
last day, month, year, or decade even ;-)

There's a fallback sanetime in /etc/init.d/sanetime just in case
/etc/sanetime doesn't exist, and it works naturally because time is
monotonically increasing (last I checked).

Also, it would seem that /etc/clock doesn't fail gracefully when there
is no rtc, even when there are provisions to 'fakeit' for other
reasons.

...
 * Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.Can
not access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
 * Failed to set clock You will need to set the clock yourself

   [ !! ]
...

It was just a matter of adding an /etc/init.d/sanetime script,
slightly patching /etc/init.d/clock & /sbin/rc (AFAIK this only works
for sysvinit, not openrc).

See the attached files.

Cheers,

C

PS: I was going to file a bug report, but it seems that the
certificate for bugs.gentoo.org has become invalid ATM.
Attachment:
add-sanetime-to-sbin-rc.patch (Binary data)
Attachment:
add-sanetime-to-etc-init.d-clock.patch (Binary data)
Attachment:
sanetime (Binary data)
Replies:
Re: sysvinit: sanetime for boards without an rtc?
-- Peter Volkov
Navigation:
Lists: gentoo-embedded: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
"rm -rf" stuck on pandaboard
Next by thread:
Re: sysvinit: sanetime for boards without an rtc?
Previous by date:
Re: "rm -rf" stuck on pandaboard
Next by date:
Re: "rm -rf" stuck on pandaboard


Updated Jun 25, 2012

Summary: Archive of the gentoo-embedded mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.