linux模块编译丢失的文件夹asm [英] linux module compilng missed folder asm

查看:246
本文介绍了linux模块编译丢失的文件夹asm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译驱动程序.我的内核版本是3.2.0-27-generic.

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>

找到这些标头.但是,当我尝试编译时,出现错误,提示找不到asm/cache.h文件. 当我挖开北斗时,我发现没有像"asm"这样的文件夹,而是asm通用的,并且包含必需的头文件.

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.

它是带有标题的文件夹的结构: 为什么要改名?因此,我无法编译其他驱动程序.如果我将"asm-generic"重命名为"asm",则会导致其他标头丢失.怎么了?

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?

推荐答案

asm/cache.h 取决于体系结构,不同体系结构的asm目录不同

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
[...]

您无法将 include/asm-generic 重命名为 include/asm ,因为您的问题是您无法访问架构 asm 文件夹.尝试检查您的.config文件或手动设置 ARCH 变量.

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.

这篇关于linux模块编译丢失的文件夹asm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆