I'm just curious if it is possible to compile a Linux kernel driver (* .ko binary) with only Linux kernel sources? Is it inevitable to have a compiled Linux kernel to compile a Linux kernel driver?
Asked
Active
Viewed 447 times
0
-
You can use the [KBuild](https://www.kernel.org/doc/Documentation/kbuild/modules.txt) method as explained here : https://stackoverflow.com/a/65979628/14393739 – Rachid K. Feb 24 '21 at 18:31
-
1Yes, it’s quite possible. – 0andriy Feb 24 '21 at 23:32
-
Unfortunately, I haven't found /lib/modules/ in Linux Kernel source tree. Let me clarify that I need to cross-compile .ko module. It is designed for another kernel/architecture (not for the host). – lol lol Feb 25 '21 at 07:38
-
You forget to mention the person for whom you wrote your comment. Tag person e.g. like this @RachidK. – NK-cell Feb 25 '21 at 18:20
-
@NK-cell Actually, I replied to both commentators :) – lol lol Feb 26 '21 at 08:20
-
But they actually didn't know about that :) – NK-cell Feb 26 '21 at 10:06