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] Problem compiling kernel module
Date: Fri, 4 Dec 2015 14:58:08 +0100	[thread overview]
Message-ID: <20151204145808.5a0f2d9e@free-electrons.com> (raw)
In-Reply-To: <980213507.13505384.1449236247504.JavaMail.zimbra@datacom.ind.br>

Carlos,

On Fri, 4 Dec 2015 11:37:27 -0200 (BRST), Carlos Santos wrote:

> Does anybody know a better workaround? Should we try to improve
> buildroot in order to solve the problem? 

The kernel Makefile uses a variable called "CF", which allows you to
pass arguments down to sparse. Can you try something like:

diff --git a/linux/linux.mk b/linux/linux.mk
index 9507837..6406d92 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -68,7 +68,8 @@ LINUX_MAKE_FLAGS = \
        ARCH=$(KERNEL_ARCH) \
        INSTALL_MOD_PATH=$(TARGET_DIR) \
        CROSS_COMPILE="$(TARGET_CROSS)" \
-       DEPMOD=$(HOST_DIR)/sbin/depmod
+       DEPMOD=$(HOST_DIR)/sbin/depmod \
+       CF="-gcc-base-dir $(STAGING_DIR)/usr"
 
 LINUX_MAKE_ENV = \
        $(TARGET_MAKE_ENV) \

This is completely untested, so you might need to adjust things a bit,
but it gives an initial idea.

Best regards,

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

      reply	other threads:[~2015-12-04 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 13:37 [Buildroot] Problem compiling kernel module Carlos Santos
2015-12-04 13:58 ` Thomas Petazzoni [this message]

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=20151204145808.5a0f2d9e@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