1.在你的源文件目录中kconfig 文件,添加config_**配置, 如下
config HELLO_MODULE
tristate “hello-tristate”
default y
help
this is help test

这样当make menuconfig时 ,将会出现 hello-tristate选项。
你可以根据需要选择不同的config类型

linux 新增一个模块的kconfig&makefile 配置步骤
不同类型的效果如下
linux 新增一个模块的kconfig&makefile 配置步骤

  1. 在源文件目录中makefile 文件中添加如下内容:
    obj-$(CONFIG_HELLO_MODULE) += hello.o

3.如果你是新增了一个目录,还需修改上层目录/drivers/char中Kconfig文件
linux 新增一个模块的kconfig&makefile 配置步骤

相关文章:

  • 2021-09-15
  • 2022-01-27
  • 2022-02-25
  • 2021-08-29
  • 2022-12-23
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2021-07-18
  • 2022-01-30
  • 2021-07-06
  • 2021-06-06
相关资源
相似解决方案