modify kernel source without recompiling modules?
Hi,
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 Thanks! |
Quote:
Quote:
|
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? Thanks |
I never encountered that situation where I would change functionality, recompile the kernel but not the modules. Let's say that if it works it works, if it doesn't then you know wat to do...
|
i have always compiled the modules also when i am compiling the kernel but i dont know whether it is necessary or not...
|
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! |
All times are GMT -5. The time now is 06:14 PM. |