[ntp:questions] Configuring FreeBSD 6.2 for use with Garmin GPS 18 LVC
Speechless
noone at nowhere.com
Sat Dec 15 15:12:32 UTC 2007
On Fri, 14 Dec 2007 11:12:00 -0800, "Dennis Hilberg, Jr."
<timekeeper at dennishilberg.com.invalid> wrote:
>Hello,
>
>As the subject line suggests, I would like to set up FreeBSD 6.2 to use my
>Garmin GPS 18 LVC as a refclock.
>
>I've been following advice from David Taylor's web page on this subject
>http://www.david-taylor.myby.co.uk/ntp/FreeBSD-GPS-PPS.htm , although he
>used FreeBSD 5.4.
>
>I have a few questions regarding the configuration. I understand that
>'options PPS_SYNC' needs to be added to the kernel config file, and that the
>kernel then needs to be recompiled.
You may want to use FreeBSD 6.3, scheduled for release in about 10
days or FreeBSD 7.0 scheduled for release sometime mid January 2008.
I vaguely recall some discussion circa May/June 2007 about there being
some issues with PPS_SYNC and SMP kernel code in FBSD 6.2. I was
preoccupied with other matters at the time, so I didn't really pay
attention that much but, I seem to recall that the fix was not trivial
and that they were talking about putting the fix into FBSD 6.3 and 7.0
rather than risk making 6.2 unstable as a whole. I am not sure
whether or not the final decision included a fix for 6.2
> However, he includes a comment from
>Harlan Stenn stating that 'include GENERIC', 'ident PPS-GENERIC', and
>'options PPS_SYNC' need to be added to the file /usr/src/sys/i386/conf/PPS .
You need to create a file in directory:
/usr/src/sys/<architecture>/conf/
Where: <architecture> depends on what kind of hardware you have
i386 = Intel,
amd64 = AMD, etc.
> This file doesn't exist on my system. Do I need to create the file from
>scratch with those items in it, or is it something that is created after the
>kernel recompile?
Yes, you create a kernel configuration file:
/usr/src/sys/<architecture>/conf/<filename>
Where: <filename> should be the same as kernel ident within
eg.: If the contents of your kernel configuration file is:
#
# Generic kernel configuration with PPS_SYNC option
#
include GENERIC
ident PPS-GENERIC
options PPS_SYNC
then your kernel configuration <filename> should be: PPS-GENERIC
eg.: /usr/src/sys/<architecture>/conf/PPS-GENERIC
To compile your kernel, log-in as root and issue the following
commands:
cd /usr/src
make buildkernel KERNCONF=<filename>
Where: <filename> is the name of your kernel configuration file
eg: make buildkernel KERNCONF=PPS-GENERIC
If kernel compiles without errors, install kernel:
make installkernel KERNCONF=<filename>
Where: <filename> is the name of your kernel configuration file
After kernel install, reboot into new kernel:
shutdown -r now
If new kernel fails to boot:
Strike SPACE BAR during bootstrap countdown
Select option: 6 - Escape to loader prompt
At loader prompt, issue commands:
unload
boot kernel.old
Commands for post-install clean up:
cd /usr/obj
chflags -R noschg *
rm -rf *
cd /usr/src
make clean
You now have a FreeBSD kernel configured for a PPS reference clock.
>
>I emailed David Taylor with these questions regarding the configuration, and
>he replied that he can't quite remember exactly how he configured his
>system, and if that PPS file needed to be created from scratch or not. So
>he directed me to the newsgroup.
>
>If someone could give me a complete list of steps that need to be taken to
>configure FreeBSD to use the GPS 18 LVC, or point me to some documentation
>on the matter, I would greatly appreciate it. I'm new to FreeBSD and don't
>know my way around.
In addition to configuring the kernel as described above, you will
also have to configure a serial port by adding the following lines to
/etc/devfs.conf:
#
# Set up serial port for general purpose call-out
# Reference: devfs.conf(5)
#
own cuadx root:wheel
perm cuadx 0660
own cuadx.init root:wheel
perm cuadx.init 0660
own cuadx.lock root:wheel
perm cuadx.lock 0660
Where: x in cuadx = 0 (zero) for COM1, x = 1 (one) for COM2
You will also have to include a link statement in /etc/devfs.conf to
link the serial port configured above to the device name the driver
expects. Assuming you would be using driver Type 20 and the
documentation is correct, the statement would be:
link cuadx gpsu
Where: x in cuadx = 0 (zero) for COM1, or 1 (one) for COM2
u in gpsu = u in 127.127.20.u = unit number
where unit number is described in documentation for Type 20 driver:
http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html
and in the man page: ntp.conf(5)
After done configuring /etc/devfs.conf, reboot the system for the
changes to take effect: shutdown -r now
STANDARD DISCLAIMERS APPLY: Use at your own risk, I'm not responsible
for what you do, etc. Information herein is based on very few notes
and many recollections, some perhaps faulty, of what I did under
FreeBSD-7.0-BETA2 running on a cranky old laptop for a
proof-of-concept project. FreeBSD 7.0 is now at BETA4, my cranky old
laptop is no more after failing to survive my dog's territorial
behavior, and all the rest is history. It all worked for me at the
time I tried it. Your milage may vary.
More information about the questions
mailing list