Module compilation error

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Mon Mar 4 21:47:46 EST 2013


On Tue, 05 Mar 2013 09:07:51 +0700, Mulyadi Santosa said:
> On Tue, Mar 5, 2013 at 7:48 AM, Pietro Paolini <pulsarpietro at aol.com> wrote:

> > echo >&2 "         Run 'make oldconfig && make prepare' on kernel src
>
> try the suggested above step. IIRC, those commands will do things like
> preparing the neccessary object files, headers and so on, so it is
> ready for you to be used on your kernel programming.

In addition, note that 'make oldconfig' followed by 'make prepare' will only
do the right thing and result in a usable module if the source tree matches
your running kernel.  Doing 'make prepare' on a 3.7.2 source tree and then
building a module against it will result in a module that loads in a 3.7.2
kernel with the same .config - but a different .config and/or release will
have anything from a module that simply won't load to one that blows up
the system for mysterious reasons.

It's *highly* recommended that you first learn how to build, install, and
boot a self-compiled kernel (and remember to keep your distro kernel
around), and then once you got that down, *then* start building external
modules against it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130304/e9b24b4a/attachment.bin 


More information about the Kernelnewbies mailing list