summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-06 20:41:40 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-09-06 20:41:40 +0000
commit274b05030f73aeb95301c619b86edcf3967bba17 (patch)
treef40b34529a884f379c959a3997222d92a44850a7
parente328d11722dbd0ec59cf44bcfdd532d3b42f3ef8 (diff)
A hacked udev support for xpp_fxloader.
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1420 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--xpp/utils/xpp_fxloader20
1 files changed, 20 insertions, 0 deletions
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 <tzafrir.cohen@xorcom.com>
# 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)"