From owner-freebsd-arm@freebsd.org Tue Nov 26 22:43:46 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E7341C3A25 for ; Tue, 26 Nov 2019 22:43:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47MzTZ1jNGz4MGF for ; Tue, 26 Nov 2019 22:43:46 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1574808225; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=HwTmm/axw+z3dgX3GSd5NTbykRfckv0YuWNX5uSORBBmlPKabE4gYCYdBoD530P9VjfuiiGd/lUeJ oWyk7l0JdIP8GW2jqsnLRtFMBf1YsnB+Gz6VCKreIBv86ZxtHCIcjy2Rwi3hJelKh28KgmB/20ZwbQ xqnX/jJrRRFddY++6ok4tOAN48XzCB5tVYkn+EZly2dKplhTVf49rjWzraJq5XlZNOX6T4EQoj3r0V k3+w9T6/BBeiaRGF/x5fdR1zkkw9ojxlJ71d5p6zdnitahQnmdpbqdBsJehhpP9/Xd6rzGzMwZ90de iZr3YPYusln1KUJeW2l/EtI3osxWy+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=/J6kuWSFy16Q3dSA5oXnz2HtpcF44Y226VF5TlLFDN4=; b=rLMRvMofcpuErX754zL9Wcy65DtlSsM7w7qR1aTLldL+qCfSRaDFx2eyzY8Pai8FBAsxxbtTb/AWK ZoVZFmMyDDKwuEkITbH+x+KxPBQHxaeKGX5qIsdA/9jvasZJkHW06WqfDY0wVU3yJ1QQ4iTUclZkPN 6H75TC6Q5oOzIZABvWz8nWEjxCcds5inU+wz0EZiWdY4Uw0PbksrFAc8wHkn/tUI9in/VbgnAQKBM5 0hl0m3tQS0cNNuVzfXT22PeviLl65tThDEqbljHXH5AoIor+dZmZob0F1/lf8hI2HkXxCdEzodhn6E nUvtBdzrpSqXUCxf2zRPp23jT7/9I4g== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=/J6kuWSFy16Q3dSA5oXnz2HtpcF44Y226VF5TlLFDN4=; b=SF9u9vOsbl5vIG9+kohhEUPOgJuomFQ9Z5uvdGcnKzRpUSLJ/m1HB678q6GORowjQTo6uQLY2cuQv rElwtLd0POG/S9+wTJBZ7R+h2OG5ray3hRJCvkjBQ+uq15OwFnrGXkv0srkVsLBvmx9p2J45PRhMAv ylD7IOVLSXX/xCQxOA1utai8S0uK8WJo+EyPmbBaKHnIMSVFr1UJSnk63E4JQshsnE/L72eRjtx1eM ttGXIUUnynKUdZVXMfrOsQbZJLPhJZkx6bZJ6cdH2en4GgFVnYa7Cz7T3uuHdWNTuvKLfyBF31kI3w r0dCIXSLP9E8WH2mvjjVbq/Vv3Vl0Mg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 328070de-109e-11ea-b80c-052b4a66b6b2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 328070de-109e-11ea-b80c-052b4a66b6b2; Tue, 26 Nov 2019 22:43:43 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id xAQMhgJS074032; Tue, 26 Nov 2019 15:43:42 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <724aadb502353b0a2156d98f613cfa2bf2e6dd4c.camel@freebsd.org> Subject: Re: rpi3 clock drift From: Ian Lepore To: Bakul Shah , James Shuriff Cc: "freebsd-arm@freebsd.org" Date: Tue, 26 Nov 2019 15:43:42 -0700 In-Reply-To: <20191126222952.6BCFA156E80B@mail.bitblocks.com> References: <20191126222952.6BCFA156E80B@mail.bitblocks.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47MzTZ1jNGz4MGF X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.68 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.81)[-0.810,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-0.87)[-0.872,0] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2019 22:43:46 -0000 On Tue, 2019-11-26 at 14:29 -0800, Bakul Shah wrote: > On Tue, 26 Nov 2019 22:03:30 +0000 James Shuriff wrote: > > My Raspberry Pi 3 Model B is having some serious clock drift issues. Ntpd doe > > sn't function even with ntpd_sync_on_start, which calls ntpd with -g and allo > > ws the initial adjustment to exceed the panic threshold. This doesn't help me > > much because the system will continue to drift very quickly and that option > > only helps for the initial adjustment. > > > > I was thinking of ordering an I2C RTC but I'm unsure how to make FreeBSD awar > > e of the clock. > > > > There is a file in the Raspberry Pi firmware repo called i2c-rtc.dtbo and it > > contains defs for clocks like DS1307 so I am assuming I can add this to confi > > g.txt, build U-Boot with CONFIG_RTC_DS1307 (or whatever model), and build the > > kernel with device support for the clock but I'm not completely sure if I'm > > going about this the right way. Beyond just getting FreeBSD to see the clock > > I'm unsure how to tell FreeBSD to use it. Any advice? > > Is the clock really drifting or is this due the initial time > being waaay off from the current time due to a lack of RTC? If > the latter do the initial time setup using ntpdate. Add > > ntpdate_enable="YES" > > to /etc/rc.conf. > > If you can already use ntpd, there is not much point in using a local > rtc. > Using ntpd_sync_on_start=YES is effectively the same as using ntpdate_enable=YES... it gives ntpd permission to step the clock any amount, one time at startup. -- Ian