Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've modified a source file in the linux kernel, and I would really like to use it without recompiling the modules.
At first sight, everything seems to work, but is it really safe to do this?
When I look at the System.map files of both kernels, I see that several symbols have changed location.
Can somebody explain to me how much they depend on each other?
=> Note: it concerns a small embedded system with only 2 modules
I've modified a source file in the linux kernel, and I would really like to use it without recompiling the modules. At first sight, everything seems to work, but is it really safe to do this?
The kernel source gets compiled and once it's up and running you shouldn't force changes. Besides, modifying a source file has no relation to the running kernel. But maybe I don't understand what you've done. Could you explain in detail what it is you have done?
Originally Posted by scottbiker
When I look at the System.map files of both kernels, I see that several symbols have changed location. Can somebody explain to me how much they depend on each other?
I've recompiled the kernel (fixed a bug), and I'm using this new kernel.
Now I'm wondering whether it is mandatory to recompile the kernel modules again (I prefer not to recompile the modules, because they are in a separately upgradable package for this embedded system).
People often say, that whenever you recompile a kernel you have to recompile the modules. But is this true?
When I recompile a modules against this modified kernel, the only change I see in the binary object is the date.
Or do you only have to recompile the modules after you have changed the .config for this kernel?
When you load a module, it becomes "part of the kernel." To my way of thinking, it's just smart to make sure that every "part of the kernel" has been recompiled as-needed. It should not take a significant amount of wall-time to "make" both the resident kernel and the modules. Then, you know.
Bottom line: "yeah, maybe you could, but why would you want to take the chance?" Why bother?
In fact, time is no concern in my case.
I'm dealing with an embedded platform, for which the kernel and the modules are in a separately upgradable package (kernel = a kernel image, modules = on the ramdisk image).
My main concern is, if there would be problems if the kernel is upgraded, and the modules are not upgraded (I didn't redo a 'make menuconfig' or so, I just modified one source file). So I would like to know if there could be compatibility issues.
And indeed, 'try if it works' is one approach, but why not try to understand the mechanics behind it?
My experience says:
- if you modify a source in the kernel, you don't have to rebuild the modules
- if you change the kernel configuration (make menuconfig), you have to rebuild the modules
Why is that?
=> Is there a kind of relocation table that is modified while doing a 'make menuconfig' ?
=> apart from that relocation table (if there would be any), all exported kernel symbols may change place, because linking happens dynamically (while loading the module) ?
I still hope that somebody can give some background info here, thanks!