日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

defconfig、 .config

發布時間:2023/12/20 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 defconfig、 .config 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

最近在裁剪內核慢慢關注這個問題

defconfig、 .config

?

defconfig 一般在arch/arm64/configs/目錄下,是一個簡單的內核配置,是沒有展開的。

.config一般是用來執行make menuconfig的基礎配置

從.config到defcong不是簡單的復制操作,而是make arch=arm64 defcong?

通過menuconfig生成的.confg也不是直接拷貝成defcong,而是使用make savedefconfig

?

The?.config?file is not simply copied from your?defconfig?file. The motivation for storing?defconfig?in such a format is next: in?defconfig?we can only specify options with non-default values (i.e. options we changed for our board). This way we can keep it small and clear. Every new kernel version brings a bunch of new options, and this way we don't need to update our?defconfig?file each time the kernel releases. Also, it should be mentioned that kernel build system keeps very specific order of options in?defconfig?file, so it's better to avoid to modify it by hand. Instead you should use?make savedefconfig?rule.

Simplified explanation

When?.config?file is being generated, kernel build system goes through all?Kconfig?files (from all subdirs), checking all options in those?Kconfig?files:

  • if option is mentioned in?defconfig, build system puts that option to?.config?with value chosen in?defconfig
  • if option isn't mentioned in?defconfig, build system puts that option to?.config?using its default value, specified in corresponding?Kconfig

Check?scripts/kconfig/Makefile?and?scripts/kconfig/conf.c?files to see how it's actually done.

?

具體查看

https://stackoverflow.com/questions/41885015/what-exactly-does-linux-kernels-make-defconfig-do

總結

以上是生活随笔為你收集整理的defconfig、 .config的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。