public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Lucas Tanure <tanure@linux.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: Build mainline driver for another Kernel Version
Date: Wed, 17 May 2023 10:22:26 +0200	[thread overview]
Message-ID: <2023051753-bagginess-buffed-764c@gregkh> (raw)
In-Reply-To: <CAJX_Q+38EPqjHVjztapnOGGPvwKUySsXbjhng8iKTfSSq=fxGA@mail.gmail.com>

On Wed, May 17, 2023 at 09:16:45AM +0100, Lucas Tanure wrote:
> Hi,
> 
> Can I build a driver in the mainline kernel to a previous kernel version?

Not easily, and you really do not want to do that as the whole kernel
source, drivers included, are a snapshot in time and depend on each
other.

> Like, in the mainline kernel, I have a Z driver, and I want to use
> that driver for my current stable driver in my embedded system with
> version kernel 5.15. Is there a procedure to build a kernel driver
> against other specific kernel headers?

Update to a newer kernel version, it will be much easier and simpler
overall.

Drivers consume _everything_ from the core kernel, and are not
stand-alone at all.  They depend on everything else, trying to pick one
out and put it into a different kernel is not how Linux works at all,
sorry.

What prevents you from just using a newer kernel?

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2023-05-17  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17  8:16 Build mainline driver for another Kernel Version Lucas Tanure
2023-05-17  8:22 ` Greg KH [this message]
2023-05-17  8:47   ` Lucas Tanure
2023-05-17  8:56     ` Greg KH

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=2023051753-bagginess-buffed-764c@gregkh \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=tanure@linux.com \
    /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