| 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.5 2005/06/17 10:51:16 fox2mike Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/usb-guide.xml,v 1.6 2005/08/10 13:09:27 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> |
| … | |
… | |
| 154 | then proceed with the configuration accordingly. |
154 | then proceed with the configuration accordingly. |
| 155 | </note> |
155 | </note> |
| 156 | |
156 | |
| 157 | <p> |
157 | <p> |
| 158 | First emerge the kernel sources of your choice. Here we'll use the |
158 | First 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 |
| 160 | available on Portage, please look up the <uri |
160 | available on Portage, please look up the <uri |
| 161 | link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri>. |
161 | link="/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"> |
| … | |
… | |
| 393 | usb 1-1: USB disconnect, address 2 |
393 | usb 1-1: USB disconnect, address 2 |
| 394 | </pre> |
394 | </pre> |
| 395 | |
395 | |
| 396 | <p> |
396 | <p> |
| 397 | Once the device is connected and mounted, you can access it like a normal hard |
397 | Once the device is connected and mounted, you can access it like a normal hard |
| 398 | disk. Usual operations like <c>cp</c>, <c>mv</c>, <c>rm</c> etc work fine. You |
398 | disk. Usual operations like <c>cp</c>, <c>mv</c>, <c>rm</c>, etc work fine. You |
| 399 | could also create a filesystem on the USB stick/format it. |
399 | could 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> |
| … | |
… | |
| 528 | Firmware can be defined as the software on a piece of hardware that is loaded |
528 | Firmware can be defined as the software on a piece of hardware that is loaded |
| 529 | and executed but can't be modified easily. Many devices have firmware in them |
529 | and executed but can't be modified easily. Many devices have firmware in them |
| 530 | to ensure that they work properly and often firmware may contain code that is |
530 | to ensure that they work properly and often firmware may contain code that is |
| 531 | critical to ensure that the hardware performs as expected. Firmware is present |
531 | critical to ensure that the hardware performs as expected. Firmware is present |
| 532 | in a wide variety of computer devices ranging from ROM chips to state of the |
532 | in a wide variety of computer devices ranging from ROM chips to state of the |
| 533 | art USB and PCMCIA cards. When a device is plugged in, the firmware (which may |
533 | art USB and PCMCIA cards. When a device is plugged in, the firmware (which may, |
| 534 | in some cases be the driver as well) is read and loaded onto memory after |
534 | in some cases, be the driver as well) is read and loaded onto memory after |
| 535 | which the device can be used by the system. |
535 | which the device can be used by the system. |
| 536 | </p> |
536 | </p> |
| 537 | |
537 | |
| 538 | <p> |
538 | <p> |
| 539 | To cut the long story short, Gentoo uses <c>sys-apps/hotplug</c> to handle |
539 | To cut the long story short, Gentoo uses <c>sys-apps/hotplug</c> to handle |
| 540 | the firmware side of things in <e>hot-pluggable</e> devices. |
540 | the 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 |
541 | <c>sys-apps/hotplug</c> will use the required firmware to make that device |
| 542 | usable. The firmware should be put in the <path>/lib/firmware</path> directory |
542 | usable. The firmware should be put in the <path>/lib/firmware</path> directory |
| 543 | and is picked up from there. Getting it is simple, the usual emerge will do. |
543 | and is picked up from there. Getting it is simple: the usual emerge will do. |
| 544 | </p> |
544 | </p> |
| 545 | |
545 | |
| 546 | <pre caption="Installing hotplug"> |
546 | <pre caption="Installing hotplug"> |
| 547 | # <i>emerge hotplug</i> |
547 | # <i>emerge hotplug</i> |
| 548 | </pre> |
548 | </pre> |
| 549 | |
549 | |
| 550 | <p> |
550 | <p> |
| 551 | Now the obvious question would be, what is coldplug and why is it needed? |
551 | Now 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 |
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 |
553 | <e>hot-pluggable</e> devices that are already connected at boot time. A good |
| 554 | example of this would be a USB Network card. Earlier hotplug was the package |
554 | example of this would be a USB Network card. Earlier the hotplug package was |
| 555 | responsible for handling both but then it was split into hotplug and coldplug, |
555 | responsible for handling both, but then it was split into hotplug and coldplug, |
| 556 | each with their distinct purposes. Emerge it if you have <e>hot-pluggable</e> |
556 | each with their distinct purposes. Emerge it if you have <e>hot-pluggable</e> |
| 557 | devices that you need activated on boot up. |
557 | devices that you need activated on boot up. |
| 558 | </p> |
558 | </p> |
| 559 | |
559 | |
| 560 | <pre caption="Installing coldplug"> |
560 | <pre caption="Installing coldplug"> |
| … | |
… | |
| 580 | <section> |
580 | <section> |
| 581 | <title>References</title> |
581 | <title>References</title> |
| 582 | <body> |
582 | <body> |
| 583 | |
583 | |
| 584 | <p> |
584 | <p> |
| 585 | A good number of documents online helped me during writing this, and there are |
585 | A good number of online documents helped me during the development of this |
| 586 | some that are that are highly technical but truly interesting. I thought they |
586 | document and there are some that are highly technical but truly interesting. |
| 587 | all deserve some credit. So here we go! |
587 | I thought they all deserve some credit, so here we go! |
| 588 | </p> |
588 | </p> |
| 589 | |
589 | |
| 590 | <ul> |
590 | <ul> |
| 591 | <li><uri link="http://www.usb.org">The Official USB Website</uri></li> |
591 | <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> |
592 | <li><uri link="http://www.usb.org/faq">The USB FAQ</uri></li> |