怎样在Deepin编译内核模块
Tofloor
poster avatar
newegg2002
deepin
2016-05-22 20:01
Author
刚开始学习Linux,网上有一些编译内核模块的例子,比如这一篇:http://edsionte.com/techblog/archives/1336

在Deepin的/usr/src/下面,我看并没有内核的源代码,想问一下,如果要在Deepin下编译模块,应该怎么样操作,多谢。

不需要重新编译内核,只要能编译内核模块就行。


Reply Favorite View the author
All Replies
avatar
jingle
deepin
2016-05-22 21:27
#1
github貌似有项目的。
Reply View the author
avatar
newegg2002
deepin
2016-05-22 22:01
#2
能否把项目名称贴一下,或者地址。谢谢
Reply View the author
avatar
newegg2002
deepin
2016-05-22 22:12
#3
刚才试了下,可以编译成功,不过会提示告警:

make[1]: Entering directory '/usr/src/linux-headers-4.4.0-2-deepin-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax

Reply View the author
avatar
lifelong0811
deepin
2016-06-09 19:25
#4
有两种方法。第一种是选择自己想要编译的内核版本,然后在makefile里面更改内核源文件的目录,然后再去编译。另外的一种方式是直接在deepin下载内核源代码去编译。
Reply View the author
avatar
helson
deepin
2019-08-02 18:29
#5
https://bbs.deepin.org/post/39579
刚才试了下,可以编译成功,不过会提示告警:

make[1]: Entering directory '/usr/src/linux-headers-4.4. ...

楼主,你好。
请问一下你的环境/usr/src/下有内核源码吗?
Makefile文件中的内核源码目录,网上有的写的是/usr/src/kernels/$(uname -r), 有的写的是/lib/modules/$(shell uname -r)/build,我本地的环境这两个都没有。我从网上下载了源码,Makefie的内核源码目录设置为下载的源码路径make编译也不能通过?
你最后是怎么编译通过的?
Reply View the author