Making 2.6.x modules needs full kernel source or only headers? - Setup

This is a discussion on Making 2.6.x modules needs full kernel source or only headers? - Setup ; At the beginning of chapter 2 of the O'Reilly book "Linux Device Drivers, Third Edition", it says" "Regardless of the origin of your kernel, building modules for 2.6.x requires that you have a configured and built kernel tree on your ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Making 2.6.x modules needs full kernel source or only headers?

  1. Making 2.6.x modules needs full kernel source or only headers?


    At the beginning of chapter 2 of the O'Reilly book "Linux Device Drivers,
    Third Edition", it says"

    "Regardless of the origin of your kernel, building modules for 2.6.x
    requires that you have a configured and built kernel tree on your system.
    This requirement is a change from previous versions of the kernel, where a
    current set of header files was sufficient."

    And yet, everything else I've read on the net regarding device drivers
    (including specifically for 2.6.x) says that only the header files are
    needed.

    Which is correct?


  2. Re: Making 2.6.x modules needs full kernel source or only headers?


    "C. J. Clegg" wrote in message newsan.2007.05.18.18.18.23.670807@nospam.no...
    >
    > At the beginning of chapter 2 of the O'Reilly book "Linux Device Drivers,
    > Third Edition", it says"
    >
    > "Regardless of the origin of your kernel, building modules for 2.6.x
    > requires that you have a configured and built kernel tree on your system.
    > This requirement is a change from previous versions of the kernel, where a
    > current set of header files was sufficient."
    >
    > And yet, everything else I've read on the net regarding device drivers
    > (including specifically for 2.6.x) says that only the header files are
    > needed.
    >
    > Which is correct?



    UNCONFIRMED errors and comments from readers:

    {15} last para;
    "... building modules for 2.6.x requires that you have a configured and built kernel
    tree on your system."

    Technically, no. All you need (at least for 2.6.18 that I'm playing with) is a tree
    that has been configured and had "make modules_prepare" run against it.

    http://www.oreilly.com/catalog/linux...e3.unconfirmed

    Confirmed errata

    http://www.oreilly.com/catalog/linux...ive3.confirmed


  3. Re: Making 2.6.x modules needs full kernel source or only headers?

    C. J. Clegg wrote:

    >
    > At the beginning of chapter 2 of the O'Reilly book "Linux Device Drivers,
    > Third Edition", it says"
    >
    > "Regardless of the origin of your kernel, building modules for 2.6.x
    > requires that you have a configured and built kernel tree on your system.
    > This requirement is a change from previous versions of the kernel, where a
    > current set of header files was sufficient."
    >
    > And yet, everything else I've read on the net regarding device drivers
    > (including specifically for 2.6.x) says that only the header files are
    > needed.
    >
    > Which is correct?


    For the life of me, how would you compile a new module without the source
    code, using only the headers? As far back as I remember, 2.2.x version
    kernels, you always needed a full source tree.

    Should be easy enough to prove one way or the other... just eliminate the
    sources and try a "make modules"...



    --


    Jerry McBride

  4. Re: Making 2.6.x modules needs full kernel source or only headers?

    On Sun, 20 May 2007 21:22:31 -0400, Jerry McBride wrote:

    > For the life of me, how would you compile a new module without the source
    > code, using only the headers?


    I don't know, I'm only just starting to learn about this modules
    stuff.

    > Should be easy enough to prove one way or the other... just eliminate the
    > sources and try a "make modules"...


    What if I'm not trying to make all the modules, just one of them (my own)?


+ Reply to Thread