Linux 模块验证失败

标签 linux driver device

所以当我尝试将我的简单设备驱动程序放入内核时,出现此错误:“模块验证失败:缺少签名和/或必需的 key - 污染内核”。我尝试重新编译内核,更改我的 makefile ,但没​​有任何帮助。此时此刻我的 makefile :

obj-m := DeviceD.o

KERNEL_DIR = /usr/src/linux-headers-$(shell uname -r)

all:
    $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules

clean:
     rm -rf *.o *.ko *.mod.* *.symvers *.order *~

也试过这个makefile:

obj-m += DeviceD.o
all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

最佳答案

这意味着您没有在模块描述宏中使用GPL。这是一个警告,表明您正在使用一些非开放软件内核模块。

要停止获取该消息,您必须更改驱动器代码中的 MODULE_LICENSE() 宏参数以包含 GPL 字符串。

关于Linux 模块验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27348190/

相关文章:

安卓多屏兼容性

linux - 计算目录大小的最快方法

linux - Curangle() 抛出此错误 - TypeError : float() argument must be a string or a number

linux - 不重复的排列列

linux 内核源代码可以使用驱动程序中的函数吗?

linux - 驱动程序中的 usb_kill_urb、usb_submit_urb、usb_find_interface 显示未知符号

windows - 在 WinXP 中查找哪个驱动器对应哪个 USB 大容量存储设备

python - Fabric:在目标主机上执行内联 Python?

php - 在 Ubuntu 16.04 上安装 datastax PHP 驱动程序的工作流程

c# - Windows Phone 8.1 C# 应用程序 : critical crash (ExecutionEngineException) only on real device in release mode