Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linux module compilng missed folder asm

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?

like image 205
Tebe Avatar asked Jul 30 '12 21:07

Tebe


1 Answers

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't reach the architecture asm folder. Try to check your .config file or set manually the ARCH variable.

like image 127
Federico Avatar answered Oct 19 '22 00:10

Federico