From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Adding package that builds Kernel Module (*.ko) to Buildroot environment
Date: Sat, 11 Jul 2015 01:07:23 +0200 [thread overview]
Message-ID: <55A0502B.3050001@mind.be> (raw)
In-Reply-To: <CAGiqocXLc13enqMF9dZhtMVx0Q=3dp4620aGKG3TrvQXvcuK-A@mail.gmail.com>
Hi Ron,
Please use text-only messages on this list, it looks much cleaner.
On 07/10/15 01:05, Ron Schmitt wrote:
>
> Hello,
>
> I am embarking on my first embedded driver development project.
>
>
> Could someone possibly give the explicit commands for how to do this, i..e.
> how to add a package that builds Kernel Module (*.ko) to Buildroot environment
>
>
> Let's assume the following:
>
> - I have installed buildroot at
>
> /path/buildroot
>
> - I have executed "make menuconfig" and set up my build.
> - I have not yet run the build, i.e. I have not executed "make"
> - I have copied your "/hello world" kernel module /c file to
>
> /path/buildroot/mykmod.c
>
> - I have copied your patch file to
>
> /path/buildroot/kmod-example.patch
This example is much too old to still be applicable with current buildroot,
though the changes are not that dramatic.
With current buildroot, you should create a new directory outside of buildroot,
which contains a Config.in and external.mk file and a directory mykmod that
contains the files Config.in and mykmod.mk. See [1]
For your convencience, I've created that structure in [2]. You can just clone
it and start from there.
The next step is to go to the buildroot directory and run:
BR2_EXTERNAL=<path_to_buildroot-mykmod> make menuconfig
You will now see an additional menu entry at the bottom: User-provided options.
In this menu, select the mykmod package. Now run 'make' and it will be built.
Please consult the buildroot manual to understand what is going on here [3].
For your real kernel module, you'll also want to replace the _SOURCE and _SITE
variables with a reference to your VCS.
Note that very soon now, a new infrastructure will be merged to simplify the
building of external linux kernel modules. With that infrastructure, mykmod.mk
will become:
###############################################################################
#
# mykmod
#
###############################################################################
MYKMOD_VERSION = 1.0
MYKMOD_SOURCE = mykmod-$(MYKMOD_VERSION).tar.bz2
MYKMOD_SITE = file://$(BR2_EXTERNAL)
$(eval $(kernel-module))
$(eval $(generic-package))
Regards,
Arnout
[1] http://nightly.buildroot.org/manual.html#outside-br-custom
[2] http://gitlab.com/arnout/buildroot-mykmod.git
[3] http://nightly.buildroot.org/manual.html#adding-packages
>
>
> Thank you very much for your time and assistance.
>
>
> Ron
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2015-07-10 23:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 23:05 [Buildroot] Adding package that builds Kernel Module (*.ko) to Buildroot environment Ron Schmitt
2015-07-10 23:07 ` Arnout Vandecappelle [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-04 6:30 Aleksandar Zivkovic
2011-08-04 7:45 ` Thomas Petazzoni
2011-08-04 8:40 ` Thomas De Schampheleire
2011-08-04 10:05 ` Aleksandar Zivkovic
2011-08-03 15:17 Aleksandar Zivkovic
2011-08-03 16:15 ` Michael S. Zick
2011-08-04 7:28 ` Thomas De Schampheleire
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=55A0502B.3050001@mind.be \
--to=arnout@mind.be \
--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