Skip to contentSkip to conversation

knewbies project? - updating LDD3 source

DISCUSSION Ezequiel García 3 participants 3 messages May 24, 2011 – May 26, 2011

lore
Share & tools
lore
#0 lore raw
Quoted 74 lines
Quoted 16 lines

De: DG <[email protected]>
Asunto: Re: knewbies project? - updating LDD3 source
Para: "Jim Cromie" <[email protected]>
Cc: "kernelnewbies" <[email protected]>
Fecha: martes, 24 de mayo de 2011, 15:14
On Tue, May 24, 2011 at 11:47 AM,
Robert P. J. Day
<[email protected]>

Quoted 5 lines · wrote:
Quoted 3 lines · Jim Cromie

over at http://code.google.com/p/ldd3/
it says:
The famous "Linux Device Drivers" released

the

Quoted 2 lines

sample code. but the

Quoted 1 line
Quoted 1 line

code does not reflect the latest kernel

updates,

Quoted 9 lines

some of code cannot

Quoted 1 line
Quoted 1 line

even compile. This project is to make it

compatible with the current

Quoted 6 lines
Quoted 4 lines

kernel.

http://lwn.net/Kernel/LDD3/
http://examples.oreilly.com/9780596005900/

?the one caution i would give here is that quite

a

Quoted 2 lines

bit of code in

Quoted 1 line

LDD3 shouldn't be updated, anyway, since it

reflects

Quoted 4 lines

features that

Quoted 3 lines

have been deprecated for quite some time.

?for instance, no one should be writing proc

files

Quoted 2 lines

anymore. ?also,

Quoted 1 line

ioctl()s are also discouraged for the most part.

?so

Quoted 2 lines

i would be

Quoted 1 line

selective about what parts of LDD3 code *should*

be

Quoted 10 lines

updated as

Quoted 3 lines

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.

https://github.com/martinezjavier/ldd3

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.

#1 lore raw
Quoted 18 lines
Quoted 18 lines
Quoted 6 lines

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

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 !

Quoted 5 lines
Quoted 5 lines

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.

Signature · 6 lines
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
#2 lore raw
Quoted 30 lines · Javier Martinez Canillas
Quoted 18 lines
Quoted 18 lines
Quoted 6 lines

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

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 !

Quoted 5 lines
Quoted 5 lines

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.

Quoted 6 lines

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

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================