📜 ⬆️ ⬇️

What is wrong with changing * _defconfig when working with Linux kernel sources

In the wake of my first publication, I want to make a small note about the change in the i386_defconfig or x86_64_defconfig files included in the Linux kernel source.



In the comments to the publication, users (in particular, ValdikSS ) were interested, why not edit .config? To the extent of the commentary, I could not give a detailed answer there.
')
So, let's start with the difference between .config and * _defconfig. Attentive user typing command
wc -l .config arch/x86/configs/{i386,x86_64}_defconfig 

Conclusion
3972 .config
369 arch / x86 / configs / i386_defconfig
368 arch / x86 / configs / x86_64_defconfig
4709 total

can easily find that the difference of files is about 10 (!) times.

What does make *_defconfig do? Actually nothing super special. Important actions are listed below:


Reverse action for especially inquisitive
The reverse action is done with make savedefconfig , here in a little more detail.


Thus, it is not just a copy of the file.

Returning to editing the original version * _defconfig. What are the benefits?

Disadvantages?


In the list, I have already hinted that the standard practice of editing files in Git involves creating your own brunch. There we accumulate our own changes. For me, the virtues outweighed the flaws, so I see nothing wrong with editing * _defconfig.

What are your practices?

Source: https://habr.com/ru/post/252391/


All Articles