Kernel Development

Manish Katiyar mkatiyar at gmail.com
Mon Feb 24 00:49:04 EST 2014


On Sun, Feb 23, 2014 at 9:44 PM, subham soni <sonikernel1 at gmail.com> wrote:
> Should I directly dive into device drivers , I started referring Linux
> Device Drivers 3 for kernel 2.x. But seriously couldn't understand a
> thing. I dream is to have my own linux distro that surpasses all the
> limitations of present distros.

How about starting with first listing out "all the limitations of
present distros" and how do you plan to solve them.

Thanks -
Manish





>
> On 2/24/14, Pranay Srivastava <pranjas at gmail.com> wrote:
>> On Mon, Feb 24, 2014 at 6:43 AM, freeman <freeman.zhang1992 at 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
>>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Thanks -
Manish



More information about the Kernelnewbies mailing list