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 ?
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.
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.
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.
Begin of a kernel module is starting from initialization function, which mainly addressed with macro __init just infront of the function name.
linux/init/main.c:start_kernel()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With