Need Suggestions

inventsekar inventsekar at gmail.com
Wed Jul 18 00:39:28 EDT 2018


Hi Athul...
This is my collegemate's writing, ... This will solve all your
confusions....

---

The most important quality that you need to inculcate if you want to do any
kernel space programming is "Patience" (or persistence if you will). Though
it is a good quality for any large scale project, it is a fundamental
requirement for kernel programming. It is very easy to see progress and
make an impact on userspace projects, but even simple changes in the kernel
core will take a lot of time to get accepted, and will often require
multiple rewrites. But fear not, as there are plenty of people who have
conquered this mountain and it is not something to be worried about.

The starting steps will be:

1) Try to understand how to use git <http://git-scm.com/>. We were (are ?)
not taught to use a version control system in our college and it is such a
fundamental thing. So start using git for college assignments and get the
hang of it.

2) Start writing a lot of C programs and get experienced with pointers,
memory allocation, threading. You can start implementing things like Stack,
Queue, Trees etc. (whatever you study in datastructures) in a simple,
thread-safe way. Do not focus on how you can visualize these datastructures
but how you can effectively implement their functionality and thread
safety. Use pthreads for threading. Do not use any library (like Glib) for
giving you convenient datastructures (like Strings). Implement each of the
things on your own. (But when you are writing code for a product, use a
standard library always instead of re-inventing the wheel)

Write these C programs on Linux and compile using gcc. In our college days
we were using turboc on windows and I hope things have changed. Use a linux
distro (fedora <http://fedoraproject.org/>, debian <https://www.debian.org/>
, openSUSE <http://en.opensuse.org/>, Gentoo <https://www.gentoo.org/> etc.)
exclusively; Do not use Windows (at least for a while) to make yourself
aware of the sysadmin, shell-scripting parts of linux, which will come in
handy.

3) Grab a (any) book on Operating Systems theory and read it. The dinosaur
book <http://en.wikipedia.org/wiki/Operating_System_Concepts> by
Silberschatz et. al. is a good start.

4) Without hesitation buy, Robert Love's Linux Kernel Programming
<http://www.amazon.com/gp/product/0672329468/> book. It is one of the best
beginner material and start reading it parallel to the OS book. This is
easier to read than the previous one and more practical. But the previous
one adds more value and is more theoretical. Handle (3) and (4) in parallel
without blocking on any of the other activities.

5) After you are done with (1) and (2), and feel sufficiently confident
with C and pointers, grab the  linux kernel sources from
http://git.kernel.org/ and try to build the sources yourself.
http://kernelnewbies.org/KernelBuild should help. Learn how to install and
boot with the kernel that you have built.

6.1) Subscribe to Kernel Newbies mailing list
http://kernelnewbies.org/MailingList and read every mail, *even* if you do
not understand most of it.

6.2) Watch: https://www.youtube.com/watch?v=LLBrBBImJt4

6.3) Subscribe to http://lwn.net RSS feeds.

After this, you should be able to fix and send any trivial, documentation,
staging fixes. Once you have done this and get the hang of the process, you
will know how to send patches for any parts of the kernel.

By this time, you would have found your areas of interest in kernel
(filesystems, memory management, io scheduler, CPU scheduling etc.). You
will then have to dig deeper in those particular areas, by:
a) subscribing to the individual mailing lists (such as fs-devel
<http://marc.info/?l=linux-fsdevel>, etc.)
b) reading about the bug reports for the individual component
c) finding the literature that is relevant for your subsystem (The linux
memory management book
<https://www.kernel.org/doc/gorman/pdf/understand.pdf>Mel Gorman, etc).

Three other non-technical things that I would recommend are:

1) Create a new email address and use that for all your open source
activities. That way you do not miss any important updates from your
friends.

2) Kernel programming will not give you big money in the short and medium
term (at least in India). If your motivation is not excellence in
engineering, but becoming popular or rich (it is not wrong btw) then you
should focus on some other areas of programming (developing apps, websites,
solving user problems, making meaning etc.).

It will often take months (or even years) before you make a significant
contribution that is not merely a memory leak or bug fix. Be prepared for
that. But since you have age, energy, time (once you get married and/or
have kids you will understand) on your side, it is not that difficult.

Many people try kernel programming and then quit because they do not have
the patience and perseverance. It may also happen that they have found a
more interesting technology at its nascent stage (like Distributed
Computing, Artificial Intelligence, Containers, NLP etc.) It is not wrong
to quit midway :) Any little time spent on kernel programming will
immensely benefit you as a programmer even when you are doing user space
programming. This holds good for not just kernel programming but any
large-code-base/system programming (like Compilers, glibc, webkit, chrome,
firefox etc.)

3) Be more aware of the GSoC community in colleges around you.

All the best.

On Sat 14 Jul, 2018, 9:36 PM Athul Joy, <aathuljjoy333 at gmail.com> wrote:

> Dear friends, I am new to the Linux kernel development.
> Can anyone help me how to start my journey in order to build my own
> kernel?
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180718/b4994b27/attachment-0001.html>


More information about the Kernelnewbies mailing list