编译驱动时报错:./arch/x86/include/asm/atomic64_64.h: At top level:
在编译6ULL驱动的时候程序报错:
base.c:4:
./arch/x86/include/asm/atomic64_64.h: At top level:
./arch/x86/include/asm/atomic64_64.h:31:33: error: unknown type name ‘atomic64_t’
static inline void atomic64_set(atomic64_t *v, long i)
^
./arch/x86/include/asm/atomic64_64.h:43:41: error: unknown type name ‘atomic64_t’
static inline void atomic64_add(long i, atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:57:41: error: unknown type name ‘atomic64_t’
static inline void atomic64_sub(long i, atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:73:49: error: unknown type name ‘atomic64_t’
static inline int atomic64_sub_and_test(long i, atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:84:33: error: unknown type name ‘atomic64_t’
static inline void atomic64_inc(atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:97:33: error: unknown type name ‘atomic64_t’
static inline void atomic64_dec(atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:112:41: error: unknown type name ‘atomic64_t’
static inline int atomic64_dec_and_test(atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:125:41: error: unknown type name ‘atomic64_t’
static inline int atomic64_inc_and_test(atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:139:49: error: unknown type name ‘atomic64_t’
static inline int atomic64_add_negative(long i, atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:151:48: error: unknown type name ‘atomic64_t’
static inline long atomic64_add_return(long i, atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:156:48: error: unknown type name ‘atomic64_t’
static inline long atomic64_sub_return(long i, atomic64_t *v)
^
./arch/x86/include/asm/atomic64_64.h:164:37: error: unknown type name ‘atomic64_t’
static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
^
./arch/x86/include/asm/atomic64_64.h:169:34: error: unknown type name ‘atomic64_t’
static inline long atomic64_xchg(atomic64_t *v, long new)
^
./arch/x86/include/asm/atomic64_64.h:183:39: error: unknown type name ‘atomic64_t’
static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
^
./arch/x86/include/asm/atomic64_64.h:207:45: error: unknown type name ‘atomic64_t’
static inline long atomic64_dec_if_positive(atomic64_t *v)
^
In file included from include/linux/sched.h:32:0,
from include/linux/blkdev.h:4,
from include/linux/ide.h:12,
from /home/yjl/linux/IMX6ULL/Linux_Drivers/01_chrdevbase/chrdevbase.c:4:
include/linux/cputime.h:4:25: fatal error: asm/cputime.h: 没有那个文件或目录
compilation terminated.
解决方法:修改驱动的makefile文件
假如原文件为:
KERNELDIR := /home/yjl/linux/IMX6ULL/linux/alientek_linux
CURRENT_PATH := $(shell pwd)
obj-m := chrdevbase.obuild: kernel_moduleskernel_modules:$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) modules
clean:$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean
则改为(添加两句):
KERNELDIR := /home/yjl/linux/IMX6ULL/linux/alientek_linux
CURRENT_PATH := $(shell pwd)
obj-m := chrdevbase.o
ENV:=ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-build: kernel_moduleskernel_modules:$(MAKE) $(ENV) -C $(KERNELDIR) M=$(CURRENT_PATH) modules
clean:$(MAKE) $(ENV) -C $(KERNELDIR) M=$(CURRENT_PATH) clean
参考链接:
编译内核驱动模块出错(./arch/x86/include/asm/xxx fatal error: asm/xxx: No such file or directory)_Dask Jhonson的博客-CSDN博客
编译驱动时报错:./arch/x86/include/asm/atomic64_64.h: At top level:相关推荐
- 编译 pycaffe时报错:fatal error: numpy/arrayobject.h没有那个文件或目录
编译 pycaffe时报错:fatal error: numpy/arrayobject.h没有那个文件或目录 其实numpy已经是安装的,anaconda2里面有,python中import num ...
- Keil编译报错:Cannot open include file: 'stdbool.h': No such file or directory问题解决
Keil编译出现报错:Cannot open include file: 'stdbool.h': No such file or directory,或者出现Error: L6411E: No co ...
- Maven编译项目时报错:不再支持源选项 5。请使用 6 或更高版本。 不再支持目标选项 1.5。请使用 1.6 或更高版本。
在使用Maven编译项目时报错: 不再支持源选项 5.请使用 6 或更高版本. 不再支持目标选项 1.5.请使用 1.6 或更高版本. 在项目pom.xml文件中增加maven编译的jdk版本设置,m ...
- 加--with-x编译vim时报错 configure: error: could not configure X
文章目录 1. vim 编译报错 2. 编译ccls报错 3. 编译gcc时报错 1. vim 编译报错 (1) configure: error: could not configure X err ...
- ubuntu18.04.05安装显卡1080ti 1070ti显卡的驱动时报错-【解决方案】
ubuntu18.04.05 裸机 安装显卡1080ti 1070ti显卡的驱动时报错 执行安装包错: chmod -R 777 NVIDIA-Linux-x86_64-460.39.runsudo ...
- 编译设备树时报错“arch/arm/boot/dts/imx50.dtsi:14:42:致命错误:dt-bindings/clock/imx5-clock/h:没有那个文件或目录”
问题: 使用命令 make dtbs 编译设备树时报错: 错误原因: 设备树编译时需要的头文件找不到.查看arch/arm/boot/dts/include/发现该目录为空,没有内容.而正常情况该目录 ...
- 编译arm-linux驱动时报错:“unrecognized command line option ‘-fstack-protector-strong’”
前两年买了个树莓派3B+,之后参照网上的一些教程做了个视频小车,玩了几天之后就放起来了.这阵子突然想研究一下arm-linux的驱动是怎么编写的. 参照其他人的博客,下载了源码"linux- ...
- 编译OpenSSL时报错,Can‘t locate IPC/Cmd.pm in @INC
环境: 操作系统:CentOS 7.4,perl版本:v5.16.3 编译OpenSSL 3.0.1时报错,错误信息如下 [root@centos7 openssl-3.0.1]# ./config ...
- linux 2.6.30 内核编译 提示 ‘make[1]: *** [arch/x86/vdso/vdso.so.dbg] Error 1’ 错误
linux 2.6.30 编译出现如下错误. 解决方案: 打开 linux-2.6.30/arch/x86/vdso/Makefile 文件, 1 修改28行,将-m elf_x86_64 修改为- ...
最新文章
- java 中文乱码问题,请注意response.getWriter的顺序
- css3学习总结1--CSS3选择器
- Spring Boot 2.4.0 全新发布,还不快来实战
- spark从hbase读取写入数据
- Apache httpclient的execute方法调试
- 尝鲜!.NET5实操之docker+k8s,这10个坑,你不得不知!
- java键盘事件键值表_Java的20年:重大事件的时间表
- java编译找不到符号_javac编译时找不到符号?
- pythonwebui自动化_python+selenium实现web端UI自动化测试
- 看我如何利用教科书级别的释放后使用漏洞(CVE-2020-6449)
- HCNA每日一练错误
- c语言流水灯循环左移程序,51单片机流水灯左移 右移控制程序
- 模拟实现透明网桥的自学习与过滤功能
- 计算机专业就业方向 【转】
- xpath之根据节点获取兄弟节点
- to be filed by oem
- JPA设置表名和实体名,表字段与实体字段的对应
- 令人截图上瘾的录屏神器FSCapture
- 深圳高新技术企业补贴政策
- 注册公众号(企业类型的订阅号)参考步骤
热门文章
- 快速了解实用新型专利申请的流程及费用
- 分岔现象matlab,Matlab用来计算分岔图的程序
- Mac必备的PPT神器:PPT2019最新完整版
- Mac 安装pd虚拟机,远程桌面无法使用ctrl或其他符号无法使用问题
- 什么是认购期权与认沽期权!
- html计算器的基本功能实现,JS实现基本的网页计算器功能示例
- Zemax学习笔记 (8)- 光学系统各种像差 及其 Zemax模拟
- 100kW光伏并网发电系统MATLAB仿真模型。 采用“增量电导+积分调节器”技术的MPPT控制器
- 谁是华为最主要的供应商?哪些公司受华为影响最大?
- 双林快报|四季度重大项目集中开工,运和外滩里盛大启幕