From: martinez.javier@gmail.com (Javier Martinez Canillas)
To: kernelnewbies@lists.kernelnewbies.org
Subject: knewbies project? - updating LDD3 source
Date: Tue, 24 May 2011 22:17:32 +0200 [thread overview]
Message-ID: <BANLkTimvXigLODiLEhTU3euKuW4MZGLz0w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik=XsJ0LOwA+tJ_XLSUOOsic-Arzg@mail.gmail.com>
On Tue, May 24, 2011 at 8:14 PM, DG <dangets@gmail.com> wrote:
> On Tue, May 24, 2011 at 11:47 AM, Robert P. J. Day
> <rpjday@crashcourse.ca> wrote:
>> On Tue, 24 May 2011, Jim Cromie wrote:
>>
>>> over at http://code.google.com/p/ldd3/
>>> it says:
>>> The famous "Linux Device Drivers" released the sample code. but the
>>> code does not reflect the latest kernel updates, some of code cannot
>>> even compile. This project is to make it compatible with the current
>>> kernel.
>>>
>>> http://lwn.net/Kernel/LDD3/
>>> http://examples.oreilly.com/9780596005900/
>>
>> ?the one caution i would give here is that quite a bit of code in
>> LDD3 shouldn't be updated, anyway, since it reflects features that
>> have been deprecated for quite some time.
>>
>> ?for instance, no one should be writing proc files anymore. ?also,
>> ioctl()s are also discouraged for the most part. ?so i would be
>> selective about what parts of LDD3 code *should* be updated as
>> examples of good kernel programming.
>>
>> rday
>
Robert is right, the drivers are quite old. As Robert says proc files
are deprecated in favor of sysfs and ioctl are discouraged in favor of
netlink sockets. Another example is that most LDD3 driver modules are
loaded with a script that create the device nodes. Unless your system
is a embedded device (an even in that case) you should let udev do
this). So instead of having drivers that just compile cleanly and
works, it would be better to update the APIs the drivers use and how
they interact with userspace.
> There is a repo on GitHub with the same purpose. ?I haven't checked it
> out personally, but it's probably worth a look.
>
> https://github.com/martinezjavier/ldd3
>
As the author of the repo I can tell that the drivers compile with
kernels 2.6.32, 2.6.35 and from 2.6.37 forward (including 2.6.39 and
linux-next). I create it for academic purposes, I haven't thest all
the drivers, only the ones I needed for the students.
Best regards,
--
Javier Mart?nez Canillas
(+34) 682 39 81 69
PhD Student in High Performance Computing
Computer Architecture and Operating System Department (CAOS)
Universitat Aut?noma de Barcelona
Barcelona, Spain
next prev parent reply other threads:[~2011-05-24 20:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 17:35 knewbies project? - updating LDD3 source Jim Cromie
2011-05-24 17:47 ` Robert P. J. Day
2011-05-24 18:14 ` DG
2011-05-24 20:17 ` Javier Martinez Canillas [this message]
2011-05-24 20:26 ` Robert P. J. Day
2011-05-24 20:32 ` Leon Woestenberg
2011-05-24 20:36 ` Robert P. J. Day
2011-05-24 21:02 ` Javier Martinez Canillas
2011-05-24 20:37 ` Manohar Vanga
2011-05-25 3:42 ` naren.mehra at gmail.com
2011-05-25 6:27 ` Mohamed Thalib H
2011-05-25 7:29 ` sumeet linux
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=BANLkTimvXigLODiLEhTU3euKuW4MZGLz0w@mail.gmail.com \
--to=martinez.javier@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).