mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
readme: add note about kernel source tree when building submodules
This commit is contained in:
@ -28222,6 +28222,8 @@ You can also build <<kernel-modules>> against a specific prebuilt kernel with:
|
||||
|
||||
This will then allow you to insmod the kernel modules on your newly built kernel.
|
||||
|
||||
Note that for this build to work the Linux kernel must remain checked out at the same version as it was built from, because the build dir which modules build against via the `M=` argument points to the absolute path of the Linux kernel source from which the headers are taken. For this reason, if you are going to be building kernel modules against a specific kernel version, it is a good idea to use a <<linux-worktree>> to ensure that the source for a build is always there.
|
||||
|
||||
===== Linux worktree
|
||||
|
||||
If you are working with multiple Linux versions at once, it can be helpful to have their source code checked out all the time, in particular if you are going to be <<gdb,GDB step debugging>>.
|
||||
|
||||
Reference in New Issue
Block a user