Rv: Re: knewbies project? - updating LDD3 source
De: DG <dangets@gmail.com> Asunto: Re: knewbies project? - updating LDD3 source Para: "Jim Cromie" <jim.cromie@gmail.com> Cc: "kernelnewbies" <kernelnewbies@kernelnewbies.org> Fecha: martes, 24 de mayo de 2011, 15:14 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
There is a repo on GitHub with the same purpose. I haven't checked it out personally, but it's probably worth a look.
I've found the same googlecode svn repo a while ago, but since it was very out-dated, I decided to start my own project on github.
https://github.com/ezequielgarcia/ldd3-examples
I am working against 2.6.37; but currently, the only module that really compiles is scull and scullpipe. martinezjavier git repo seems much updated; too bad I haven't find that when I looked for !
Maybe we should concentrate our efforts, despite for me it was just a learning project.
Greetings, Ezequiel.
There is a repo on GitHub with the same purpose. I haven't checked it out personally, but it's probably worth a look.
I've found the same googlecode svn repo a while ago, but since it was very out-dated, I decided to start my own project on github.
https://github.com/ezequielgarcia/ldd3-examples
I am working against 2.6.37; but currently, the only module that really compiles is scull and scullpipe. martinezjavier git repo seems much updated; too bad I haven't find that when I looked for !
Maybe we should concentrate our efforts, despite for me it was just a learning project.
Greetings, Ezequiel.
Yes, it would be better to concentrate our efforts. When I needed to update the examples to a more recent kernel I had the same problem than you do. I did find a few repos but they were outdated. I send a few patches to some of the authors but i didn't have any feedback so I (sadly) had to start (yet another) LDD3 repo. But probably the best idea is to think a good example set to include in the kernel's samples dir. I just don't know what is the policy about the code that reside in that dir. In the meantime patches are welcomed so I can include more examples in this repo. I will try to keep this repo compiling with newer kernels but I probably won't have to much time to add more examples. -- 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
On Tue, 24 May 2011, Javier Martinez Canillas wrote:
There is a repo on GitHub with the same purpose. I haven't checked it out personally, but it's probably worth a look.
I've found the same googlecode svn repo a while ago, but since it was very out-dated, I decided to start my own project on github.
https://github.com/ezequielgarcia/ldd3-examples
I am working against 2.6.37; but currently, the only module that really compiles is scull and scullpipe. martinezjavier git repo seems much updated; too bad I haven't find that when I looked for !
Maybe we should concentrate our efforts, despite for me it was just a learning project.
Greetings, Ezequiel.
Yes, it would be better to concentrate our efforts. When I needed to update the examples to a more recent kernel I had the same problem than you do. I did find a few repos but they were outdated. I send a few patches to some of the authors but i didn't have any feedback so I (sadly) had to start (yet another) LDD3 repo.
But probably the best idea is to think a good example set to include in the kernel's samples dir. I just don't know what is the policy about the code that reside in that dir. In the meantime patches are welcomed so I can include more examples in this repo. I will try to keep this repo compiling with newer kernels but I probably won't have to much time to add more examples.
as i mentioned earlier, i'm currently doing something like this for an introductory kernel programming and device drivers course i'm updating but, since it's not my course originally and i'm doing this in concert with someone else, i don't know how much i'll be allowed to share publicly since all of that work will become part of the courseware but let me throw out some ideas. first, don't worry if something is perfectly appropriate for the kernel source samples/ directory. just write something that demonstrates a simple feature, test it, document it with comments, and maybe post it here, and let others see it. if it's good, worry about submitting it for samples/ later. also (and something i'm particularly interested in), i want to write examples that *emulate* certain kernel features. as in, loadable modules that simulate behaviour like hotplugging a new device, so you can do something like that, then watch the uevents in user space to see how they match up. mostly, just pick a kernel feature and start writing and posting. others will tell you if you're on the right track. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================
participants (3)
-
Ezequiel García -
Javier Martinez Canillas -
Robert P. J. Day