Page 1 of 1

Making Custom Kernel

PostPosted: 26 Jul 2014, 17:06
by mikkysati
What are the things to be learnt to make custom kernel? I mean do I have to learn about Linux kernel in detail or just learning to merge patches and the following types of link will do it.
http://xda-university.com/as-a-develope ... rom-source
http://xda-university.com/as-a-develope ... our-kernel

Re: Making Custom Kernel

PostPosted: 27 Jul 2014, 12:22
by yank555
Well in general, you need to know one thing, that is "know how to code".

By that you'll know how to read and understand existing code, so you'll know how to modify it to make it do what you want.

The rest is an more or less an easy learning curve, like getting to understand git, gerrit, getting the compilebox set up (ideally Linux virtual machine) etc.

Merging stuff you don't understand will not be a good idea, you'll end up building a timebomb filled kernel, since there may be a little here and there going wrong and crashing the whole system at some point, or plain just not booting...

So the base is in fact learning to coding, in general, understand how computers work deep down in machine code (even if you don't quite know coding in machine language, but that's what the compiler will make of your C code), understanding the C language and specifics, how the Linux kernel is designed, where to find what etc...

JP.

Re: Making Custom Kernel

PostPosted: 28 Jul 2014, 17:57
by mikkysati
yank555 wrote:Well in general, you need to know one thing, that is "know how to code".

By that you'll know how to read and understand existing code, so you'll know how to modify it to make it do what you want.

The rest is an more or less an easy learning curve, like getting to understand git, gerrit, getting the compilebox set up (ideally Linux virtual machine) etc.

Merging stuff you don't understand will not be a good idea, you'll end up building a timebomb filled kernel, since there may be a little here and there going wrong and crashing the whole system at some point, or plain just not booting...

So the base is in fact learning to coding, in general, understand how computers work deep down in machine code (even if you don't quite know coding in machine language, but that's what the compiler will make of your C code), understanding the C language and specifics, how the Linux kernel is designed, where to find what etc...

JP.


So, particularly I wll have to learn about linux kernel and machine code.

Re: Making Custom Kernel

PostPosted: 28 Jul 2014, 23:22
by yank555
mikkysati wrote:
yank555 wrote:Well in general, you need to know one thing, that is "know how to code".

By that you'll know how to read and understand existing code, so you'll know how to modify it to make it do what you want.

The rest is an more or less an easy learning curve, like getting to understand git, gerrit, getting the compilebox set up (ideally Linux virtual machine) etc.

Merging stuff you don't understand will not be a good idea, you'll end up building a timebomb filled kernel, since there may be a little here and there going wrong and crashing the whole system at some point, or plain just not booting...

So the base is in fact learning to coding, in general, understand how computers work deep down in machine code (even if you don't quite know coding in machine language, but that's what the compiler will make of your C code), understanding the C language and specifics, how the Linux kernel is designed, where to find what etc...

JP.


So, particularly I wll have to learn about linux kernel and machine code.


Linux kernel, programming methodology and C ... machine code understanding certai ly helps, but is not necessarily a must.

JP.

Sent from my Nexus 5 running stock rooted AOSP on Yank555.lu v1.0-alpha5 kernel.

Re: Making Custom Kernel

PostPosted: 07 Aug 2014, 11:15
by mikkysati
yank555 wrote:
Linux kernel, programming methodology and C ... machine code understanding certai ly helps, but is not necessarily a must.

JP.

Sent from my Nexus 5 running stock rooted AOSP on Yank555.lu v1.0-alpha5 kernel.


Yank, sorry again to disturb you.
To learn linux kernel I bought a book "Linux Kernel Development BY Robert Love".That book is for Linux 2.6. So, I am asking you whether these types of book will be helpful in building the android kernel. I mean are these directly related to android kernel or I have to learn something else?
(Sorry for too many noob questions)

Re: Making Custom Kernel

PostPosted: 07 Aug 2014, 16:14
by yank555
mikkysati wrote:
yank555 wrote:
Linux kernel, programming methodology and C ... machine code understanding certai ly helps, but is not necessarily a must.

JP.

Sent from my Nexus 5 running stock rooted AOSP on Yank555.lu v1.0-alpha5 kernel.


Yank, sorry again to disturb you.
To learn linux kernel I bought a book "Linux Kernel Development BY Robert Love".That book is for Linux 2.6. So, I am asking you whether these types of book will be helpful in building the android kernel. I mean are these directly related to android kernel or I have to learn something else?
(Sorry for too many noob questions)


Should be fine, a Linux kernel is a Linux kernel, even if 2.6.y is a bit old, the logic is not hugely changed.

JP.

Sent from my Nexus 5 running stock rooted AOSP on Yank555.lu v1.0-alpha5 kernel.