Changeset 1055

Show
Ignore:
Timestamp:
10/15/06 10:53:46 (2 years ago)
Author:
tushar
Message:

Moved hotplug_usb_firewire to OLD

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/OLD/hotplug_usb_firewire.txt

    r668 r1055  
    1 TITLE:          Murasaki and hot-pluggable devices 
    2 LFS VERSION:    3.3+ 
    3 AUTHOR:         Kelledin <kelledin@users.sourceforge.net> 
    4 HINT VERSION:   1.0 
    5 DATE:           Sun Aug 25 2002 
     1AUTHOR: Kelledin <kelledin@users.sourceforge.net> 
     2DATE: 2003-09-20 
     3LICENSE: GNU Free Documentation License 
     4SYNOPSIS: Managing hot-pluggable devices with Murasaki 
     5DESCRIPTION: 
     6The Linux 2.4 kernel sports a new, more unified infrastructure for 
     7hot-pluggable devices (USB, IEEE1394, HotPlug PCI, etc).  This new 
     8infrastructure is designed to support automatic device and driver 
     9management by privileged userspace apps.  One such app designed for 
     10the purpose is murasaki. 
    611 
    7 SYNOPSIS 
    8     Getting hot-plug device drivers to load/unload automatically with Murasaki. 
     12PREREQUISITES: LFS 3.3 or later, kernel 2.4.1 or later 
    913 
    10  
    11 BACKGROUND INFORMATION 
    12 ====================== 
    13  
     14HINT: 
     151. Background Information 
     16------------------------------------------------------------------------------ 
    1417The Linux 2.4.x kernel sports a nifty little method of handling hot-pluggable 
    1518devices (USB, IEEE1394, CardBus, hot-plug PCI).  Essentially, whenever the 
     
    2225This is where murasaki comes in.  It's based closely on an older application 
    2326called usbmgr; in fact, it comes from many of the same authors and shares 
    24 much of the same code.  usbmgr, however, only supports USB devices.  When 
    25 the "murasaki" service is started, it will register "/sbin/hotplug.murasaki" 
    26 as the user-space process that should be called to handle loading/unloading 
    27 of hot-plug device drivers.  Currently, this is done by setting the contents 
    28 of /proc/sys/kernel/hotplug to "/sbin/hotplug.murasaki"; the default value 
    29 assigned by the kernel on boot is "/sbin/hotplug". 
     27much of the same code.  usbmgr, however, only supports USB devices. 
     28 
     29When the "murasaki" service is started, it will register 
     30"/sbin/hotplug.murasaki" as the user-space process that should be called to 
     31handle loading/unloading of hot-plug device drivers.  Currently, this is done 
     32by setting the contents of /proc/sys/kernel/hotplug to 
     33"/sbin/hotplug.murasaki"; the default value assigned by the kernel on boot is 
     34"/sbin/hotplug". 
    3035 
    3136If you're wondering how this package came by the name Murasaki...I don't know. 
     
    3439 
    3540 
    36 CAVEATS 
    37 ======= 
    38  
     412. Caveats 
     42------------------------------------------------------------------------------ 
    3943murasaki works quite well for USB and FireWire, but for CardBus/PCMCIA 
    40 devices, pcmcia-cs is the preferred solution.  Although the two technically 
    41 _should_ be able to coexist, it's not something I've tried yet.  You can try 
    42 it yourself; your mileage may vary. 
     44devices, pcmcia-cs is the preferred solution.  Fortunately, the two can 
     45coexist, although you should prevent murasaki's PCMCIA loader from running, 
     46just to be safe.  This is a simple matter of setting certain parameters in a 
     47configuration file; this will be described later. 
    4348 
    4449Not all hot-plug devices are supported (obviously).  You can check the status 
    4550of your devices at http://www.dotaster.com/~shuu/murasaki/device.html . 
    4651 
     52Also, note that not all PCI implementations are hot-plug PCI.  Hot-plug PCI 
     53features is currently only present in a few heavy-duty x86 servers, such as 
     54those from Compaq, and they require support from both the motherboard (or PCI 
     55backplane) and the PCI peripheral being hot-plugged.  Check your system 
     56documentation to determine whether your hardware supports hot-plug PCI; DO 
     57NOT JUST YANK RUNNING PCI CARDS TO EXPERIMENT, as this could very easily damage 
     58your hardware!!!  Also, make sure your specific hot-plug PCI implementation is 
     59supported by your Linux kernel. 
    4760 
    48 PREREQUISITES 
    49 ============= 
    5061 
     623. Detailed prerequisites 
     63------------------------------------------------------------------------------ 
    5164In order to get Murasaki working, you will first need a 2.4.x kernel.  2.4.0 
    5265does not cooperate with Murasaki without some patching, which I won't cover 
     
    5669When you compile this kernel, you will need to make sure it has HotPlug 
    5770support (CONFIG_HOTPLUG) and /proc filesystem support (CONFIG_PROC_FS), in 
    58 addition to all the other options you normally use. 
     71addition to all the other options you normally use.  If you wish to use the 
     72kernel's PCMCIA hardware modules, you should enable these as well, otherwise 
     73DISABLE "PCMCIA support" in the kernel.  Currently it is recommended that you 
     74disable "PCMCIA support" in the kernel and rely upon the modules from pcmcia-cs 
     75to serve your PCMCIA support needs. 
     76 
     77Also, in the (unlikely) event that your system has a working, usable hot-plug 
     78PCI implementation, you might want to enable the appropriate kernel driver 
     79for this functionality. 
    5980 
    6081You will also (obviously) need Murasaki.  At the time of this writing, the 
    61 latest "stable" version is 0.5.4, located at 
     82latest "stable" version is 0.6.11, located at 
    6283 
    63     http://www.dotaster.com/~shuu/murasaki/0.5/0.5.4/murasaki-0.5.4.tar.gz 
     84    http://www.dotaster.com/~shuu/murasaki/0.6/0.6.11/murasaki-0.5.4.tar.gz 
    6485 
    6586Although this may not be necessary, you should also get the latest preload 
    6687and device maps at http://www.dotaster.com/~shuu/linux/murasaki/ .  They 
    67 should be linked near the bottom of the page, just underneath the package 
    68 downloads.  These files should add the most current level of device support to 
    69 Murasaki. 
     88should be listed separately among the other package downloads.  These files 
     89should add the most current level of device support to Murasaki. 
    7090 
    7191 
    72 COMPILING 
    73 ========= 
    74  
     924. Compiling 
     93------------------------------------------------------------------------------ 
    7594I refuse to hold your hand through a kernel compile.  If you don't know how 
    7695to compile your own kernel, you shouldn't be using LFS in the first place. 
     
    81100 
    82101Murasaki defaults to putting binaries in /sbin, config files in /etc/murasaki, 
    83 the init script under /etc/rc.d/init.d, and runlevel symlinks under 
    84 /etc/rc.d .  While this is generally sensible, you may want to make a few 
    85 changes.  For instance, I like for init scripts to go under /etc/init.d (as 
    86 per the LSB+FHS), and runlevel symlinks to go under /etc .  Plus, I prefer 
    87 to make my runlevel symlinks manually.  In order to make such changes yourself, 
    88 edit the make.defs file in the Murasaki source tree and search for the 
    89 definitions of BIN_DIR, CONF_DIR, RC_DIR, and RC_INIT_DIR.  If you are like me 
    90 (you prefer to create runlevel symlinks yourself), or you use a BSD-style 
    91 init, you can simply set RC_DIR to point to some middle-of-nowhere path in 
    92 /tmp and scrap the files Murasaki creates under there after you're done.  Jus
    93 be sure to set RC_INIT_DIR properly whenever you change RC_DIR. 
     102the init script under /etc/rc.d/init.d, and runlevel symlinks under /etc/rc.d. 
     103While this is generally sensible, you may want to make a few changes.  For 
     104instance, I like for init scripts to go under /etc/init.d (as per the 
     105LSB+FHS), and runlevel symlinks to go under /etc.  Plus, I prefer to make my 
     106runlevel symlinks manually.  In order to make such changes yourself, edit the 
     107make.defs file in the Murasaki source tree and search for the definitions of 
     108BIN_DIR, CONF_DIR, RC_DIR, and RC_INIT_DIR.  If you are like me (you prefer to 
     109create runlevel symlinks yourself), or you use a BSD-style init, you can 
     110simply set RC_DIR to point to some middle-of-nowhere path in /tmp and scrap 
     111the files Murasaki creates under there after you're done.  Just be sure to se
     112RC_INIT_DIR properly whenever you change RC_DIR. 
    94113 
    95114Also, if you have an /etc/murasaki/murasaki.preload file left around from an 
     
    105124(or whatever location you specified for CONF_DIR). 
    106125 
    107 If all this goes off without a hitch, you can then start Murasaki using the 
    108 installed SysV init script.  By default, this resides under /etc/rc.d/init.d, 
    109 but if you set RC_INIT_DIR to some other location, it will be located there. 
    110 Just cd to that directory and run 
    111126 
    112     ./murasaki start 
     1275. Enabling Murasaki 
     128------------------------------------------------------------------------------ 
     129First, you may want to enable or disable murasaki's handling of certain device 
     130types.  This involves editing your murasaki.conf file to (located in CONF_DIR). 
     131In particular, you may wish to disable the "pci" functionality, which happens 
     132to encompass both PCMCIA and hot-plug PCI. 
    113133 
    114 To see if the murasaki service has been started, run 
     134Now you can now go about enabling Murasaki.  The preferred way to do this is 
     135is to use its SysV init script (i.e. run "/etc/init.d/murasaki start").  This 
     136takes care of some additional setup that may be necessary--mainly checking 
     137your PCI device tables to see what USB/FireWire controller chip you're using, 
     138and loading the appropriate driver. 
    115139 
    116     basename `cat /proc/sys/kernel/hotplug` 
     140You could also simply create a symlink called "/sbin/hotplug" to your 
     141hotplug.murasaki exectuable (usually /sbin/hotplug.murasaki), but you then 
     142lose the automatic initial setup.  You may be able to get by like this, but 
     143you're on your own if you try it. 
    117144 
    118 and see if the output is equal to "hotplug.murasaki".  If it is, Murasaki will 
    119 handle all requests for driver loading/unloading whenever a hot-plug device 
    120 is connected or disconnected. 
     145To check and see if the murasaki service has been started, you can run 
     146 
     147    cat /proc/sys/kernel/hotplug 
     148 
     149and see if the output is identical to the full path of your hotplug.murasaki 
     150executable.  If it is, Murasaki will handle all requests for driver 
     151loading/unloading whenever an appropriate hot-plug device is connected or 
     152disconnected. 
    121153 
    122154You can now connect your favorite (supported) USB/FireWire device.  When you 
    123155plug it in, you should hear your PC speaker beep rather unobtrusively (unless 
    124 you're one of those people who prefers to yank the PC speaker connection as 
    125 soon as you get your computer ;), and the device driver should be loaded 
     156you've disabled the beep somehow), and the device driver should be loaded 
    126157automatically. 
    127158 
     
    129160you don't, well, you're more-or-less on your own. ;) 
    130161 
     162------------------------------------------------------------------------------ 
     163 
     164CHANGELOG: 
     165[2003-09-20] 
     166* Updated to expand details and 
     167* Rewrote to accommodate new hints format.