From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-149960-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 4770A1381F3
	for <garchives@archives.gentoo.org>; Sun, 25 Aug 2013 04:18:09 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C073DE0C85;
	Sun, 25 Aug 2013 04:18:02 +0000 (UTC)
Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id BC595E0BE8
	for <gentoo-user@lists.gentoo.org>; Sun, 25 Aug 2013 04:18:01 +0000 (UTC)
Received: by mail-ie0-f174.google.com with SMTP id k14so3154987iea.33
        for <gentoo-user@lists.gentoo.org>; Sat, 24 Aug 2013 21:18:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=qfEvaE40sOVSNQalf6XSHnsIEwLv8J0xNeYbciWY1Ag=;
        b=r8AkJs5vY5+t4yFDaJFDhD73Gpq00G1GxRMSxWHek16V0BHynoGs4jshuiaDOQVXPD
         ccLcfq3K3pRs/ZDoVMMKiVQZy2gpnuvZq5VNhhARSRFKHKUy2uh0s1xHpQZDCg6qxJMX
         14oVo34ZxieXRz1BF5CYi2xRZyUt9Mu1CGNjy9xBT2o8jxOOMGU+aQpMUcF47AZiDg5p
         emXx46v04Q/b2irHjqzhVAEiqPHftKK1a5B2Ws5LlOp2mBa8F6YOugLVCjV5xcbMRht5
         BNSIIY4e1kYUM4XOj6cK8fLwmbKl5suGO9OPsf5fU8vdiQH4FHIsZaDvmx0OfN0r4HU8
         DyUA==
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
X-Received: by 10.50.126.2 with SMTP id mu2mr2722815igb.57.1377404280974; Sat,
 24 Aug 2013 21:18:00 -0700 (PDT)
Received: by 10.50.219.170 with HTTP; Sat, 24 Aug 2013 21:18:00 -0700 (PDT)
In-Reply-To: <20130825040413.GA3342@solfire>
References: <20130825040413.GA3342@solfire>
Date: Sun, 25 Aug 2013 12:18:00 +0800
Message-ID: <CAG2nJkPgkPMkAGcq8ztm_R8JEXh-XSa2RfY72v5HD0oApxyesQ@mail.gmail.com>
Subject: Re: [gentoo-user] Makeing /dev/rtc1 accessible as soon as possible - how?
From: Mark David Dumlao <madumlao@gmail.com>
To: gentoo-user@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
X-Archives-Salt: 358e1ef5-e936-41d1-ae9d-736c4d888d3a
X-Archives-Hash: 92d3194c7bdc8ca024214d82e87ba130

Which runlevel did you put your script on?
You probably want it on sysinit, rather than default.

Also, you can put rc_before= and rc_after= in the corresponding
/etc/conf.d/ file and make sure it runs before your syslog but after
your sysfs.

On Sun, Aug 25, 2013 at 12:04 PM,  <meino.cramer@gmx.de> wrote:
> 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
>
>
>
>



-- 
This email is:    [ ] actionable   [ ] fyi        [ ] social
Response needed:  [ ] yes          [ ] up to you  [ ] no
Time-sensitive:   [ ] immediate    [ ] soon       [ ] none