[time-nuts] Soekris NTP server

John Ackermann N8UR jra at febo.com
Sat Dec 30 23:17:59 UTC 2006


Brendan Minish said the following on 12/30/2006 06:04 PM:
> On the soekris board wiring the following instruction is given on the
> febo site
> http://www.febo.com/time-freq/ntp/soekris/index.html
>         
>         Run a wire from the junction of R61/R62 (near the backup
>         battery) to one of the GPIO pins (I used PIO0, which is on JP3,
>         pin 3) and from there to a TTL-compatible PPS signal such as the
>         output of the FatPPS.
> 
> what is the purpose of this wire from r61/r62? on my board, a 4521 I
> can't find this junction with any degree of certanty, we we pulling the
> GPIO pin low here, or is something else going on?  

R61/R62 is the access point for the high-resolution timer in the CPU
chip.  Poul-Henning's extremely elegant hack has the PPS signal start
the timer and at the same time bring the GPIO pin low.  Since the GPIO
is interrupt-driven, it will always have jitter based on the Hz value.
So, when the interrupt hits the GPIO pin and it triggers, the code looks
at the timer register to find out how long ago the line actually went
low.  That's how he gets nanosecond resolution with a millisecond
interrupt rate.

I have no idea where the equivalent point would be on the 4521 board, or
if it even has the high-res timer available.

> And another dumb freeBSD question 
> where is the correct place to put the commands I want to run every time
> we boot 
> 
> basically I need to run 
> 
> sysctl machdep.elan_gpio_config=-----P...--..--------..---------
> to set up the GPIO 
> 
> then I need to create a couple of symlinks in /dev 
> for pps0 and gps0
> 
> we need to to this before the ntpd service is started or optionally
> start the ntpd service here after doing the above 
> 
> thanks for all the help
> .brendan 

I modify the ntpd startup script in /etc/rc.d to create the symlinks and
set up the GPIO.  Other system defaults like IP address are set in
/etc/rc.conf.

In order to save those files across reboots, you'll need to copy them
into the /cfg/ filesystem.

Hope this helps.

John




More information about the Time-nuts_lists.febo.com mailing list