From: Greg KH <greg@kroah.com>
To: Tianrui Wei <tianrui@tianruiwei.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: How to Convert Legacy Kernel Modules for modern Kernels
Date: Fri, 21 Jan 2022 08:51:01 +0100 [thread overview]
Message-ID: <Yepl5WHtp6+Feviv@kroah.com> (raw)
In-Reply-To: <77D00D9A-F4E5-429F-BD91-729EE2847482@tianruiwei.com>
On Thu, Jan 20, 2022 at 06:10:31PM +0800, Tianrui Wei wrote:
> Hi,
>
> I was wondering if there're any tools/scripts in Linux that'd help me
> to convert legacy kernel modules for using on a modern Linux (Kernel >
> 5.0) system?
It depends on the driver you wish to convert. For wireless drivers,
there was the "linux backport project" that provided scripts and tools
to do this type of work. For other subsystems, I do not think anyone
ever did so as it's both not that hard, and also very specific to the
code that you are trying to convert.
> If there're not out of box solutions, is there a way I could view the
> API changes in every subsystem clearly? For example, this particular
> commit[^1] shows the second return argument is being removed from
> ki_complete, and it took a lot of fishing down the lkml to do. Perhaps
> there is a simpler way?
Use git itself to track the changes in apis. You can see all changes to
a .h file by doing:
git log -p path/to/file
and then see where the api got changed.
It usually isn't that difficult to forward port a driver, but it all
depends on the age of the code, and what it actually does. Do you have
a link to the code you wish to drag forward? You can also always add it
to the in-kernel drivers/staging/ area and have others help out with
this effort.
good luck!
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2022-01-21 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 10:10 How to Convert Legacy Kernel Modules for modern Kernels Tianrui Wei
2022-01-21 7:51 ` Greg KH [this message]
2022-01-21 8:21 ` Tianrui Wei
2022-01-21 8:53 ` Greg KH
2022-01-21 9:32 ` Tianrui Wei
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=Yepl5WHtp6+Feviv@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=tianrui@tianruiwei.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