/[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.8 Revision 1.16
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.8 2005/11/19 20:05:51 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/usb-guide.xml,v 1.16 2007/04/10 06:48:59 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.6</version> 22<version>1.13</version>
23<date>2005-11-19</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>
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
508 507
509<p> 508<p>
510You can easily correlate the outputs of <c>lsusb</c> and <c>lsusb -t</c>, 509You can easily correlate the outputs of <c>lsusb</c> and <c>lsusb -t</c>,
511which helps debugging as well as understanding how USB works. 510which helps debugging as well as understanding how USB works.
512</p> 511</p>
513
514</body>
515</section>
516<section>
517<title>Hot or Cold plug??</title>
518<body>
519
520<p>
521Gentoo uses two packages, <c>sys-apps/hotplug</c> and <c>sys-apps/coldplug</c>
522to do some magic with <e>hot-pluggable</e> devices. Just like any other magic
523trick, there is a simple logic behind this one too. We shall now see what that
524is, and in the process hopefully we will be able to understand these twins
525better.
526</p>
527
528<p>
529Firmware can be defined as the software on a piece of hardware that is loaded
530and executed but can't be modified easily. Many devices have firmware in them
531to ensure that they work properly and often firmware may contain code that is
532critical to ensure that the hardware performs as expected. Firmware is present
533in a wide variety of computer devices ranging from ROM chips to state of the
534art USB and PCMCIA cards. When a device is plugged in, the firmware (which may,
535in some cases, be the driver as well) is read and loaded onto memory after
536which the device can be used by the system.
537</p>
538
539<p>
540To cut the long story short, Gentoo uses <c>sys-apps/hotplug</c> to handle
541the firmware side of things in <e>hot-pluggable</e> devices.
542<c>sys-apps/hotplug</c> will use the required firmware to make that device
543usable. The firmware should be put in the <path>/lib/firmware</path> directory
544and is picked up from there. Getting it is simple; the usual emerge will do.
545</p>
546
547<pre caption="Installing hotplug">
548# <i>emerge hotplug</i>
549</pre>
550
551<p>
552Now the obvious question would be, what is coldplug and why is it needed?
553<c>sys-apps/coldplug</c> does what hotplug does, but it does it for
554<e>hot-pluggable</e> devices that are already connected at boot time. A good
555example of this would be a USB Network card. Earlier, hotplug was the package
556responsible for handling both, but then it was split into hotplug and coldplug,
557with coldplug doing all the work. Install it if you have <e>hot-pluggable</e>
558devices that you need activated on boot up.
559</p>
560
561<pre caption="Installing coldplug">
562# <i>emerge coldplug</i>
563<comment>(And you can add it to the boot runlevel)</comment>
564# <i>rc-update add coldplug boot</i>
565 * coldplug added to runlevel boot
566 * rc-update complete.
567</pre>
568
569<note>
570The above initscript does what hotplug's initscript used to do (for already
571attached hot-pluggable devices). The current <path>/etc/init.d/hotplug</path>
572script does nothing more than check if the CONFIG_HOTPLUG is enabled for the
573current kernel.
574</note>
575 512
576</body> 513</body>
577</section> 514</section>
578</chapter> 515</chapter>
579 516
607 </li> 544 </li>
608</ul> 545</ul>
609 546
610</body> 547</body>
611</section> 548</section>
549<section>
550<title>Other Interesting Links</title>
551<body>
552
553<ul>
554 <li><uri link="/doc/en/liveusb.xml">Gentoo Linux LiveUSB HOWTO</uri></li>
555</ul>
556
557</body>
558</section>
612</chapter> 559</chapter>
613</guide> 560</guide>

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20