Linux module compilng missing asm folder

I am trying to compile a driver. My kernel version is 3.2.0-27-generic.

I left only what I need:

#include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/proc_fs.h> #include <linux/pci.h> #include <linux/delay.h> #include <linux/dmi.h> 

These headings are found. But when I try to compile, I get an error that the asm / cache.h file was not found. When I dug the bucket, I found that there is no such folder as "asm", but asm-generic and contains the necessary headers.

Header folder structure: Why was it renamed? Because of this, I cannot compile other drivers. If I rename "asm-geneic" to "asm", this will result in other missing headers. What is wrong here?

+5
source share
1 answer

asm / cache.h is architecture dependent; there are different asm directories for different architectures

 arch/powerpc/include/asm/ arch/x86/include/asm/ arch/arm/include/asm [...] 

You cannot rename include / asm-generic to include / asm because the problem is that you can get to the asm folder of the architecture. Try checking the .config file or manually setting the ARCH variable.

+3
source

All Articles