Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Buildroot and kernel modules
Date: Wed, 12 Nov 2014 22:03:01 +0100	[thread overview]
Message-ID: <20141112220301.59a53a17@free-electrons.com> (raw)
In-Reply-To: <CAJpxd06J7Jo8XnMPZpGN_A9pQ19aDKabzBOeDShn6zaheoTi2A@mail.gmail.com>

Dear Bryce Schober,

On Wed, 12 Nov 2014 11:26:00 -0800, Bryce Schober wrote:

> I reluctantly hijack this thread to ask a very closely related question: Is
> there a way to build an out-of-tree module like this using the
> buildroot-compiled linux headers, instead of the possibly-older
> toolchain-provided linux headers?

A kernel module is never built using the linux headers provided by the
toolchain. The linux headers provided by the toolchain only contain the
userspace part of the kernel headers, and they are therefore
insufficient to build kernel modules (which as their name suggest,
contain kernel code).

Therefore, when you do something like:

> > > define KERNELMODULE_BUILD_CMDS
> > >    $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules
> > > endef

It uses the kernel code in $(LINUX_DIR), and mainly the kernel headers
+ kernel configuration, to build your kernel modules.

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-11-12 21:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  5:04 [Buildroot] Buildroot and kernel modules Sid Bharij
2014-11-12 10:03 ` Thomas Petazzoni
2014-11-12 12:21   ` Paassen, Hiram van
2014-11-12 12:34     ` Thomas Petazzoni
2014-11-12 18:25       ` Sid Bharij
2014-11-12 21:27         ` Thomas Petazzoni
2014-11-12 22:19           ` Sid Bharij
2014-11-12 22:20             ` Thomas Petazzoni
2014-11-12 19:26       ` Bryce Schober
2014-11-12 21:03         ` Thomas Petazzoni [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-19 15:26 [Buildroot] buildroot " jerryalex at tx.rr.com
2013-06-19 15:35 ` Thomas Petazzoni
     [not found]   ` <20130619155518.8G4TE.59637.root@cdptpa-web08-z02>
2013-06-20  7:39     ` Thomas Petazzoni

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=20141112220301.59a53a17@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox