Le May 9, 2004 11:46 pm, Ron Hunter-Duvar a écrit :
> On May 8, 2004 22:26, Marc Lijour wrote:
> > How do you manage to have your fxload called each time you boot?
>
> ...
>
> I just downloaded the rpm file from source forge, then did:
>
> urpmi fxload-2002_04_11-1.i386.rpm

I use fxload-2002_04_11-2mdk (!)

>
> to install it. The code to call it each time was installed as part of the
> backpack driver install. Part of the backpack usb package was a script
> called bpckusb. The install script does the following (among other things):
>
> cp bpckusb /etc/hotplug/usb
>
> This script at the end has the line:
>
> /sbin/fxload $FLAGS -I $FIRMWARE

The script in my version is:
[EMAIL PROTECTED] hotplug]# cat usb/bpckusb
#!/bin/sh

# Load bulk/interrupt transfer test firmware into
# various EZ-USB USB devices that will run it

#TEMPLATE PROGRAM TAKEN FROM http://linux-hotplug.sourceforge.net/perf 
4/2/2002
#Adapted for BACKPACK USB drives

FIRMWARE=
FLAGS=

# pre-renumeration device IDs
case $PRODUCT in

# BACKPACK USB2 INTERNAL ADAPTER

#----------------------SCANNNERS SCANNERS-------------------------------
#external usb1 scanner
ac9/0/0)
        FIRMWARE=usb/bpckusb.fw/BP1SCAN.HEX
        ;;

#external usb2 scanner
ac9/1/*)
        FIRMWARE=usb/bpckusb.fw/BP2SCAN.HEX
        FLAGS="-2"
        ;;

#----------------------USB1 EXTERNAL-------------------------------
#external usb1 cd-romish series 5
ac9/1000/*)
        FIRMWARE=usb/bpckusb.fw/BP1CD5.HEX
        ;;
#external usb1 cd-romish series 6
ac9/1001/*)
        FIRMWARE=usb/bpckusb.fw/BP1CD6.HEX
        ;;
#external usb1 hard drive series 5
ac9/1002/*)
        FIRMWARE=usb/bpckusb.fw/BP1HD5.HEX
        ;;
#external usb1 hard drive series 6
ac9/1003/*)
        FIRMWARE=usb/bpckusb.fw/BP1HD6.HEX
        ;;

#----------------------USB2 EXTERNAL-------------------------------
#external usb2 cd-romish series 5
ac9/1004/*)
        FIRMWARE=usb/bpckusb.fw/BP2CD5.HEX
        FLAGS="-2"
        ;;
#external usb2 cd-romish series 6
ac9/1005/*)
        FIRMWARE=usb/bpckusb.fw/BP2CD6.HEX
        FLAGS="-2"
        ;;
#external usb2 hard drive series 5
ac9/1006/*)
        FIRMWARE=usb/bpckusb.fw/BP2HD5.HEX
        FLAGS="-2"
        ;;
#external usb2 hard drive series 6
ac9/1007/*)
        FIRMWARE=usb/bpckusb.fw/BP2HD6.HEX
        FLAGS="-2"
        ;;

#----------------------USB2 INTERNAL-------------------------------
#internal usb2 cd-romish drive
ac9/10/*)
        FIRMWARE=usb/bpckusb.fw/BPINTCD.HEX
        FLAGS="-2"
        ;;

#internal usb2 cd-romish drive
ac9/11/*)
        FIRMWARE=usb/bpckusb.fw/BPINTHD.HEX
        FLAGS="-2"
        ;;
esac


# quit unless we were called to download some firmware
if [ "$FIRMWARE" = "" ]; then
    # OR:  restructure to do other things for
    # specific post-renumeration devices
    exit 0
fi

# missing firmware?
if [ ! -r $FIRMWARE ]; then
    if [ -x /usr/bin/logger ]; then
        /usr/bin/logger -t $0 "missing $FIRMWARE for $PRODUCT ??"
    fi
    exit 1
fi

if [ ! -x /sbin/fxload ]; then
        if [ -x /usr/bin/logger ]; then
                /usr/bin/logger -t $0 "cannot load firmware, missing fxload"
        fi
        exit 1
fi

if [ -x /usr/bin/logger ]; then
    /usr/bin/logger -t $0 "load $FIRMWARE for $PRODUCT to $DEVICE"
fi

        /sbin/fxload $FLAGS -I $FIRMWARE

---- end ---
Where the PRODUCT variable is coming from? Where the messages are going to?
I have a problem in /var/log/messages: it looks like it can not find fxload 
however, a which finds it. How can I fix this? (Under which user the script 
is it called?)

May 10 16:01:50 laptop /etc/hotplug/usb/bpckusb: cannot load firmware, missing 
fxload
May 10 16:02:32 laptop devfsd[128]: read config file: 
"/etc/devfs/conf.d//usbmouse.conf"
[EMAIL PROTECTED] hotplug]# which fxload
/usr/sbin/fxload



> All of the usb.usermap lines start with "bpckusb". I'm assuming that
> roughly what happens is:
>
> 1. When you plug in the usb device (the backpack drive in this case), it
> looks up the device ids in usb.usermap.
>
> 2. From the line it finds there, it gets the name "bpckusb".
>
> 3. It runs the script/program of this name in /etc/hotplug/usb.
>
> 4. This script runs fxload to load the firmware.
>
> 5. The loaded firmware does some black magic with the usb modules to get
> itself recognized as a cd burner.

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to