In my linux header files folder on my Kali kernal 5.7.0 headers included in include directory /usr/src/linux-headers-5.7.0-kali1-common/include. Inside this folders I have header files contained in sub-folders like asm-generic,linux,uapi,acpi,crypto,etc.. But inside header files, i.e. inside linux/module.h there there is one header file reference included like
#include <asm/module.h> // top of linux/module.h
But Actually I don't have asm folder that got included with my header files when I installed them. So one solution that came to mind is. Probably solution: Change the references from asm/* to asm-generic/* as in from asm/module.h to asm-generic/module.h inside linux/module.h and other files which I may use. I like to know is asm and asm-generic are same? meaning they contains same files and structure or is there any difference i can cause problem
If I correct the directory name in include reference than Does it make sense, or I will get into problems when I compile the module if I change headers sub directories names in include list of header files from asm to asm-generic? If I dont do this the header files will be missing
asm
to the relevant architecture (so you may need it, but also with the kernel configuration you are using).asm-generic
are templates which new architectures could use (if they do not want to implement all) -- in My Debian kernel have headers are in /usr/include/asm and /usr/include/linux – Giacomo Catenazzi#include <asm/module.h>
should actually include the file /usr/src/linux-headers-5.7.0-kali1-common/arch/x86/include/asm/module.h on your system (assuming your system architecture is x86). – Ian Abbott