Talk:Compile kernel module

From ArchWiki
Revision as of 04:20, 10 November 2015 by NonerKao (talk | contribs) (What is the scenario?: re)
Jump to navigation Jump to search

What is the scenario?

There are only three cases:

  • re-compile a in-kernel module, in an arch-specific kernel
  • re-compile a in-kernel module, in a customized kernel
  • compile a externel module (no matter what kind of kernel is in use)

While this article, as a tutorial here in ArchWiki with the title "Compile kernel module", should cover the first case, it gives second case only since it acquires the kernel source from kernel.org. However, we may want to stay with the kernel of Archlinux's official one. How do you think about this?

Just for completeness, the third case is easily done by following The Linux Kernel Module Programming Guide. --NonerKao (talk) 10:47, 9 November 2015 (UTC)

I think it doesn't matter from where you get kernel source, process for compiling kernel module is basically same and there are different kernels in AUR so that's still revelant if we cover not only one official Arch kernel. It could be divided in sections so for example if you've stock Arch kernel and other section from AUR or elsewhere. --Davispuh (talk) 16:15, 9 November 2015 (UTC)
If it doesn't matter from where the module's source code comes from (and I agree with that), there is no point in creating different sections based on the origin. -- Lahwaacz (talk) 19:08, 9 November 2015 (UTC)
On the contrary, this page deals only with the 3rd point. For the first two, you'd need to re-compile the entire kernel and we have Kernels/Compilation/Traditional for that. As for the Kernel Module Programming Guide, it is obviously guide for programmers, while this page is targeted at common Arch users. -- Lahwaacz (talk) 19:04, 9 November 2015 (UTC)
actually no, it's for all 3 cases, you've to recompile whole kernel only if module is builtin in which case it's not really a loadable module, and I think first 2 points are meant for kernel modules which are compiled as modules for your current kernel so you can recompile only them and 3rd point is for external modules which aren't included in Linux source code tree like proprietary drivers. --Davispuh (talk) 19:31, 9 November 2015 (UTC)
Well, loadable modules are not really "in-kernel", are they. Also, you can't just compile proprietary drivers. -- Lahwaacz (talk) 19:44, 9 November 2015 (UTC)
I am sorry if I have bothered you in this thread, but I would like to point out that this article is not specific to arch users. For general kernels, this works just fine. However, consider the following usecase:
Currently, the linux package is updated to version 4.2.5-1-ARCH. A user needs to compile a kernel module with the previous 4.2.2-1-ARCH one on his/her system. So I expect this article provide him/her the information "how should I get the officially patched 4.2.2-1-ARCH kernel source tree, without the effort to update linux and download the latest source tree from ABS". This is not clearly mentioned in Kernel either. Is there any simple way to do this such that you don't think it is worth mentioning here? --NonerKao (talk) 04:18, 10 November 2015 (UTC)