Linux kernel 2.6.5 kernel compilation process
CD /USR/SRC/LINUX-2.6
2. This command ensures that there is no incorrect .o file and the mutual dependence of the file in the source code directory.
Make Clean; Make MrProper
3. Based on the configuration interface of the text menu, the character terminal is recommended
Make menuconfig configuration kernel
4. Read the configuration file generated by the configuration process to create a dependency tree corresponding to the configuration, which determines which needs to be compiled and those do not need
Make Dep
5. Complete the file left by the previous step to avoid some errors
Make clean
6. Generate the kernel
Make Bzimage
7. This step is to answer Enable Loadable Module Support (CONFIG_MODULES) during the configuration process is necessary, make modules and make modules_install generate the corresponding module and copy the module to the system standard directory. That is / lib / modules / $ kernel version number
8. mkinitrd initrd-doDo.img 'uname -r' makes a file system mirror
With Linux boot steps:
1. Perform the loader LILO or GRUB in the 0 cylinder 0 sector in the ROM, and the loader is responsible for positioning the kernel, loading, and execution.
2. Once the kernel is loaded, it is first initialized, then attempts to load and log in the root file system in the disk.
3. If the kernel does not find the loaded root file system, the startup process will stop this. If the root file system is loaded and logged in, you will see a line of information: VFS: MOUNTED ROOT (EXT2 FileSystem) Readonly.
After that, the system discovers the init program and execute it. The init program is looking for its configuration file / etc / inittab, and starts to execute the script, which is a combination of shell commands to execute the following command, such as loading the required module, Load SWAP, initialize the network, load all drives listed in the FSTAB, and the like. Finally, start a program called Getty, which is responsible for communication between console and ttys, which prints the login prompt on the display and activates the login program, login to deal with the validity of the login and establish a dialogue with the user. At this point, the startup process is completed.