I was just compiling a module I’ve been given outside the kernel source tree
got an error trying to load it:
version magic '2.6.x.y-7aac9b1d2 mod_unload' should be '2.6.x.y mod_unload'
Weird — as I’m compiling it against the same source tree that the kernel was built from
And then I realized: the appended string is a lot like a git hash! (hey not all hexadecimal strings are alike!)
turns out that if you have
CONFIG_LOCALVERSION_AUTO turned on in your .config and if the kernel you’re compiling is detected to be git controlled the resulting binary will have it’s version magic string appended with the git current hash.
and now I know that this also applies to modules you compile against a kernel tree like this which are governed by a git repo.
good to know.