On Fri, Sep 20, 2002 at 08:27:48PM -0400, Andrew Pargeter wrote: > > 1- How do I build the code as a module? It looks like the Makefile in > /driver/usb is pretty straightforward. I suppose I have run "make modules" > from TOPDIR - is this what you have to run every time you make a change to > the skeleton source? Why descend into all of the modules? Is there a way > to build JUST the usb modules, or better yet just the skeleton usb module?
I think this was already answered, but just do: make modules SUBDIRS=drivers/usb and the modules in that directory and below will be rebuilt. > 2- What does "make modules_install" do? Apparently this is run after make > modules. It copies the modules to /lib/modules/<new_kernel_version> and sets up the module dependencies. > 3- Okay, so now I've got my skeleton.o or whatever. What has to be > configured as far as hotplug goes to get it loaded when I plug in my device? > We make a grand assumption that VID/PID were set up correctly in the > skeleton.c file and that this matches the VID/PID of the device that is > being plugged in! Assume there are no bugs either! All you have to do is have a MODULE_DEVICE_TABLE() entry for your device, and if it is plugged in, the hotplug package will automatically install your module. > 4- how do the /dev/usb entries get setup properly so I can open() the device > from a user mode app.? This depends on the type of driver you are using. If you want to use the USB major number, you will need to get an official minor number from me. Talk to me offline about how to get that. If you have a minor number, then create the major/minor numbered node wherever you like with mknod(1) and use that to access your device once it is connected to the system. Hope this helps, greg k-h ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel