Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to get source code of a Linux USB driver form somewhere ...... ????
I searched but could not find.
I am reading a book on Linux Device Drivers - III edition
But still I need something to start with !!!!
Well, you'll have to look at the kernelsources. Download the sources, extract the archive and enter the directory ./linux-2.6.??.?/drivers/usb/
There you will hopefully find what you're searching for.
If you install the Kernel Source packages for your particular Linux, you'll find plenty of existing examples of drivers ... including, no doubt, one that is quite close to what you're looking for. (Heck, it's entirely possible that you will stumble upon exactly what(!) you are looking for!)
"Use the Source, Luke!!"
Carefully browse the source-code of the driver. Compare it, at your leisure, to similar drivers in the neighborhood. These are, after all, the actual source-code files of deployed drivers that, as far as anyone and everyone knows, actually work! And they're written for the Linux distro that you are currently using! (Cool, huh?)
If there is any possible better-place to begin your studies than that, I do not know what it could possibly be.
I checked whole folder of Linux.
I found the driver folder and the USB folder in which there were around 14-15 folders all containing "Kconfig" and Makefiles !
I want to know where can I find the C codes or Perl Codes or Pyhton Codes or the Object files included in the Makefiles .....
I could not find any ????!!!!
Am I going wrong somewhere ?
If it is open sourced and there is a driver then it may be on the web.
If it is closed then you'd have to have access to it by some agreement. You can't easily decompile a driver to get source code.
If you have source for a similar make or know enough to get a close match you can take some other source code and work on it. Debug it if you know the differences in the hardware.
In some cases a windows driver or even windows source could be used.
Not sure what Perl or Python have to do with anything, as the kernel is written in C (with some Assembly).
You can browse the kernel sources online, at http://kernel.org. Use the "Gitweb" link for a given release and then the link that says "tree" (at the top) will give you the latest version of the source tree for that release.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.