DragonFly kernel List (threaded) for 2005-02
How to get started down the path...
Ok someone recently asked how to get started on
submitting patches. And I thought my answer would
be good for other people interested in starting.
The person has a general understanding of coding
and is trying to get a deeper understanding of
Hmm... thats one of those hard questions to answer.
The short answer is experience, lots of reading,
grad school, peer groups that make you prove that
you are smarter then they are. But I assume you don't
want that answer. :-)
There are multiple ways to get going. But prob one of the
the best ways is to find out what other people are doing on
the project and find something close to what they are working
on that interests you. And then see what is wrong with the
You can do this by first getting a copy of the code and
"fix it". Change it to your style of coding, add comments
that are missing, give the variable better names, etc.
Make it your own code. But make sure you don't change what
it does. Then compile, and see if it still works the same.
This will help you get a feel for the code.
If you find legitimate problems or think that some
of those comments would help, send in patches. The
patch should be against the original code and should
only address only that problem. Expect to throw away
all that work. Unless you truly believe that your
style is the one and only true style :-)
One project you could try is make a user space UFS.
0.0 Copy all the sys/ufs code out of the kernel tree.
0.1 Write simple Makefile.
0.2 Write a fake main().
1.1 Update Makefile until all file can be compiled.
You can do this by looking at the output of a
2.1 Add the least number of files from kernel tree that
are needed to support just ufs.
2.3 Write stub functions for thing you don't want to
2.4 repeat until you can compile.
3.1 Build a fake block device, which reads from a file.
3.2 And start filling in the stub functions.
4.0 run newfs on a floppy, and then dd the blocks into
the file for your your fake block device.
4.1 Put functions in main that excersize the code.
4.2 mount the fake block device.
4.3 delete a file from the block device.
I did this a while back, for a BSD/OS kernel and it didn't
take too long. (A week or so).