[LinuxPPS] Patches for kernel 2.6.26-rc8
Rodolfo Giometti
giometti at enneenne.com
Thu Jul 3 13:33:50 CEST 2008
On Thu, Jul 03, 2008 at 12:11:15AM +0000, Cirilo Bernardo wrote:
> On Wed, Jul 2, 2008 at 7:16 PM, Hal V. Engel <hvengel at astound.net> wrote:
> [snip]
> > Also when I call ppsldisc in my udev rules it appears to fail and I have to
> > run it by hand to get the pps device setup. What needs to be done to get
> > this to work as part of the udev rules so that the device is created at boot
> > time?
> >
>
> Isn't the /dev/ppsN device only created when the N_PPS ldisc is set?
> In which case there is no point in invoking ppsldisc when the device
> is created.
>
> I think the most convenient thing to do to overcome the various
> problems, including the problems brought up by Reg, is to set up the
> boot scripts to create the /dev/ppsN device nodes which will be used
> on the system. For those running Debian GNU/Linux, this can be done
> by modifying the /etc/udev/links.conf file. If the device nodes are
> created statically then the only remaining issue is when to call the
> IOCTL to set N_PPS. The udev rules may also need to be modified so
> that the device nodes are not removed when the device driver is
> unloaded.
Another (and maybe better) solution is to use ppsldisc __before__
running NTPD. So you should modify your NTPD init script in order to
do something like that:
...
ppsldisc $SERIAL_PORT &
ntpd <options>
killall ppsldisc
...
In this manner udev creates for you the pps device and you don't need
to modify the refclocks code at all.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
More information about the LinuxPPS
mailing list