Results 1 to 9 of 9
Hi,
I wanted to know that, how the kernel .config file options are related to source code of kernel....
- 05-03-2011 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 44
Relation between kernel config file and kernel source
Hi,
I wanted to know that, how the kernel .config file options are related to source code of kernel.
- 05-03-2011 #2Just Joined!
- Join Date
- Apr 2010
- Posts
- 66
It is my understanding that the .config file indicates which flags and options are to be passed to the compiler during kernel compilation. So, all of those options, which normally take an =y, =n, or =m, indicate all of the features the kernel will have once built. "y" means it should have the feature built in, "n" means it should not, and I believe "m" means the compilation process should build a module for it.
The more y's you have, the more space in memory your kernel will take when it runs.
- 05-04-2011 #3Just Joined!
- Join Date
- Jun 2004
- Location
- Halesowen, West Midlands, UK
- Posts
- 71
- 05-04-2011 #4Just Joined!
- Join Date
- Dec 2010
- Posts
- 44
Thanks Siddly,
But what I want to know is, Is there any generic way to find which option of .config file activates which part of code(file) and how it is.
- 05-04-2011 #5Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
Relation between kernel config file and kernel source
You want to customize the kernel to your PC to make it smaller and faster.
Configuring a custom kernel is quite long and tedious (but building a customized config file, of course, is fast say 1-2 hours).
You need to know the hardware details of your CPU and peripherals/drivers
so you can choose which specific kernel feature you only need. The shell
commands below would give you this info and store data in the corresponding
files at current directory (or provide pathname to store them somewhere else):
host]$ lspci > hardware.info
host]$ cat /proc/cpuinfo > cpu.info
I hope this helps.
- 05-04-2011 #6Just Joined!
- Join Date
- Dec 2010
- Posts
- 44
OK, lets come to the main aim...
I just want to understand nfs part of the kernel code(don't want to customize), how it is implemented and how code works, and all ...
Can any body help me....
- 05-04-2011 #7Linux Newbie
- Join Date
- Apr 2010
- Location
- Novosibirsk, Russia
- Posts
- 136
If you a "kernel hacker" - it would be easier to read some kernel docs, instead of digging code by yourself
You can try to read kernel documentation, shipped with kernel sources, or begin to read The Linux Kernel . When you will be aware how kernel works in some details, I suppose, it would not be painful to look into source code
- 05-04-2011 #8
I think you'd be better of punching a query in Google. As I'm working on my own OS, the workings of an NFS also tend to interest me. I find osdev.org to be quite a handy resource.
This page doesn't contain much useful info itself but the references mentioned just might.
- 05-04-2011 #9Just Joined!
- Join Date
- Jun 2004
- Location
- Halesowen, West Midlands, UK
- Posts
- 71
You can get a good idea from "make xconfig" or "make menuconfig" and using the help which describes what each option does.Even when rebuilding an existing kernel it's a good idea to disable options for harware that's not on your system, that way you can have a smaller kernel that's specific to your hardware.Most distro kernels come configured for everything so everyone gets a working kernel for whatever hardware that's on their box. It just means a much larger kernel than is necessary for individual hardware configurations.


Reply With Quote

