Re: [zd1211-devs] Is it possible to use zd1211rw without udev???
Status: Beta
Brought to you by:
mayne
From: Andy G. <an...@wa...> - 2007-03-20 13:03:11
|
Remco wrote: >> So the crucial question for me is: >> Is it possible to use zd1211rw without udev? and >> What has to be done for this working? (I'm sure there is something to do:-) >> > > The only problem I can think of is loading the device's firmware. The driver > sends a notification to user space and user space is supposed to send the > firmware back to the device driver. You can use a much simpler script for embedded work that can cope with firmware loading then the hotplug or udev packages would use. #!/bin/sh # Both $DEVPATH and $FIRMWARE are already provided in the environment. HOTPLUG_FW_DIR=/lib/firmware date >>/tmp/hotplug_debug echo ACTION=$ACTION >>/tmp/hotplug_debug echo DEVICE=$DEVICE >>/tmp/hotplug_debug echo PRODUCT=$PRODUCT >>/tmp/hotplug_debug set >>/tmp/hotplug_debug if [ "$ACTION" = "remove" ] ; then echo "(aborting as it is remove)">>/tmp/hotplug_debug exit 0 fi echo DEVPATH=\'$DEVPATH\' >>/tmp/hotplug_debug echo FIRMWARE=\'$FIRMWARE\' >>/tmp/hotplug_debug ll $HOTPLUG_FW_DIR/$FIRMWARE >>/tmp/hotplug_debug echo >>/tmp/hotplug_debug ll /sys/$DEVPATH >>/tmp/hotplug_debug sleep 1 echo -n "1">/sys/$DEVPATH/loading sleep 1 cat $HOTPLUG_FW_DIR/$FIRMWARE >/sys/$DEVPATH/data echo -n "0">/sys/$DEVPATH/loading echo END >>/tmp/hotplug_debug -Andy |