Re: knewbies project? - updating LDD3 source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 24, 2011 at 8:14 PM, DG <dangets@xxxxxxxxx> wrote:
> On Tue, May 24, 2011 at 11:47 AM, Robert P. J. Day
> <rpjday@xxxxxxxxxxxxxx> 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

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



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux