我在一个Linux内核模块中发现了一个bug,它导致了Ubuntu 14.04内核的崩溃。
这就是为什么我想要编辑/修补只有这个单独的内核模块的源代码,以添加一些额外的调试输出。所涉及的内核模块是mvsas,并且不是启动所必需的。因此,我认为没有必要更新任何initrd映像。
我已经阅读了很多信息(如下所示),并对设置和构建过程感到困惑。我需要以下两个步骤:
- 首次设置/配置构建环境
- 在编辑此内核模块的任何源文件(.c和.h)并将该编辑转换为新的内核模块(.ko)后要执行的步骤
使用的来源有:
- 构建一个内核模块 - 谷歌搜索
- http://www.linuxquestions.org/questions/linux-kernel-70/rebuilding-a-single-kernel-module-595116/
- https://stackoverflow.com/questions/8744087/how-to-recompile-just-a-single-kernel-module
- http://www.pixelbeat.org/docs/rebuild_kernel_module.html
- 如何构建一个单独的内核模块?
- http://ubuntuforums.org/showthread.php?t=1153067
- http://ubuntuforums.org/showthread.php?t=2112166
- http://ubuntuforums.org/showthread.php?t=1115593
- 在Ubuntu上构建一个内核模块 - 谷歌搜索
- 'make +single +kernel +module' - Ask Ubuntu
- 'make +kernel +module' - Ask Ubuntu
- 我的Makefile结果是:没有规则可以生成目标“arch/x86/tools/relocs.c”,需要
- '"Invalid module format"' - Ask Ubuntu
- 驱动程序安装:为较新的内核编译源代码
- Modprobe:“无效的模块格式”,但在insmod之后可以正常工作
- "Symbol version dump" "is missing" - 谷歌搜索
- https://stackoverflow.com/questions/9425523/should-i-care-that-the-symbol-version-dump-is-missing-how-do-i-get-one
- https://askubuntu.com/questions/369051/where-can-i-find-the-corresponding-module-symvers-and-config-files-for-ubutunu
- "no symbol version for module_layout" when trying to load usbhid.ko
- Linux头文件夹中的损坏链接
- 'make modules_install' - Ask Ubuntu
- 'modules_install' - Ask Ubuntu
- 自定义编译内核中的空构建目录
- https://askubuntu.com/questions/444345/not-able-to-see-pr-info-output
- https://askubuntu.com/questions/472496/in-which-directory-are-the-kernel-source-files-and-how-can-i-recompile-it
- 如何编译和安装修补后的libata-eh.c文件?
- 'modules_install +depmod' - Ask Ubuntu
- modules_install depmod - 谷歌搜索
- "make modules_install" - 谷歌搜索
- http://www.csee.umbc.edu/courses/undergraduate/CMSC421/fall02/burt/projects/howto_build_kernel.html
- https://unix.stackexchange.com/questions/20864/what-happens-in-each-step-of-the-linux-kernel-building-process
- https://wiki.ubuntu.com/KernelCustomBuild
- http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html
- http://www.linuxforums.org/forum/kernel/170617-solved-make-modules_install-different-path.html
- "make prepare" - 谷歌搜索
- "make prepare" "scripts/kconfig/conf --silentoldconfig Kconfig" - 谷歌搜索
- http://ubuntuforums.org/showthread.php?t=1963515
- ubuntu "make prepare" version - 谷歌搜索
- https://stackoverflow.com/questions/8276245/how-to-compile-a-kernel-module-against-a-new-source
- https://help.ubuntu.com/community/Kernel/Compile
- 如何编译一个内核模块?
- 如何向我的内核添加自定义驱动程序?
- {{link29:https://askubuntu.com/questions/426549/compile