Linux Kernel Learning (5) difficult to learn *

Source: Internet
Author: User

After talking about the 00-indexfile, we finally finished kbuild.txt, but how far away we are. Speaking of this, a lot of friends who read my article will think about what you want to do, right,
I am also confused! This analysis is correct. However, for beginners who do not have much knowledge, I think this analysis method is better. At least I have a good grasp of the link. I will first find out the main knowledge points.
Come on, and break through each other. I like this idea. It is quite normal for everyone to look at and solve the problem differently. So there is another question. I have to talk about it here. What is my final goal? Of course
Now, the goal is good, and the goal should be long and short!

Master the kernel source code analysis skills in terms of duration, and find out the specific implementation methods of the device model in terms of short points.
Then, clarify the process from kernel startup to module initialization. At a short point, you can learn about the kernel source code structure through the makefile and kconfig files. If you want to know what I am doing
Makefile and kconfig files, analyze the syntax, and find the analysis skills.

Okay, I'm not talking about anything.
. Continue. The 2nd file kconfig.txt, And the 3th file kconfig-language.txt. Let's take a look. What did you write?
Lu, I should translate the two files. Then I can't tell you. When I find that all the files are translated, it is a very stupid idea, I translate all files that I think are important,
It is not unimportant, but after reading it, I found that it is actually about how to write the kconfig configuration file and some environment variables (it should be said that it is some set variables). For the kconfig syntax
Format, which can be found on the Internet or in the library. For variable settings, here is an example to understand:
Kconfig_tristate
--------------------------------------------------
This environment variable can be set to specify the Path & name of
"Tristate. conf" file. Its default value is "include/config/tristate. conf ".
Kconfig_tristate
Let's look at the translation of this environment variable, which is about the file path and name setting of tristate. conf. As for how to use this file, it is estimated that it is useless to know it now.
Path. Makefiles.txt, the 4th file, went in and looked at it and found that I relied on such a huge pile of files. If I had translated it, it would have been a week and it would have been a bad translation, so I held the hope that there would be
Let's talk about makefile analysis and search... A lot of articles. Basically, I gave this file to the translation side as it is. Thank you !! Wait for me to post it. Read it several times. Otherwise
Face-to-face analysis makefile has some obstacles, because it is indeed complicated to look at it roughly. The 5th file is modules.txt, which is a very big one, but I have browsed the introduction.
Information: Well, it seems that it doesn't matter how external modules are compiled into the kernel ~~

Looking at my kbuild directory, there seems to be some questions that I can't tell, and there are a lot of questions, but the mentality is very important. Every time I read the articles of Daniel, they always remind me that I should never be impetuous when I look at the kernel, you must learn to stick to it and make yourself combiner.

Well, why do we analyze the kbuild directory? Obviously, we started from readme. Don't forget the way back! Continue.
8. Compiling the kernel: (compile the kernel)
To be honest, he is not very good at compiling the kernel. He feels a bit messy and can rely on the network to read many articles. However, it is too early to compile the kernel, I haven't even tried to configure this function. How can I compile it. Even if I understand it, it is another thing for me to compile or not compile it.
9. If something goes wrong :( error)
Look, Linus is really thoughtful. If any kernel error is found, some information about important people is written in the maintainers file. However, I believe in Linux very much, I don't care. Just let it go!

Now, we have analyzed readme. It has been two days since I first read it. However, my path is still very long. What tests me later is not only intelligence, but also perseverance, stick to it to move closer to the goal.

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.