gpt4 book ai didi

linux - 尝试将 adxl345 编译为 4.4.54-ti-r93 内核中的模块但出现错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:18:45 25 4
gpt4 key购买 nike

我已经从最新的图像站点下载了下面的 debian 图像

Debian 8.7 2017-03-19 4GB SD LXQT 

我附上了一个 adxl345 加速度计,使用用户空间工具它工作正常。现在我正在尝试附加一个内核驱动程序,即在 adxl345 中。我把源文件放在

/home/debian/Desktop/adxl345

并发布make。我得到这个错误

root@beaglebone:/home/debian/Desktop/adxl345# make
make -C /lib/modules/4.4.54-ti-r93/build M=/home/debian/Desktop/adxl345 modules
make[1]: *** /lib/modules/4.4.54-ti-r93/build: No such file or directory. Stop.
Makefile:13: recipe for target 'default' failed
make: *** [default] Error 2

我检查过

root@beaglebone:/lib/modules/4.4.54-ti-r93# ls 
extra modules.builtin modules.devname modules.symbols.bin
kernel modules.builtin.bin modules.order
modules.alias modules.dep modules.softdep
modules.alias.bin modules.dep.bin modules.symbols

没有构建目录。我尝试更新内核头文件

sudo apt-get install linux-headers-linux-headers-4.4.54-ti-r93

但是它说

E: Unable to locate package linux-headers-linux-headers-4.4.54-ti-r93

我将如何构建驱动程序?

最佳答案

我没有更新缓存

sudo apt-get 更新

更新后,我们可以在/lib/modules 中查看会有一个构建目录。现在应该正在构建中。

关于linux - 尝试将 adxl345 编译为 4.4.54-ti-r93 内核中的模块但出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46618334/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com