/[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.15
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.15 2007/03/13 01:04:29 nightmorph 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.12</version>
23<date>2005-06-17</date> 23<date>2007-03-12</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>
179the kernel sources you want to use. Please ensure the same before proceeding. 179the kernel sources you want to use. Please ensure the same before proceeding.
180</note> 180</note>
181 181
182</body> 182</body>
183</section> 183</section>
184<section id="2.6.xconfig"> 184<section id="newkernelconfig">
185<title>Config options for the 2.6.x kernel</title> 185<title>Config options for the 2.6.x kernel</title>
186<body> 186<body>
187 187
188<p> 188<p>
189Now we will look at some of the options we will have to enable in the 2.6 189Now 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 190kernel 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 191kernel, please proceed with <uri link="#oldkernelconfig">Config options for the
1922.4.x kernel</uri>. 1922.4.x kernel</uri>.
193</p> 193</p>
194 194
195<note> 195<note>
196Examples in this document will show configuration options for basic USB 196Examples in this document will show configuration options for basic USB
232 232
233<comment>(Moving a little further down, we come to CDC and mass storage.)</comment> 233<comment>(Moving a little further down, we come to CDC and mass storage.)</comment>
234&lt; &gt; USB Modem (CDC ACM) support 234&lt; &gt; USB Modem (CDC ACM) support
235&lt;*&gt; USB Printer support 235&lt;*&gt; USB Printer support
236&lt;*&gt; USB Mass Storage support 236&lt;*&gt; USB Mass Storage support
237 [*] USB Mass Storage Write-Protected Media Detection (EXPERIMENTAL)
238 237
239<comment>(Then the HID bits. 238<comment>(Then the HID bits.
240You have to select HID input support if you have a USB keyboard, 239You have to select HID input support if you have a USB keyboard,
241mouse, joystick or any other USB input device)</comment> 240mouse, joystick or any other USB input device)</comment>
242--- USB Input Devices 241--- USB Input Devices
260working as it should. 259working as it should.
261</p> 260</p>
262 261
263</body> 262</body>
264</section> 263</section>
265<section id="2.4.xconfig"> 264<section id="oldkernelconfig">
266<title>Config options for the 2.4.x kernel</title> 265<title>Config options for the 2.4.x kernel</title>
267<body> 266<body>
268 267
269<p> 268<p>
270We will look at the options the we will have to enable in the 2.4 kernel to 269We 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, 270ensure 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 271please look at <uri link="#newkernelconfig">Config options for the 2.6.x
273kernel</uri>. 272kernel</uri>.
274</p> 273</p>
275 274
276<note> 275<note>
277Examples in this document will show configuration options for basic USB 276Examples in this document will show configuration options for basic USB
409/dev/sda1 490M 34M 457M 7% /mnt/usb 408/dev/sda1 490M 34M 457M 7% /mnt/usb
410</pre> 409</pre>
411 410
412<note> 411<note>
413Digital cameras can be accessed the same way as memory sticks. I have a Nikon 412Digital 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 413Coolpix 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 414two 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 415Protocol). The camera is set to USB mass storage mode and hence the procedure is
416exactly 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 417explained in detail about it. Please note that this may NOT work in all cases
418cases and with all digital cameras that have USB support. 418and with all digital cameras that have USB support.
419</note> 419</note>
420 420
421<p> 421<p>
422How would a USB mouse show up in case you had one? It will show up as an HID 422How would a USB mouse show up in case you had one? It will show up as an HID
423device. 423device.
511</p> 511</p>
512 512
513</body> 513</body>
514</section> 514</section>
515<section> 515<section>
516<title>Hot or Cold plug??</title> 516<title>Hotplug</title>
517<body> 517<body>
518 518
519<p> 519<p>
520Gentoo uses two packages, <c>sys-apps/hotplug</c> and <c>sys-apps/coldplug</c> 520Gentoo uses <c>sys-apps/hotplug</c> to do some magic with <e>hot-pluggable</e>
521to do some magic with <e>hot-pluggable</e> devices. Just like any other magic 521devices. Just like any other magic trick, there is a simple logic behind this
522trick, there is a simple logic behind this one too. We shall now see what that 522one too. We shall now see what that is, and in the process hopefully we will be
523is, and in the process hopefully we will be able to understand these twins 523able to understand it better.
524better.
525</p> 524</p>
526 525
527<p> 526<p>
528Firmware can be defined as the software on a piece of hardware that is loaded 527Firmware 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 528and executed but can't be modified easily. Many devices have firmware in them
538<p> 537<p>
539To cut the long story short, Gentoo uses <c>sys-apps/hotplug</c> to handle 538To 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. 539the 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 540<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 541usable. 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. 542and is picked up from there. Getting it is simple; the usual emerge will do.
544</p> 543</p>
545 544
546<pre caption="Installing hotplug"> 545<pre caption="Installing hotplug">
547# <i>emerge hotplug</i> 546# <i>emerge hotplug</i>
548</pre> 547</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 548
574</body> 549</body>
575</section> 550</section>
576</chapter> 551</chapter>
577 552
587I thought they all deserve some credit, so here we go! 562I thought they all deserve some credit, so here we go!
588</p> 563</p>
589 564
590<ul> 565<ul>
591 <li><uri link="http://www.usb.org">The Official USB Website</uri></li> 566 <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> 567 <li><uri link="http://www.usb.org/about/faq">The USB FAQ</uri></li>
593 <li> 568 <li>
594 <uri 569 <uri
595 link="http://h18000.www1.hp.com/productinfo/development/openhci.html">Compaq's 570 link="http://h18000.www1.hp.com/productinfo/development/openhci.html">Compaq's
596 OHCI Standard</uri> 571 OHCI Standard</uri>
597 </li> 572 </li>
605 </li> 580 </li>
606</ul> 581</ul>
607 582
608</body> 583</body>
609</section> 584</section>
585<section>
586<title>Other Interesting Links</title>
587<body>
588
589<ul>
590 <li><uri link="/doc/en/liveusb.xml">Gentoo Linux LiveUSB HOWTO</uri></li>
591</ul>
592
593</body>
594</section>
610</chapter> 595</chapter>
611</guide> 596</guide>

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

  ViewVC Help
Powered by ViewVC 1.1.20