Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72958 - No existing documentation for getting Gentoo to work with USB
Summary: No existing documentation for getting Gentoo to work with USB
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Handbook (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-30 11:45 UTC by Richard Simpson
Modified: 2005-03-26 10:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
usb-guide.xml - Initial Draft (usb-guide.xml,20.98 KB, text/plain)
2005-03-02 01:36 UTC, Shyam Mani (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Simpson 2004-11-30 11:45:36 UTC
There is a stark lack of documentation on getting USB up and running with Gentoo. A paragraph or two in the installation guide and/or handbook would be welcome. The udev Guide almost covers this topic, but it needs to be updated to explain that coldplug is now responsible for running all the hotplug/*.rc scripts at startup rather than hotplug. Until I emerged coldplug, no kernel usb modules were being loaded, and obviously no usb devices could be detected.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2004-12-02 09:50:06 UTC
The installation guide shouldn't really be used for this. It already covers the setup of coldplug.

What would you like to see in a "USB on Gentoo" document? 
Comment 2 Richard Simpson 2004-12-02 12:34:10 UTC
After 2 days of research, I still don't think I know enough to answer that. But from the perspective of someone who has not previously set up USB with Linux, I can tell you that there was not enough mention of USB and hotplug in the documentation to alert me to the fact that I needed to emerge user-space packages like hotplug, coldplug, and udev in order to get USB to work. I believe a reference to the Gentoo UDEV Guide should be placed in the Handbook. The UDEV Guide needs updating to explain that coldplug is now required in the startup scripts in order to initialize udev and hotplugging (and everything it affects, like USB, PCI, etc.). The biggest gap I now have in my knowledge with using a pure udev environment (ie, no devfs) is this: the hotplug/*.rc startup scripts only address creating /dev nodes for usb, pnp, pci, etc. There is very little discussion of non-hotpluggable device nodes. For instance, my parallel port is now missing from /dev and I can't find a startup script that's responsible for creating it.
Comment 3 Richard Simpson 2004-12-02 21:47:54 UTC
Well, I had an epiphany and realized that rc and devfsd are doing a _lot_ of the setup for /dev, and I am starting to understand Gentoo's interim implementation of udev. It looks like it would take some effort to run completely without devfsd, so I'll probably just wait until 2005.0 or whenever Gentoo standardizes on udev. Please incorporate my previous comments about the documentation as you see fit; I still believe clarifying the need for hotplug, coldplug and pointing users in the direction of the udev guide has value. 
Comment 4 Shyam Mani (RETIRED) gentoo-dev 2004-12-28 10:37:41 UTC
Basic USB support is very simple to get going. hotplug/coldplug is needed only for those devices that need specific firmware to be loaded to make them work...
Comment 5 Shyam Mani (RETIRED) gentoo-dev 2005-01-06 02:54:51 UTC
I'm starting work on this, will keep you all posted.
Comment 6 Richard Simpson 2005-01-06 09:14:59 UTC
Thanks for your attention to this. Since this bug is a mixture of related issues, let me add one more: I have this week been attempting to get hotplug/udev working on a selinux-enabled system. From a posting to an nsa-selinux list a while back, 
http://www.nsa.gov/selinux/list-archive/0407/7752.cfm, 
Hardened Gentoo had issues with udev. It looks like udev may have overcome their objections now (ie, intergated selinux support). I think all that may be necessary is to add a udev policy to portage. Can you please confirm with the Hardened Gentoo Project if/when udev will be supported and get this into the documentation?
Thanks.
Comment 7 Sven Vermeulen (RETIRED) gentoo-dev 2005-02-05 06:55:55 UTC
Shyam, do you have something that we can work on?
Comment 8 Shyam Mani (RETIRED) gentoo-dev 2005-02-06 23:18:12 UTC
Nothing substantial as yet Sven, I was away on Tsunami relief work from the 14-30 of last month and then catching up with pending work. This week and the following should be a little easy on work, so I should have some progress soon.
Comment 9 Shyam Mani (RETIRED) gentoo-dev 2005-03-02 01:35:11 UTC
First up, sorry for the delay! This should have gone up a long time back...but RL manages to intervene ;)

Here's the first draft of the Gentoo USB guide, usb-guide.xml

There are a couple of things that I felt needed to be addressed & they are :

1) ASCII Art - I'm NOT an ASCII Art expert (this is my first shot lol), but I felt the need to draw a small figure to represent the USB architecture and I've done that. While it looks fine in the xml doc, after running it thru xsltproc, it looks messed. I need some help in rectifying that

2) Hotplug/Coldplug - I've covered what they are and why they are needed. Any other things needed, please feel free to add.

3) udev - I tried it once and it didn't work out. Sorry, I didn't like udev long before I started writing this lol, so this is primarily for a devfs system. If someone could writeup a section on udev/give me pointers, I can put in something useful.

4) Any queer devices out there that we can use as an example? I've demonstrated a pen drive and a USB optical mouse...one or two odd (not so common) devices might be nice.

I'll stop babbling and attach the doc now ;)
Comment 10 Shyam Mani (RETIRED) gentoo-dev 2005-03-02 01:36:38 UTC
Created attachment 52439 [details]
usb-guide.xml - Initial Draft
Comment 11 Sven Vermeulen (RETIRED) gentoo-dev 2005-03-26 09:04:05 UTC
A *very good* guide. The only change I made (and I hope it's not a wrong one) is to use /proc/bus/usb instead of /proc/usb for the usb filesystem (usbfs). My laptop uses x86 (not ~x86) but has it on /proc/bus/usb and this is confirmed by the kernel configuration help. Perhaps it changed recently.

Thanks! 
Comment 12 Shyam Mani (RETIRED) gentoo-dev 2005-03-26 09:50:40 UTC
Thank you for the oppurtunity to work on the doc! It was a wonderful learning experience :)

I guess the /proc/bus/usb was a pretty recent change, has it happened on the 2.4.x tree as well?

Comment 13 Sven Vermeulen (RETIRED) gentoo-dev 2005-03-26 10:22:45 UTC
No idea. However, I think it is safe to assume that most readers are or will be using a 2.6 kernel shortly (2005.0's default will be 2.6, 2.4 is available through a different profile).