make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
时间: 2023-12-22 11:03:19 浏览: 67
这是一个在 Linux 内核模块的源码目录下编译模块的命令。其中,`-C` 选项指定了内核源码目录的位置,`$(uname -r)` 表示当前正在运行的内核版本号,`$(pwd)` 表示当前目录。`M=` 选项指定了要编译的模块的目录位置。`modules` 表示编译的目标是内核模块。这个命令的作用是将当前目录下的源码编译成内核模块并安装到系统中。
相关问题
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules是什么意思
这是一个 Linux kernel 模块编译命令,它的含义是:
`make`: 运行 make 命令,启动编译过程。
`-C`: 指定编译目录,本命令中指定为 /lib/modules/$(uname -r)/build,即当前正在运行的 Linux 内核源代码目录。
`M=`: 指定模块源代码目录,本命令中指定为 $(pwd),即当前目录。
`modules`: 编译模块,在指定的模块源代码目录中查找 Makefile 文件,并执行其中的编译规则,最终生成模块文件。
因此,该命令的作用是在当前目录中编译 Linux kernel 模块,并将编译生成的模块文件放置在 /lib/modules/$(uname -r)/kernel 目录下。
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules。
这是一个 Linux 内核模块的编译命令。`make` 是一个常用的编译工具,`-C` 参数指定了内核源码的路径,`$(uname -r)` 是获取当前系统的内核版本号,`$(pwd)` 是获取当前所在目录的路径,`M=` 参数指定了需要编译的模块的路径,`modules` 是编译目标,表示编译出内核模块。该命令的作用是将当前目录下的内核模块编译成可加载的二进制文件,可以通过 `insmod` 命令将其加载到内核中。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![patch](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)