D
D
dmitrysmaile2018-11-20 23:37:12
linux
dmitrysmaile, 2018-11-20 23:37:12

Transferring a compiled Linux kernel module to another machine?

Hello. The more I read information on kernel modules, the more questions arise. Can I compile a kernel module on one machine and port that compiled module to another. The kernel of these machines is usually the same (the maximum may differ by several versions, for example 3.0.1 and 3.0.22), the processor type is the same. It seems that there is VERMAGIC for determining the version match, there is also module versioning, which compares the hashes of the module and kernel symbols. Successful module loading also depends on the kernel config and module.symversions. So can I compile a module on one machine and just copy it to the others?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2018-11-21
@jcmvbkbc

can i compile a module on one machine and just copy it to the others?

Can. But you can load such a module without problems only if the kernel versions and the main options in the kernel .config match. Well, either if you disable the version check of modules in the config. Otherwise, just modprobe --force.

A
Alexander, 2018-11-21
@UPSA

Yes. Can.
The architecture of both processors must be the same.
And the Kernel has support for modules.
And it is desirable that the Kernels are the same, otherwise you will get on the ISA Bus, in one it is supported, and in the other it is turned off. But everything seems to be fine with you, except for third-party modules - dependencies can arise there. Make sure the drivers are the same.
PS
I compiled something about 15 years ago)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question