Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-headers 缺少文件 #2285

Closed
achaoge opened this issue Apr 30, 2024 · 3 comments
Closed

linux-headers 缺少文件 #2285

achaoge opened this issue Apr 30, 2024 · 3 comments

Comments

@achaoge
Copy link

achaoge commented Apr 30, 2024

今天尝试编译内核模块,提示缺少文件: include/generated/asm-offsets.h

rk3399 平台,6.1 和 6.6 都是这样。

make -C /usr/src/linux-headers-6.6.28-ophub/ M=/home/chao/tmp/WK2XXX_SPI_v2.4 modules make[1]: Entering directory '/usr/src/linux-headers-6.6.28-ophub' awk: cannot open "include/generated/asm-offsets.h" (No such file or directory)

@AlanLeeIsGood
Copy link

全盘搜索asm-offsets.h这个名字没有的话试试搜索ams-offsets.h
find / -name "asm-offsets.h"
find / -name "ams-offsets.h"
找到了之后去做个软链接就行了

@achaoge
Copy link
Author

achaoge commented May 6, 2024

全盘搜索asm-offsets.h这个名字没有的话试试搜索ams-offsets.h find / -name "asm-offsets.h" find / -name "ams-offsets.h" 找到了之后去做个软链接就行了

这样行不通。
查找到文件之后,文件的内容都是指向include/generated/asm-offsets.h,如图1
Screenshot from 2024-05-06 10-26-29

而在内核源代码编译后的目录里面,是存在这个include/generated/asm-offsets.h 文件的,内容如图2
Screenshot from 2024-05-06 10-33-54

@achaoge
Copy link
Author

achaoge commented May 6, 2024

今天尝试编译内核模块,提示缺少文件: include/generated/asm-offsets.h

rk3399 平台,6.1 和 6.6 都是这样。

make -C /usr/src/linux-headers-6.6.28-ophub/ M=/home/chao/tmp/WK2XXX_SPI_v2.4 modules make[1]: Entering directory '/usr/src/linux-headers-6.6.28-ophub' awk: cannot open "include/generated/asm-offsets.h" (No such file or directory)

看起来,打包的linux-header 对比系统通过 apt 安装的 linux-header 少了很多文件。

@ophub ophub closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants