From 274b05030f73aeb95301c619b86edcf3967bba17 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Wed, 6 Sep 2006 20:41:40 +0000 Subject: A hacked udev support for xpp_fxloader. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1420 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/utils/xpp_fxloader | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'xpp') diff --git a/xpp/utils/xpp_fxloader b/xpp/utils/xpp_fxloader index ba371e3..f584266 100644 --- a/xpp/utils/xpp_fxloader +++ b/xpp/utils/xpp_fxloader @@ -23,6 +23,20 @@ # 1. Copy this file and the file xpp_fxloader.usermap to /etc/hotplug/usb/ # 2. tail -f /var/log/messages... # +# +# Suggested udev configuration: I used the following file as +# /etc/udev/rules.d/z60_zaptel.rules : +# +# BUS!="usb", ACTION!="add", GOTO="zaptel_usb_add_end" +# +# SYSFS{idVendor}=="04b4", SYSFS{idProduct}=="8613", \ +# RUN+="/etc/hotplug/usb/xpp_fxloader udev $sysfs{idVendor}/$sysfs{idProduct}/" +# SYSFS{idVendor}=="e4e4", SYSFS{idProduct}=="1130", \ +# RUN+="/etc/hotplug/usb/xpp_fxloader udev $sysfs{idVendor}/$sysfs{idProduct}/" +# SYSFS{idVendor}=="e4e4", SYSFS{idProduct}=="1131", \ +# RUN+="/etc/hotplug/usb/xpp_fxloader udev $sysfs{idVendor}/$sysfs{idProduct}/" +# +# LABEL="zaptel_usb_add_end" # # Written by Tzafrir Cohen # Copyright (C) 2006, Xorcom @@ -126,6 +140,12 @@ load_fpga() { # to run manually, pass the parameter 'xppdetect' case "$1" in +udev) + # the following emulate hotplug's environment from udev's environment: + DEVICE=`echo $DEVNAME | sed -e 's|^/dev/|/proc/|'` + PRODUCT="$2" + # skip on to the rest of the script. Don't exit. + ;; xppdetect|load|usb) echo "--------- FIRMWARE LOADING: ($1)" -- cgit v1.2.3