/[gentoo]/xml/htdocs/doc/en/usb-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/usb-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.17
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/usb-guide.xml,v 1.6 2005/08/10 13:09:27 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/usb-guide.xml,v 1.17 2008/05/19 21:04:48 swift Exp $ -->
3 3
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5 5
6<guide link="/doc/en/usb-guide.xml"> 6<guide link="/doc/en/usb-guide.xml">
7<title>Gentoo Linux USB Guide</title> 7<title>Gentoo Linux USB Guide</title>
17 17
18<!-- The content of this document is licensed under the CC-BY-SA license --> 18<!-- The content of this document is licensed under the CC-BY-SA license -->
19<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 19<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
20<license/> 20<license/>
21 21
22<version>1.4</version> 22<version>1.13</version>
23<date>2005-06-17</date> 23<date>2007-04-09</date>
24 24
25<chapter> 25<chapter>
26<title>Introduction</title> 26<title>Introduction</title>
27<section> 27<section>
28<title>What is USB?</title> 28<title>What is USB?</title>
53<body> 53<body>
54 54
55<p> 55<p>
56Before we go onto the exact configuration options in the kernel, it would 56Before we go onto the exact configuration options in the kernel, it would
57be apt to look at USB in a little more detail. If you're in a hurry or want 57be apt to look at USB in a little more detail. If you're in a hurry or want
58to skip this section, please go to <uri link="#kernel">Kernel Configuration</uri>. 58to skip this section, please go to <uri link="#kernel">Kernel
59Configuration</uri>.
59</p> 60</p>
60 61
61<p> 62<p>
62A USB system has a host controller, hubs, a <e>root hub</e> amongst others 63A USB system has a host controller, hubs, a <e>root hub</e> amongst others
63and can support up to 127 USB devices including the hubs. The host controller 64and can support up to 127 USB devices including the hubs. The host controller
179the kernel sources you want to use. Please ensure the same before proceeding. 180the kernel sources you want to use. Please ensure the same before proceeding.
180</note> 181</note>
181 182
182</body> 183</body>
183</section> 184</section>
184<section id="2.6.xconfig"> 185<section id="newkernelconfig">
185<title>Config options for the 2.6.x kernel</title> 186<title>Config options for the 2.6.x kernel</title>
186<body> 187<body>
187 188
188<p> 189<p>
189Now we will look at some of the options we will have to enable in the 2.6 190Now we will look at some of the options we will have to enable in the 2.6
190kernel to ensure proper USB support for our devices. If you are using a 2.4 191kernel to ensure proper USB support for our devices. If you are using a 2.4
191kernel, please proceed with <uri link="#2.4.xconfig">Config options for the 192kernel, please proceed with <uri link="#oldkernelconfig">Config options for the
1922.4.x kernel</uri>. 1932.4.x kernel</uri>.
193</p> 194</p>
194 195
195<note> 196<note>
196Examples in this document will show configuration options for basic USB 197Examples in this document will show configuration options for basic USB
232 233
233<comment>(Moving a little further down, we come to CDC and mass storage.)</comment> 234<comment>(Moving a little further down, we come to CDC and mass storage.)</comment>
234&lt; &gt; USB Modem (CDC ACM) support 235&lt; &gt; USB Modem (CDC ACM) support
235&lt;*&gt; USB Printer support 236&lt;*&gt; USB Printer support
236&lt;*&gt; USB Mass Storage support 237&lt;*&gt; USB Mass Storage support
237 [*] USB Mass Storage Write-Protected Media Detection (EXPERIMENTAL)
238 238
239<comment>(Then the HID bits. 239<comment>(Then the HID bits.
240You have to select HID input support if you have a USB keyboard, 240You have to select HID input support if you have a USB keyboard,
241mouse, joystick or any other USB input device)</comment> 241mouse, joystick or any other USB input device)</comment>
242--- USB Input Devices 242--- USB Input Devices
260working as it should. 260working as it should.
261</p> 261</p>
262 262
263</body> 263</body>
264</section> 264</section>
265<section id="2.4.xconfig"> 265<section id="oldkernelconfig">
266<title>Config options for the 2.4.x kernel</title> 266<title>Config options for the 2.4.x kernel</title>
267<body> 267<body>
268 268
269<p> 269<p>
270We will look at the options the we will have to enable in the 2.4 kernel to 270We will look at the options the we will have to enable in the 2.4 kernel to
271ensure proper USB support for our devices. If you are using a 2.6 kernel, 271ensure proper USB support for our devices. If you are using a 2.6 kernel,
272please look at <uri link="#2.6.xconfig">Config options for the 2.6.x 272please look at <uri link="#newkernelconfig">Config options for the 2.6.x
273kernel</uri>. 273kernel</uri>.
274</p> 274</p>
275 275
276<note> 276<note>
277Examples in this document will show configuration options for basic USB 277Examples in this document will show configuration options for basic USB
409/dev/sda1 490M 34M 457M 7% /mnt/usb 409/dev/sda1 490M 34M 457M 7% /mnt/usb
410</pre> 410</pre>
411 411
412<note> 412<note>
413Digital cameras can be accessed the same way as memory sticks. I have a Nikon 413Digital cameras can be accessed the same way as memory sticks. I have a Nikon
414Coolpix 5200 and this is the way I access it. The camera is set to behave like 414Coolpix 5200 and this is the way I access it. Cameras these days usually have
415a USB mass storage device (as against PTP mode, which most cameras have these 415two modes to transfer pictures; USB mass storage and PTP (Picture Transfer
416days) and the procedure is exactly the same, because of which I have not 416Protocol). The camera is set to USB mass storage mode and hence the procedure is
417exactly the same as that of accessing a memory stick because of which I have not
417explained in detail about the same. Please note that this may NOT work in all 418explained in detail about it. Please note that this may NOT work in all cases
418cases and with all digital cameras that have USB support. 419and with all digital cameras that have USB support.
419</note> 420</note>
420 421
421<p> 422<p>
422How would a USB mouse show up in case you had one? It will show up as an HID 423How would a USB mouse show up in case you had one? It will show up as an HID
423device. 424device.
510which helps debugging as well as understanding how USB works. 511which helps debugging as well as understanding how USB works.
511</p> 512</p>
512 513
513</body> 514</body>
514</section> 515</section>
515<section>
516<title>Hot or Cold plug??</title>
517<body>
518
519<p>
520Gentoo uses two packages, <c>sys-apps/hotplug</c> and <c>sys-apps/coldplug</c>
521to do some magic with <e>hot-pluggable</e> devices. Just like any other magic
522trick, there is a simple logic behind this one too. We shall now see what that
523is, and in the process hopefully we will be able to understand these twins
524better.
525</p>
526
527<p>
528Firmware can be defined as the software on a piece of hardware that is loaded
529and executed but can't be modified easily. Many devices have firmware in them
530to ensure that they work properly and often firmware may contain code that is
531critical to ensure that the hardware performs as expected. Firmware is present
532in a wide variety of computer devices ranging from ROM chips to state of the
533art USB and PCMCIA cards. When a device is plugged in, the firmware (which may,
534in some cases, be the driver as well) is read and loaded onto memory after
535which the device can be used by the system.
536</p>
537
538<p>
539To cut the long story short, Gentoo uses <c>sys-apps/hotplug</c> to handle
540the firmware side of things in <e>hot-pluggable</e> devices.
541<c>sys-apps/hotplug</c> will use the required firmware to make that device
542usable. The firmware should be put in the <path>/lib/firmware</path> directory
543and is picked up from there. Getting it is simple: the usual emerge will do.
544</p>
545
546<pre caption="Installing hotplug">
547# <i>emerge hotplug</i>
548</pre>
549
550<p>
551Now the obvious question would be, what is coldplug and why is it needed?
552<c>sys-apps/coldplug</c> does what hotplug does, but it does it for
553<e>hot-pluggable</e> devices that are already connected at boot time. A good
554example of this would be a USB Network card. Earlier the hotplug package was
555responsible for handling both, but then it was split into hotplug and coldplug,
556each with their distinct purposes. Emerge it if you have <e>hot-pluggable</e>
557devices that you need activated on boot up.
558</p>
559
560<pre caption="Installing coldplug">
561# <i>emerge coldplug</i>
562<comment>(And you can add it to the boot runlevel)</comment>
563# <i>rc-update add coldplug boot</i>
564 * coldplug added to runlevel boot
565 * rc-update complete.
566</pre>
567
568<note>
569The above initscript does what hotplug's initscript used to do (for already
570attached hot-pluggable devices). hotplug does not have an initscript of its
571own as of now.
572</note>
573
574</body>
575</section>
576</chapter> 516</chapter>
577 517
578<chapter> 518<chapter>
579<title>And thanks to...</title> 519<title>And thanks to...</title>
580<section> 520<section>
581<title>References</title> 521<title>References</title>
582<body> 522<body>
583 523
584<p> 524<p>
585A good number of online documents helped me during the development of this 525A good number of online documents helped me during the development of this
586document and there are some that are highly technical but truly interesting. 526document and there are some that are highly technical but truly interesting.
587I thought they all deserve some credit, so here we go! 527I thought they all deserve some credit, so here we go!
588</p> 528</p>
589 529
590<ul> 530<ul>
591 <li><uri link="http://www.usb.org">The Official USB Website</uri></li> 531 <li><uri link="http://www.usb.org">The Official USB Website</uri></li>
592 <li><uri link="http://www.usb.org/faq">The USB FAQ</uri></li> 532 <li><uri link="http://www.usb.org/about/faq">The USB FAQ</uri></li>
593 <li> 533 <li>
594 <uri 534 <uri
595 link="http://h18000.www1.hp.com/productinfo/development/openhci.html">Compaq's 535 link="http://h18000.www1.hp.com/productinfo/development/openhci.html">Compaq's
596 OHCI Standard</uri> 536 OHCI Standard</uri>
597 </li> 537 </li>
605 </li> 545 </li>
606</ul> 546</ul>
607 547
608</body> 548</body>
609</section> 549</section>
550<section>
551<title>Other Interesting Links</title>
552<body>
553
554<ul>
555 <li><uri link="/doc/en/liveusb.xml">Gentoo Linux LiveUSB HOWTO</uri></li>
556</ul>
557
558</body>
559</section>
610</chapter> 560</chapter>
611</guide> 561</guide>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20