Now that I\'ve got the build environment working, is it possible to recompile just a single module?
Maybe for the truly l33t kernelhackers, but not for us ordinary mortals. I tried doing the same thing for some other USB modules once, tracing through the maze of twisty little makefiles. Fortunately, a passer-by noticed my head starting to bulge, and pulled me away from the screen before it exploded.
Well, I\'m glad they caught you in time. Your exploding head would have made quite a mess on your Z.
There must be a way to do this. I can\'t imagine doing the edit/compile/test cycle with the full build script. Tres painful.
In any case, there IS at least one way to do it....
I guess you would call this the brute force method: run make modules, wait for the first gcc command line to pop-up, then hit ^c. Copy the command line, move to your module\'s directory (drivers/usb in my case), paste the command line, then edit it for your module. Works like a charm.
Is there a way to force usbnet to always assign one as usb0 and the other as usb1??
Alas, no. This is a problem that hits both USB devices, and network interfaces in general. It can be a real PITA when you\'ve got a machine that can handle, e.g., several different kinds of PPP interfaces (IrDA + Bluetooth + ISP dialup is not uncommon if you\'re tinkering with PDAs). Or have both a USB Zip drive and a USB flash card reader. There are things like network scripts and mount point permissions that expect the interface and device numbering to be stable, but some drivers assign them dynamically. I dunno whether this has been fixed in the 2.6 kernel (which I\'ve read got some pretty major restructuring in USB support), but it\'s a difficult enough problem that it wouldn\'t surprise me to find out that it hasn\'t.
Ran
That\'s a drag. Hey, it could be worst though, I guess: it could work like Windoze and require you to re-install the drivers just because you plugged the device into a different USB port!
I came up with a script to handle the USB storage devices on RH9. It\'s not totally automated (although, I\'d like to achieve that eventually), but it makes it a bit easier. Just this week, I found a way to iterate all of the /dev/sd** devices that have something connected to them AND determine which ones are mounted already. So, when I plug a USB MSD in, I can use this tool to figure out which sd device it was mapped to. I can then use my script to mount it and create a link with a friendly name in /. For example, I can mount my CF reader like this \"usbmnt cf sda1\", assuming it\'s in /dev/sda1, and I can access it with \"/cf\". When I\'m done with it, I can umount it with \"usbmnt -u cf\", and it cleans everything up including the /cf link. The suckiest part of it is that I have to create all of the possible sd mount points ahead of time and create entries in fstab for each so that non-root users can mount them.
I envision an app that detects when a new USB MSD is plugged in, identifies the device, and sets this stuff up automatically using a friendly name that I\'ve given it in the past, OR prompts me for the info when a new device is entered (and remembers it for future reference). I\'m pretty close to being able to do that now; I really just need to find a way to detect when a device is inserted. I think the cardmon applet on the Z does something very similar -- I\'ve been meaning to get a look at its source code (although I have to find it first -- anyone know if the source for Qtopia 1.5 is available somewhere?).
Unfortunately, there doesn\'t seem to be any hope of doing something similar for network interfaces.
~ray