All of lore.kernel.org
 help / color / mirror / Atom feed
From: pebolle@tiscali.nl (Paul Bolle)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Compile external module against linux source and use functionality in linux source
Date: Thu, 25 Sep 2014 09:29:18 +0200	[thread overview]
Message-ID: <1411630158.6613.23.camel@x220> (raw)
In-Reply-To: <CAKpWUYk=3qACF2K1XSLp-quKN=H=m-qMFkDZx3fgXW0T7aB7Ng@mail.gmail.com>

On Thu, 2014-09-25 at 12:30 +0530, Arjun Pandey wrote:
> On Thu, Sep 25, 2014 at 12:28 PM, Paul Bolle <pebolle@tiscali.nl> wrote:
> > On Thu, 2014-09-25 at 12:24 +0530, Arjun Pandey wrote:
> >> I tried moving the module to kernel tree as well. Ideally this will be
> >> out of tree module. That still didn't work.
> >> I have included a header file with the extern function declaration in
> >> the source file that i modified.
> >> That didn't help either.

Building a module built-in requires a bit more: changes to a kernel tree
Kconfig file and a Makefile. There must be a lot of documentation on
this. But I would do something like
    git grep -w tristate $(git ls-files "net/*Kconfig*")

and pick a few Kconfig symbols (ie, the things with lines reading
"config EXAMPLE"). The grep the tree again for their macros:
    git grep -w "CONFIG_EXAMPLE" net/

and figure out how things all fit together.

(My guess, of course, is that your linker error disappears when you
manege to build the module built-in. Once we know that, we can look
whether it's actually possible to achieve what you want to do with an
external module.)

Hope this helps.


Paul Bolle

  reply	other threads:[~2014-09-25  7:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25  5:19 Compile external module against linux source and use functionality in linux source Arjun Pandey
2014-09-25  6:36 ` Paul Bolle
2014-09-25  6:41   ` Arjun Pandey
2014-09-25  6:48     ` Paul Bolle
     [not found]       ` <CAKpWUYnUyd4mErC2wRBGqhHXg35PHWeGf2dnNJk=LTsbDx=n7A@mail.gmail.com>
     [not found]         ` <1411628331.6613.11.camel@x220>
2014-09-25  7:00           ` Arjun Pandey
2014-09-25  7:29             ` Paul Bolle [this message]
2014-09-25  7:32               ` Arjun Pandey
2014-09-25 12:27 ` Valdis.Kletnieks at vt.edu
2014-09-26  6:24   ` Arjun Pandey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411630158.6613.23.camel@x220 \
    --to=pebolle@tiscali.nl \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.