[LinuxPPS] 2.6.25

Udo van den Heuvel udovdh at xs4all.nl
Sun Apr 20 19:24:24 CEST 2008


Reg Clemens wrote:
>> I made a wrappinbg/paste error, this is the right file (I removed
>> contents to make it clean):
>>
>> KERNEL=="ttyS0", RUN+="/bin/setserial -v %k low_latency hardpps"
>> KERNEL=="ttyS0",                SYMLINK+="gps0"
>> KERNEL=="pps0",                 SYMLINK+="gpspps0"
>>
>>
> And for those of us that cant keep up with the changing udev rules, there is 
> always
> the ntpd file in init.d . 
> Thats where I put the shell code to generate my symbolic links.
> Much simpler.

But then I need to patch that file when building my rpm.
Now I could just put one file in place and be finished.
Why can't life be simpler.. ;-)


Current incarnation:

KERNEL=="ttyS0", RUN+="/bin/setserial -v %k low_latency hardpps",
SYMLINK+="gps0"

KERNEL=="pps0", OWNER="root", GROUP="tty", MODE="0660",
SYMLINK+="gpspps0", OPTIONS+="last_rule"

(i.e. TWO lines)

But are they OK?
Will they work?

Hmmm..

# udevtest /sys/class/tty/ttyS0
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/etc/udev/rules.d/05-udev-early.rules' as rules file
parse_file: reading '/etc/udev/rules.d/10-pps.rules' as rules file
(...)
parse_file: reading '/etc/udev/rules.d/95-udev-late.rules' as rules file
import_uevent_var: import into environment: 'MAJOR=4'
import_uevent_var: import into environment: 'MINOR=64'
import_uevent_var: import into environment:
'PHYSDEVPATH=/devices/pnp0/00:08'
import_uevent_var: import into environment: 'PHYSDEVBUS=pnp'
import_uevent_var: import into environment: 'PHYSDEVDRIVER=serial'
udevtest: looking at device '/class/tty/ttyS0' from subsystem 'tty'
udev_rules_get_name: add symlink 'gps0'
udev_rules_get_name: no node name set, will use kernel name 'ttyS0'
udev_device_event: device '/class/tty/ttyS0' already in database, cleanup
udev_node_add: creating device node '/dev/ttyS0', major=4, minor=64,
mode=0660, uid=0, gid=14
udev_node_update_symlinks: update symlink 'gps0' of '/class/tty/ttyS0'
udev_db_get_devices_by_name: found index directory '/dev/.udev/names/gps0'
update_link: found 1 devices with name 'gps0'
update_link: found '/class/tty/ttyS0' for 'gps0'
update_link: compare (our own) priority of '/class/tty/ttyS0' 0 >= 0
update_link: 'gps0' with target 'ttyS0' has the highest priority 0,
create it
udevtest: run: '/bin/setserial -v ttyS0 low_latency hardpps'
udevtest: run: 'socket:/org/freedesktop/hal/udev_event'
udevtest: run: '/sbin/pam_console_apply /dev/ttyS0 /dev/gps0'
udevtest: run: 'socket:/org/kernel/udev/monitor'

And:

# udevtest /sys/class/pps/pps0/
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/etc/udev/rules.d/05-udev-early.rules' as rules file
parse_file: reading '/etc/udev/rules.d/10-pps.rules' as rules file
(....)
parse_file: reading '/etc/udev/rules.d/95-udev-late.rules' as rules file
import_uevent_var: import into environment: 'MAJOR=254'
import_uevent_var: import into environment: 'MINOR=0'
import_uevent_var: import into environment:
'PHYSDEVPATH=/devices/pnp0/00:08'
import_uevent_var: import into environment: 'PHYSDEVBUS=pnp'
import_uevent_var: import into environment: 'PHYSDEVDRIVER=serial'
udevtest: looking at device '/class/pps/pps0' from subsystem 'pps'
udev_rules_get_name: add symlink 'gpspps0'
udev_rules_get_name: no node name set, will use kernel name 'pps0'
udev_device_event: device '/class/pps/pps0' already in database, cleanup
udev_node_add: creating device node '/dev/pps0', major=254, minor=0,
mode=0660, uid=0, gid=5
udev_node_update_symlinks: update symlink 'gpspps0' of '/class/pps/pps0'
udev_db_get_devices_by_name: found index directory
'/dev/.udev/names/gpspps0'
update_link: found 1 devices with name 'gpspps0'
update_link: found '/class/pps/pps0' for 'gpspps0'
update_link: compare (our own) priority of '/class/pps/pps0' 0 >= 0
update_link: 'gpspps0' with target 'pps0' has the highest priority 0,
create it


Now only the real test (reboot) needs to be done.



More information about the LinuxPPS mailing list