Objective of Linux kernel Research

Source: Internet
Author: User
The purpose of studying the Linux kernel-general Linux technology-Linux programming and kernel information. The following is a detailed description. I. The purpose of kernel Research

Let's get started first. To talk about Kernel research and exchange experiences, you must have an appropriate and accurate purpose to gain a lot.

Many people have such a question: why do we need to study the kernel? We are not kernel developers (maybe you will become a Linus Assistant in the future. As we all know, Linux has two meanings: kernel and release. The former is the core, and the latter is the application solution. Know the former but the latter, think and not learn; know the former but the latter, learn and do not think.

Learning is a step-by-step process. To learn about Linux, we first came into contact with Release versions with unique features, which were simple and easy to get started. During the learning process, we gradually gained a preliminary understanding of the Linux framework, simply put, we understand the game rules in the Linux World. While improving your own capabilities, you will find that the rate of progress seems to be declining. Why? This is because you only enable your own memory rather than your intellectual resources. The game rules are the core high-level encapsulation, it provides friendly interfaces for users and even programmers (I believe many people are immersed in the unix tool philosophy), and these interfaces have become very mature after years of hacking, I only need to remember. For example, the biggest difference between release versions is their respective FHS (file directory framework) and software package management mechanisms, such as gentoo's portage (port tree) and emerge, another example is Debian's apt-get. As long as users are proficient in the second place, they will be able to ride in the world of this release version, but the ways they are proficient are the same, that is, the recognition rules. When you are familiar with these rules, you will find that you are only looking at problems from the user perspective, not from the developer perspective, the difference between the two lies in whether you are innovative in the Linux World.

Compared with the open-source Linux community at home and abroad, it is not difficult to find that our level is still very low, and many innovations are occupied by the open-source foreign communities. We can only follow them and stay passive. Let's give an example to illustrate the problem. For example, if you are an lfs enthusiast and you are a beginner, you should follow the lfs document. However, if you are an old bird, refer to lfs hints to transform your system, both of them are beyond the power of Chinese people. The lfs documentation is developed by foreigners, and the lfs hints is also written by foreigners. This does not mean that we should not introduce technology, but see that we do not have the innovative power. We should be familiar with the udev adopted by the new kernel ), it is just a logic I/O-layer rule, but devfs evolved. Everyone is learning in the open-source community. Why Can foreigners think about innovative udev? In the final analysis, that is why we do not pay much attention to the bottom-layer research. Based on high-level encapsulation, what is the difference from using Microsoft's toy software? We always talk about our own release version, but have you ever thought that the release version is not just to package the ready-made kernel with shell and X? If so, redhat will not become one of the most popular Release versions in the world (redhat occupies a seat in most projects in the open-source community, and every new version is released with innovative technologies, the innovative NPTL thread library is a good example ).

It can be seen that there are two purposes to check the problem based on the kernel:

1. Take the initiative in innovation

2. Learn about Linux, but understand how it works. Understand Linux at a deeper level, so that the daily operations of the released version can be easily bypassed.

2. Study the kernel realm

Read --> practice --> Development

At present, most Chinese people study the kernel in the realm of reading (including my own :-), and our final realm is development, that is, to become one of the kernel developers, in this way, China's Linux Business is truly independent!

3. Study the kernel attitude

Linux Kernel has been developed for more than ten years, and the system has become very huge, which can be described as a root disorder. When we read it, it is often difficult to directly grasp the global situation, combined with our actual situation, it is best to study kernel-related items in conjunction with some of the amazing problems encountered during the daily use of Linux releases. For example, if you encounter a kernel panic problem during startup, we should find it in init/main. the init function in c has such a sentence, and then finds a solution following this idea, and finally finds that the necessary file system module must be compiled into the kernel (self-defense conflicts). For example, we need to modify the Run-level scripts of the release version. We should note that some scripts run in the kernel state (such as linuxrc), and most scripts run in the user State (rcX. d). If you understand the general direction, you can encode it.

Guerrilla Sanda gradually surrounded the big center

Of course, kernel research must be assisted by useful tools and materials (standing on the shoulders of giants and looking farther. I hope you can exchange more information and make progress together.

References:

1. All preparations have been completed. Start preparation. Start to transplant the kernel and start to develop the driver. Read the kernel. If necessary, no matter whether it affects development.

1. LFS once to thoroughly understand toolchain

2. The driver development book has been read several times and has been thoroughly studied on the FB driver.

3. Kernel Operating Mechanism several times

4. Several linux releases are used, mainly to differentiate bootloader and kernel.

5. The basic level of C language. Because development drivers are mostly porting

6. Establish FS, rootFS, and use busybox for deep learning.

The next step is based on S344B0X CPU, 2 m flash, 8 m sram, 256 LCD, 10 M ETH

Learning how a kernel is built based on uClinux-2.4.

2. If I want to study the kernel, I 'd better take a look at Robert Love's Linux kernel design and implementation to understand the basic concepts, then, read Understanding Linux Kernel and Linux Device Driver to view the Kernel code.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.