kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: pranjas@gmail.com (Pranay Srivastava)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Kernel Development
Date: Mon, 24 Feb 2014 10:06:25 +0530	[thread overview]
Message-ID: <CA+aCy1GNknd4Uiq=fxZ8MqOdVoomgmrzdjq1dbrm+mhLqjzDJg@mail.gmail.com> (raw)
In-Reply-To: <530A9CC6.6010608@gmail.com>

On Mon, Feb 24, 2014 at 6:43 AM, freeman <freeman.zhang1992@gmail.com> wrote:
> Hi,
>  2014-02-24 01:24, subham soni :
>
> Hello,
>         I am a newbie to kernel development. I would like to develop my own
> kernel from scratch. From where should I start from? I have a good
> experience of the commands in Linux (Ubuntu,Fedora,Debian,Slackware). I
> googled out and I came to know that I should start from Device Drivers. Now
> which device driver should I code? Or should I master Shell Scripting? For
> developing a kernel (my aim here would be to increase the battery life,
> since most laptops have only 1.30 hrs or 2.00 hrs in Linux OS) and 3.00 hrs
> in Windows Environment. How should I start and from where?

First learn about how compilation is done. How the program is actually
executed. Learn about linker scripts, you'll need that black magic art
that you'll definitely going to need.

With this information you can at least understand the role BIOS play
and how bootloader comes into play.

Before your kernel coding starts i think you should at the very least
be able to replicate a dummy bootloader, just to motivate yourself :P.

Intel manuals (System programmer) would be your guide if you are doing
this for PC.

Last but not the least, test your code as a program first on PC. Make
functions that are generic and could work with the arguments you pass
to them. So with that said you can very easily create dynamic memory
management code and test it as a module, then integrate it with
kernel. You must always use parameters and don't assume anything. As
your each module gets ready then integrate it with your kernel. You'll
need to write some test programs as well so as to know that it
actually works.
Break it down into manageable pieces first before you start coding!.

There would be a lot of code required before you can just print Hello
World using your own printk or printf.

Some resources you can google are osdev wiki, lots of info but please
don't copy paste understand it first and then try to write by
yourself. You'll learn alot by doing yourself.

>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> I read some books about how to DIY an OS . Of course it's simple and crude,
> but it's a good start, I think.
>
> Hidemi Kawai, Homemade Operating System Within 30 Days
> Yuan Yu, Operating System From Scratch (I don't know if there is an English
> edition. The project from this book is on GitHub:
> https://github.com/yyu/osfs00)
>
> " There are many ways to learn OS, but I believe the best way is to learn by
> practice. There are many open source OS code, but the code bases are huge.
> You will get lost in the source code labyrinth.
>
> There are good books, Operating System: Design and Implementation by A.S.
> Tanenbaum and A.S. Woodhull for example, but they don't teach you where to
> begin either.
This is by far the best book if you are actually serious about it.
Definitely nobody will teach you how it's actually done but it'll
guide you the best. You'll have to answers on your own.

>
> That's why you should come here. If Tanenbaum's book is a reference, my
> project series is a tutorial. Prof. Tanenbaum tells you what. I'll tell you
> how."
>
> Above are two funny books involving me into coding and learning about OS.
> However, if you're serious, please just ignore :-P
>
> All the best,
> Freeman Zhang
>
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


    ---P.K.S
-- 
Pranay Srivastava

  reply	other threads:[~2014-02-24  4:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-23 17:24 Kernel Development subham soni
2014-02-23 18:19 ` Kuldeep Singh Dhaka
2014-02-23 23:35 ` John de la Garza
2014-02-24  1:13 ` freeman
2014-02-24  4:36   ` Pranay Srivastava [this message]
2014-02-24  5:44     ` subham soni
2014-02-24  5:49       ` Manish Katiyar
2014-02-24  6:08 ` priyaranjan
2014-02-24  6:44   ` subham soni
2014-02-24  9:45     ` Anuz Pratap Singh Tomar
2014-02-24 17:57 ` Valdis.Kletnieks at vt.edu
2014-02-25  4:51   ` rakesh Bhaskar
2020-03-29 12:27 Harsh chopra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+aCy1GNknd4Uiq=fxZ8MqOdVoomgmrzdjq1dbrm+mhLqjzDJg@mail.gmail.com' \
    --to=pranjas@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).