linux2.6.38之后内核版本下编译内核模块,当调用open_by_devnum()函数时会出错。该问题原因在于:在linux2.6.37版本以后的内核中,已将open_by_devnum()函数去除,而用 blkdev_get_by_dev函数取代其功能。 可参考如下引用内容: xen/blkback: Update to use blkdev_get_by_dev instead
问题: 编译内核驱动模块的时候,提示缺少头文件 mmzone.h 、bounds.h...等 include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONE
进行内核模块的编译时,因为包含了#include <linux/config.h>,出现include的linux下没有config.h这个文件错误提示: fatal error: linux/config.h: No such file or directory 原因与解决方法: 现在较新的内核已经弃用了config.h,把这个文件新建上去即可。执行命令(注意路径的不同):
编译下载的linux-source-2.6.32内核源码过程中,出现如下错误导致无法继续进行: ld: cannot find /ubuntu/omnibook/sections.lds: No such file or directory 原因与解决方法: 这是因为makefile中一处目录获取错误导致,修正一下即可。具体解决方法参考如下。 编辑文件 /usr/src/linux-so