Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is linux kernel source starting point? [closed]

Tags:

c

linux-kernel

Well, after finishing an advanced C programming course i decided to take a look at the code of Giants. I wanted to have a look at Linux kernel source but as much as it's complicated I can't get to the starting point ! The main function or the first line of code to be executed after grub loads.

Would you please help me locate the first line of code to be executed in linux kernel 2.6 ?

like image 207
SteepCurver Avatar asked Dec 02 '10 19:12

SteepCurver


People also ask

What is the starting point of Linux kernel?

The start_kernel is the entry of the generic and architecture independent kernel code, although we will return to the arch/ folder many times. If you look inside of the start_kernel function, you will see that this function is very big. For this moment it contains about 86 calls of functions.

Where is Linux kernel source code located?

After installation, the kernel sources are located in /usr/src/linux-<kernel-version>. If you plan to experiment with different kernels, unpack them in different subdirectories and create a symbolic link to the current kernel source.

How do I find the kernel source?

If the kernel source code is present in your system, you can find it under the /usr/src/linux-<Version> directory, where <Version> must be replaced with the source code kernel version you are dealing with. You also can find the last kernel source code at https://github.com/torvalds/linux.

Which of the following is an entry point of kernel module?

Begin of a kernel module is starting from initialization function, which mainly addressed with macro __init just infront of the function name.


1 Answers

linux/init/main.c:start_kernel()

like image 178
Nikolai Fetissov Avatar answered Jan 04 '23 08:01

Nikolai Fetissov