[CentOS] C7 Kernel module compilation

Mon Aug 5 13:46:14 UTC 2019
Alessandro Baggi <alessandro.baggi at gmail.com>

Hey there,
I'm trying to compile a single module following this guide:

https://wiki.centos.org/HowTos/BuildingKernelModules#head-d2e4c05886f94c701e4ae74387d41d8c40c25d01

and

https://wiki.centos.org/HowTos/I_need_the_Kernel_Source

I tried to compile a module for novuton led controller supplied by 
thirdparty and I got several error.

To check if this is the wrong procedure I tried to compile cifs module 
as listed in howto but when loading with modprobe I get "Exec format 
error", and from dmesg "cifs: no symbol version for module_layout
", the same errors when compiling novuton module and I don't know why I 
get this error.

I noticed that modules in centos are compressed in .xz but after running 
make M=fs/cifs I got only a .ko kernel module and then I run xz to 
compress the new module.

Can someone help me please?

Thanks in advance.