I am trying to compile a driver. Version of my kernel is 3.2.0-27-generic.

I left only includes that 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 headers are found. But when I try to compile I get error that asm/cache.h file is not found. When I dug dipper I found that there is no such folder as "asm", but asm-generic and it contains required headers.

It's structure of folder with headers: Why was it renamed? Because of it I can't compile another drivers. If I rename "asm-geneic "to "asm" it will lead to other missing headers. What's wrong here?

share|improve this question
up vote 2 down vote accepted

asm/cache.h is architecture dependent, there are different asm directory for different architectures

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

You can't rename include/asm-generic to include/asm because your problem is that you can reach the architecture asm folder. Try to check your .config file or set manually the ARCH variable.

share|improve this answer
    
ah, I got. I added new path /usr/src/linux-headers-3.2.0-27/arch/x86//include. It works. My architecture is x86. But I got new errors like this img6.imagebanana.com/img/vqfu6vpy/01375431072012_001.png . Could you offer some cure or how? I did nothing, I only included headers. – Tebe Jul 30 '12 at 22:39
    
You don't need to include anything, it should work automatically. Try to look this example link. – Federico Aug 3 '12 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.