All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] How can I compile a module into the kernel?
Date: Sun, 21 Oct 2018 09:55:48 +0200	[thread overview]
Message-ID: <20181021095548.41d5f0b9@windsurf.lan> (raw)
In-Reply-To: <CAF_dkJAn7NgNfn5d0wQDnGF7UoCuFoUZvnpvvYDgWoA7RpV4Ag@mail.gmail.com>

Hello Patrick,

On Sat, 20 Oct 2018 19:27:05 -0400, Patrick Doyle wrote:
> For security reasons, I would like to disable loadable modules in my
> kernel.  But my wireless driver is only available as a module.
> 
> I could drop the module into the source tree, possibly with a minor
> tweak to the Makefile, and just include it that way, but then I would
> have to maintain a source tree separately from my vendor supplied
> source tree.  And I hate proliferating yet another public git
> repository clone of a clone of a clone of the Linux kernel.
> 
> Or I could drop the module into my source tree and convert it into a
> large patch which I would apply to the kernel as part of the build
> process.  But those sorts of patches get messy to maintain.
> 
> What I would really like to do is to tell buildroot and/or the kernel
> "Link this external module into the kernel at link time, not at
> runtime".

You simply can't do that: external modules can only be built as
modules. If you want a driver to be compiled inside the kernel image
itself, then it has to be built as part of the kernel build process. So
you need to import the source code of your driver into your kernel
source tree.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-10-21  7:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-20 23:27 [Buildroot] How can I compile a module into the kernel? Patrick Doyle
2018-10-21  7:55 ` Thomas Petazzoni [this message]
2018-10-21 17:20   ` Patrick Doyle
2018-10-21 17:33     ` Thomas Petazzoni
2018-10-21 17:47       ` Baruch Siach
2018-10-22  0:56         ` Patrick Doyle

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=20181021095548.41d5f0b9@windsurf.lan \
    --to=thomas.petazzoni@bootlin.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 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.