From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q4wyF-0007Vw-64 for garchives@archives.gentoo.org; Wed, 30 Mar 2011 15:06:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F75F1C14F for ; Wed, 30 Mar 2011 15:06:03 +0000 (UTC) Received: from mail-iy0-f181.google.com (mail-iy0-f181.google.com [209.85.210.181]) by pigeon.gentoo.org (Postfix) with ESMTP id B82211C01B for ; Wed, 30 Mar 2011 14:21:48 +0000 (UTC) Received: by iyb26 with SMTP id 26so1589035iyb.40 for ; Wed, 30 Mar 2011 07:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=LPXUh4HddB1j1LtD1zgitPkL5Qt62c4QtWIe3Q7KROY=; b=NiLGbbVXWmtL/rvNrx0YFCVlArt5hZlR2kjUIgiJ4voGim9ebQ5uxd+ce8etF1dnGN dSykPsw24Pp6DMM2gi9oeyXxjnenEcGYO24lBKi+m86pHSpyeygLtPratKWOQIlM3rS6 6drClbNnR8jxCMRtl8ExSbBcmrjTTu4O9Si5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=l6kB0ijoUu9Mh7lrtdC3q/IFR66OVt7h2Dg8OoBpheN344eNj3sqCjKE+Q314EZfTy TSD80AaewWx+Y0LzgXKkyhJe2aiUI3hRZg3wO6fq8XiZ2dDFfNnGfeVBjRC/ctfAWl2q 17ZqGcLEfcmT51aG58hKUJ5NZ4bjRMNYSeOqk= Received: by 10.231.140.81 with SMTP id h17mr1365192ibu.47.1301494907874; Wed, 30 Mar 2011 07:21:47 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 Sender: vapierfilter@gmail.com Received: by 10.231.11.195 with HTTP; Wed, 30 Mar 2011 07:21:26 -0700 (PDT) In-Reply-To: <4D93373A.9010605@wildgooses.com> References: <4D92902B.5000300@gentoo.org> <4D93373A.9010605@wildgooses.com> From: Mike Frysinger Date: Wed, 30 Mar 2011 10:21:26 -0400 X-Google-Sender-Auth: 4NyMKrYfRsfgeNdgxhAtu14Vfsk Message-ID: Subject: Re: [gentoo-embedded] Getting network time early in boot To: gentoo-embedded@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 2d42dbc736645c6ff7c1e9415ac5969b On Wed, Mar 30, 2011 at 9:59 AM, Ed W wrote: > On 30/03/2011 05:47, Mike Frysinger wrote: >> On Tue, Mar 29, 2011 at 10:06 PM, Joe Sapp wrote: >>> I've got a board with no RTC so there are some problems during boot. >>> Currently there's a hack in the udev init script to get the time from t= he >>> network (via ntp or rdate), but I'm wondering if somebody else has solv= ed >>> this in a better way. =A0Any ideas? >> >> add your own init.d script, mark it "before udev', and add it to boot ru= nlevel ? > > You would still have the problem that you can't run it until at least > after you start network of course? that depends on how the board comes up. if the boot loader provides network settings to the kernel (autoconfig), it might be up. or if people have an initramfs that brings things up. > Some people might not know of /etc/init.d/swclock. =A0It writes the time > at shutdown and restores *that* old time on bootup. =A0For some scenarios > that might get you a time close to reality... (eg if you just want to > check stuff like "has this file changed" and avoid "clock moved > backwards" kind of issues) that can be useful depending on the system needs. i tend to forget about i= t ;). -mike