All of lore.kernel.org
 help / color / mirror / Atom feed
From: ydroneaud@opteya.com (Yann Droneaud)
To: kernelnewbies@lists.kernelnewbies.org
Subject: building kernel modules for linux differnet version
Date: Tue, 11 Mar 2014 17:40:50 +0100	[thread overview]
Message-ID: <1394556050.3257.66.camel@localhost.localdomain> (raw)
In-Reply-To: <CAK25hWP7Tkk8n87Jfxyhw0BwwxiLHPkRFXx25uBDdipPYE5cbw@mail.gmail.com>

Hi,

Le mardi 11 mars 2014 ? 21:16 +0530, Saket Sinha a ?crit :
> 
>          I have a scenario where I need to build a driver for
> different kernel versions.
> I have kernel-headers of different version in /lib/modules/
> 2.6.32-xxxx
> 2.6.39-xxxx
> 
> and currently I am booted into 2.6.32-xxxx(which I find out by uname -r)
> 

You don't need to boot on a specific kernel version to build external
module for it.

> Now in my driver makefile, I generate .ko of driver
> make  -C   /lib/modules/$(shell uname -r)/build  M=$(PWD)  modules
> 
> but I notice that the driver .ko gets generated for 2.6.39-xxxx though
> I am booted into  2.6.32-xxxx. Can anyone help me figure out why this
> is happening?
> 

Could you check that /lib/modules/2.6.32-xxxx/build is not a symbolic
link to linux 2.6.39-xxxx sources ?

Regards.

-- 
Yann Droneaud
OPTEYA

  reply	other threads:[~2014-03-11 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 15:46 building kernel modules for linux differnet version Saket Sinha
2014-03-11 16:40 ` Yann Droneaud [this message]
2014-03-11 17:12   ` Saket Sinha
2014-03-11 17:39     ` Yann Droneaud
2014-03-11 18:13       ` Saket Sinha
2014-03-11 18:41         ` Laurent Navet

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=1394556050.3257.66.camel@localhost.localdomain \
    --to=ydroneaud@opteya.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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.