What is the Kernel?
Is the kernel itself an executable file? I mean, you can compile it with gcc, so whats the diffrence between a kernel file and a normal C compiled program?
|
The kernel is, technically, an executable file. Notably, though, it contains no external links (to libc or otherwise) and uses no system calls (since it provides it itself). User-mode-linux is a good example of how it is just an executable.
|
kernel is compressed file containing compiled code .
this code is the kernel souce file and we can set the options to compile the kernel accordnig to our needs regards |
I understand that, but I dont get how you can use gcc to create an operating system file. can every C compiler create a file that can operate a computer directly? I always thought that compilers create excutable files that can be used BY an operating system and not AS an operating system...
|
the kernel is not the whole operating the operating systen
the operating systen has proper structure to work with now the work that it does like(it requires all the libraries and the config files to work) read.write and the support of hardware etc is there in the kernel |
|
thanks, I think I'm starting to get it now... I looked in all the source around but couldn't find where it all starts. Is there a main() function that is the first to run? I couldn't find anything like that in init/main.c (which I understand is the first file to be compiled). I want my computer, just for fun, to print a welcome messege when linux starts, I was thinking about these lines:
printk("Welcome to my Linux\n"); for (i=0; i<10000000; i++) ; whats is a good function to put these line in so I would see this messege as the first thing printed out? |
u can put that in the file
rc.local in /etc/rc.d like echo "welcone to linux" regards |
no, i mean inside the kernel's source, just when linux is booted
|
AFAIK, usual executable file has sections: .data , .code and so on. These sections are read by OS. But what format should OS kernel be? (There is no OS to boot it :-\)
|
All times are GMT -5. The time now is 07:59 PM. |