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.
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?
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.
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.
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...
I'm starting work on this, will keep you all posted.
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.
Shyam, do you have something that we can work on?
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.
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 ;)
Created attachment 52439 [details] usb-guide.xml - Initial Draft
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!
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?
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).