Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
It depends whether or not the USB serial driver is a module or internal to the kernel. Odds are that it is included in the kernel. Whether you have to rebuild your kernel or your modules, that's the capability which you need. What you need to do first is find what kernel you do have and obtain all the source for it to be able to execute a build.
Thanks rtmistler for your replay. I have added a #define for the new device in option.c, Do i have to build the kernel for couple of line? Is there is way to compile the option.c and replace the object file?
If it's part of the kernel you have to rebuild the kernel because the result is one file.
If it's included as a module then you can rebuild just the one module, but you'd have to rebuild the entire module that uses that source. For instance a serial USB driver module may use a large number of source files, including that one, and therefore you'd have to rebuild that entire driver module.
My belief though is that a core file like USB serial is likely included in the kernel.
The process of building a .ko module is more involved than a simple compiled .c file. I would look for a way to rebuild the directory and let 'make' do it if at all possible.
I understand you not opening the kernel howto, but you might at least grok the index to see if he has comments on this buried somewhere. Once you understand the university reports system, it's easier to find your way around a howto. Nothing significant can go in the first half of the document; Things never get shortened or removed, only added; It's 'never mind the quality - feel the width!'
The process of building a .ko module is more involved than a simple compiled .c file. I would look for a way to rebuild the directory and let 'make' do it if at all possible.
I understand you not opening the kernel howto, but you might at least grok the index to see if he has comments on this buried somewhere. Once you understand the university reports system, it's easier to find your way around a howto. Nothing significant can go in the first half of the document; Things never get shortened or removed, only added; It's 'never mind the quality - feel the width!'
Thanks, for replay. Any issues will arise after building and replacing it (all in directory)?
Thanks, for replay. Any issues will arise after building and replacing it (all in directory)?
You should keep a backup of the original by renaming that to like <name>.ko.sav, put the new one in, owned by root and privileged as the other files are. Then you can reboot to test it.
You should keep a backup of the original by renaming that to like <name>.ko.sav, put the new one in, owned by root and privileged as the other files are. Then you can reboot to test it.
Do i have to compile one option.c file or All Serial folder files?
I have to this on Raspberry PI, any build tools required or any setup is required?
Do i have to compile one option.c file or All Serial folder files?
I have to this on Raspberry PI, any build tools required or any setup is required?
Yeah, you need to have the capability to build the kernel and modules for your Raspberry Pi and also the capability to build that on a different system, thus using a cross compiler.
This isn't a simple one-step thing you're asking by the way.
I recommend you follow that tutorial and give it a very honest try. At least read the overview and tutorial to discover just how involved this subject is.
Yeah, you need to have the capability to build the kernel and modules for your Raspberry Pi and also the capability to build that on a different system, thus using a cross compiler.
This isn't a simple one-step thing you're asking by the way.
I recommend you follow that tutorial and give it a very honest try. At least read the overview and tutorial to discover just how involved this subject is.
Thanks, i had compiled Linux from the sources but this time it looked liked a bit deep surgery. So took suggestions of you people.
Finally, Do i have to compile one file or entire folder?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.