I am new to linux device driver development. I am trying to write a simple hello world module
that would display the version of kernel running on the system where I try to insert hello_world
module into kernel.
I used LINUX_VERSION_CODE
in version.h to get linux version and built the module.
When I try to insert the ko file on a different system other than where it was built, it still shows the version of kernel where it was built
I believe issue lies with using C macro
.
Can someone help me how to find linux version of local machine where the ko is to be inserted instead of finding version of kernel where my module gets built