From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 58CF71381F3 for ; Sun, 25 Aug 2013 04:04:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3659E0C85; Sun, 25 Aug 2013 04:04:17 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B87BFE0B2B for ; Sun, 25 Aug 2013 04:04:16 +0000 (UTC) Received: from gmx.net ([84.133.158.32]) by mail.gmx.com (mrgmx003) with ESMTPA (Nemesis) id 0Ltr89-1WDpu718mj-011AdF for ; Sun, 25 Aug 2013 06:04:14 +0200 Received: by gmx.net (nbSMTP-1.00) for uid 1001 meino.cramer@gmx.de; Sun, 25 Aug 2013 06:04:14 +0200 (CEST) Date: Sun, 25 Aug 2013 06:04:13 +0200 From: meino.cramer@gmx.de To: Gentoo Subject: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how? Message-ID: <20130825040413.GA3342@solfire> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: mutt-ng/devel-r804 (Linux) X-Provags-ID: V03:K0:NONG0fBtXIxUE6OJmneplkC5/FW1hVA7JNpXuCVpzF2yRs3z8Ty 9WPUpDSoXJv3c4fl6VJZ6B2K0YDAaQQqr/M/3BXzf5LdYjePoB9VPuPQzToUmyhd9MytKO8 UDaq7BgiSdwwcSyBH8hZDELozNC4um9Az0NHels641B+2aCm8prPMMIwx8RVczIKzFbZD/4 nHNitKI/OTdBVi/QjSMGA== X-Archives-Salt: 0929b0a1-af76-4bde-b0af-3e573ac0e74d X-Archives-Hash: cb8622356bee08c9e11e122ee7e0d2fb Hi, There are two RTCs in my system: /dev/rtc0 and /dev/rtc1 rtc0 is not powered by a battery and forgets time/date with system shutdown and rtc1 is a I2C-rtc (DS3231) which is powered by a battery. It is extremly accurate in comparison with rtc0. rtc0 is accessible with system boot - rtc1 is not (current state). To make rtc1 completly know to the system, I have to do a echo ds3231 0x68 >! /sys/bus/i2c/devices/i2c-1/new_device hwclock -f /dev/rtc1 -s in beforehand. I wrote a script for /etc/init.d, which does exactly this, and the system login screen shows the correct tome/date information even without ntp-client (the system should become independantly from lan/internet). The script was added to the boot service and executed after dev and modules. The kernel is configured to use /dev/rtc1 and the driver for the ds1307, which also handles the ds3231, is included into the kernel (no module). But it seems, that setting the system time this way is too late, since there are still (for example) log files under /var/log with a timestamp of the 1.1.1970. Are there any other way to make rtc1 known and accessible earlier to the system as the hack via a script in /etc/init.d ? Thank you very much in advance for any help! Best regards, mcc