/[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.4 Revision 1.8
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.4 2005/06/07 06:26:26 fox2mike Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/usb-guide.xml,v 1.8 2005/11/19 20:05:51 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>
14This document helps a user setup USB on a Gentoo system and configure various 14This document helps a user setup USB on a Gentoo system and configure various
15USB devices as well. 15USB devices as well.
16</abstract> 16</abstract>
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.0 --> 19<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
20<license/> 20<license/>
21 21
22<version>1.3</version> 22<version>1.6</version>
23<date>2005-06-07</date> 23<date>2005-11-19</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>
100covers USB modems and similar devices. 100covers USB modems and similar devices.
101</p> 101</p>
102 102
103</body> 103</body>
104</section> 104</section>
105<section id="#lspci"> 105<section>
106<title>What's on your machine?</title> 106<title>What's on your machine?</title>
107<body> 107<body>
108 108
109<p> 109<p>
110It is very simple to find out whether your machine has USB 2.0 support or not. 110It is very simple to find out whether your machine has USB 2.0 support or not.
154then proceed with the configuration accordingly. 154then proceed with the configuration accordingly.
155</note> 155</note>
156 156
157<p> 157<p>
158First emerge the kernel sources of your choice. Here we'll use the 158First emerge the kernel sources of your choice. Here we'll use the
159<c>gentoo-sources</c> For more information on the various kernel sources 159<c>gentoo-sources</c>. For more information on the various kernel sources
160available on Portage, please look up the <uri 160available on Portage, please look up the <uri
161link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri>. 161link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri>.
162</p> 162</p>
163 163
164<pre caption="Getting the kernel sources"> 164<pre caption="Getting the kernel sources">
393usb 1-1: USB disconnect, address 2 393usb 1-1: USB disconnect, address 2
394</pre> 394</pre>
395 395
396<p> 396<p>
397Once the device is connected and mounted, you can access it like a normal hard 397Once the device is connected and mounted, you can access it like a normal hard
398disk. Usual operations like <c>cp</c>, <c>mv</c>, <c>rm</c> etc work fine. You 398disk. Usual operations like <c>cp</c>, <c>mv</c>, <c>rm</c>, etc work fine. You
399could also create a filesystem on the USB stick/format it. 399could also create a filesystem on the USB stick/format it.
400</p> 400</p>
401 401
402<pre caption="Accessing the Memory Stick"> 402<pre caption="Accessing the Memory Stick">
403# <i>mount /dev/sda1 /mnt/usb</i> 403# <i>mount /dev/sda1 /mnt/usb</i>
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.
528Firmware can be defined as the software on a piece of hardware that is loaded 529Firmware 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 530and 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 531to 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 532critical 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 533in 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 534art 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 535in some cases, be the driver as well) is read and loaded onto memory after
535which the device can be used by the system. 536which the device can be used by the system.
536</p> 537</p>
537 538
538<p> 539<p>
539To cut the long story short, Gentoo uses <c>sys-apps/hotplug</c> to handle 540To 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. 541the 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 542<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 543usable. 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. 544and is picked up from there. Getting it is simple; the usual emerge will do.
544</p> 545</p>
545 546
546<pre caption="Installing hotplug"> 547<pre caption="Installing hotplug">
547# <i>emerge hotplug</i> 548# <i>emerge hotplug</i>
548</pre> 549</pre>
549 550
550<p> 551<p>
551Now the obvious question would be, what is coldplug and why is it needed? 552Now 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<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 554<e>hot-pluggable</e> devices that are already connected at boot time. A good
554example of this would be a USB Network card. Earlier hotplug was the package 555example of this would be a USB Network card. Earlier, hotplug was the package
555responsible for handling both but then it was split into hotplug and coldplug, 556responsible 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> 557with coldplug doing all the work. Install it if you have <e>hot-pluggable</e>
557devices that you need activated on boot up. 558devices that you need activated on boot up.
558</p> 559</p>
559 560
560<pre caption="Installing coldplug"> 561<pre caption="Installing coldplug">
561# <i>emerge coldplug</i> 562# <i>emerge coldplug</i>
565 * rc-update complete. 566 * rc-update complete.
566</pre> 567</pre>
567 568
568<note> 569<note>
569The above initscript does what hotplug's initscript used to do (for already 570The above initscript does what hotplug's initscript used to do (for already
570attached hot-pluggable devices). hotplug does not have an initscript of its 571attached hot-pluggable devices). The current <path>/etc/init.d/hotplug</path>
571own as of now. 572script does nothing more than check if the CONFIG_HOTPLUG is enabled for the
573current kernel.
572</note> 574</note>
573 575
574</body> 576</body>
575</section> 577</section>
576</chapter> 578</chapter>
580<section> 582<section>
581<title>References</title> 583<title>References</title>
582<body> 584<body>
583 585
584<p> 586<p>
585A good number of documents online helped me during writing this, and there are 587A good number of online documents helped me during the development of this
586some that are that are highly technical but truly interesting. I thought they 588document and there are some that are highly technical but truly interesting.
587all deserve some credit. So here we go! 589I thought they all deserve some credit, so here we go!
588</p> 590</p>
589 591
590<ul> 592<ul>
591 <li><uri link="http://www.usb.org">The Official USB Website</uri></li> 593 <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> 594 <li><uri link="http://www.usb.org/about/faq">The USB FAQ</uri></li>
593 <li> 595 <li>
594 <uri 596 <uri
595 link="http://h18000.www1.hp.com/productinfo/development/openhci.html">Compaq's 597 link="http://h18000.www1.hp.com/productinfo/development/openhci.html">Compaq's
596 OHCI Standard</uri> 598 OHCI Standard</uri>
597 </li> 599 </li>

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

  ViewVC Help
Powered by ViewVC 1.1.20