All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] In Buildroot, how to compile kernel modules
Date: Wed, 26 Feb 2014 18:32:54 +0100	[thread overview]
Message-ID: <530E2546.6000404@mind.be> (raw)
In-Reply-To: <530DA66C020000460004B1F9@gwia2.rz.hs-offenburg.de>

On 26/02/14 08:31, Frank Ihle wrote:
> Right setting kernel dependencies makes sense, but I'm not so sure about
> the process: when I have the following makefile
> 
> obj-m += /<path-to-module>/measurement_gpio.o

 The obj-m should not contain a path.

> KDIR := /<BR-path>/output/build/linux-2.6.39/
> PWD := $(shell pwd)
> default:
>     $(MAKE) ARCH=arm
> CROSS_COMPILE=/<BR-path>/output/host/opt/ext-toolchain/bin/arm-none-linux-gnueabi-
> -C modules
> 
> where is then the generated .ko file and how can I make sure that in this
> build process the .ko file will be moved to a certain place ?

 The modules_install target of the kernel will do that:

define ON2_8170_MODULES_INSTALL_TARGET_CMDS
$(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M=$(@D) \
        modules_install
endef


 If you want to support the same from your own makefile, you should add
something like:

make -C $(KDIR) M=`pwd` INSTALL_MOD_PATH=<...>/output/target \
	modules_install


 By the way, please don't top-post, and strip the irrelevant parts from
the quoted text.

 Regards,
 Arnout

> 
> Kind Regards
> 
> Frank
> 

[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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2014-02-26 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  9:04 [Buildroot] In Buildroot, how to compile kernel modules Frank Ihle
2014-02-25 10:23 ` Raúl Sánchez Siles
2014-02-25 10:38   ` [Buildroot] Antw: " Frank Ihle
2014-02-25 20:40     ` Arnout Vandecappelle
2014-02-26  7:31       ` [Buildroot] " Frank Ihle
2014-02-26 17:32         ` Arnout Vandecappelle [this message]
2014-02-28  8:05           ` [Buildroot] Antw: " Frank Ihle

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=530E2546.6000404@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 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.