Gentoo Archives: gentoo-user

From: meino.cramer@×××.de
To: Gentoo <gentoo-user@l.g.o>
Subject: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how?
Date: Sun, 25 Aug 2013 04:04:27
Message-Id: 20130825040413.GA3342@solfire
1 Hi,
2
3 There are two RTCs in my system:
4 /dev/rtc0 and /dev/rtc1
5
6 rtc0 is not powered by a battery and forgets time/date
7 with system shutdown and rtc1 is a I2C-rtc (DS3231) which
8 is powered by a battery. It is extremly accurate in comparison
9 with rtc0.
10
11 rtc0 is accessible with system boot - rtc1 is not (current state).
12
13 To make rtc1 completly know to the system, I have to do a
14 echo ds3231 0x68 >! /sys/bus/i2c/devices/i2c-1/new_device
15 hwclock -f /dev/rtc1 -s
16 in beforehand.
17
18 I wrote a script for /etc/init.d, which does exactly this, and
19 the system login screen shows the correct tome/date information
20 even without ntp-client (the system should become independantly
21 from lan/internet). The script was added to the boot service
22 and executed after dev and modules.
23
24 The kernel is configured to use /dev/rtc1 and the driver for the
25 ds1307, which also handles the ds3231, is included into the kernel
26 (no module).
27
28 But it seems, that setting the system time this way is too late,
29 since there are still (for example) log files under /var/log
30 with a timestamp of the 1.1.1970.
31
32 Are there any other way to make rtc1 known and accessible earlier
33 to the system as the hack via a script in /etc/init.d ?
34
35 Thank you very much in advance for any help!
36 Best regards,
37 mcc

Replies

Subject Author
Re: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how? Mark David Dumlao <madumlao@×××××.com>
Re: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how? Paul Colquhoun <paulcol@×××××××××××××××××.au>