Hello Kwan,
Saturday, April 3, 2010, 11:57:04 PM, you wrote:
> How do I compile my driver for a new kernel _before_ actually
booting
> into that new kernel, so that I could be prepared with the new kernel
> module already on first reboot?
Depending on your source tree there are a few different ways. Most
kernel module sources will use 'uname -r' to find the path to the
kernel source tree. You may need to set a variable explicitly. For
example, I grabbed a vt6656 build from git and saw in the mk.sh
script:
KDIR="/lib/modules/`uname -r`/build"
You can try passing the kernel version you want to build instead of
running uname.
Ok, I see. So there's no "common" method to do this, right? It may
differ from module to module...
Initially I thought that's a really simple task... And now it doesn't
seem to be like that, especially for those who use multiple custom
kernel modules...
Ok, thanks a lot!
I'll try it first, while starting to read about DKMS... Anyway, I'm
curious to do it the right way.
--
Best regards,
Andrew