欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
【z】make config解惑
make config解惑
2010-05-15 21:03

一直對Linux內核編譯的配置問(wèn)題的理解模棱兩可的,網(wǎng)上的說(shuō)法也眾說(shuō)紛紜,尤其是配置工具的使用問(wèn)題,大家的理解完全就不一致。找了幾個(gè)比較官方的網(wǎng)站,總結了一下比較權威的解釋。

Linux內核的配置系統由三個(gè)部分組成,分別是:
1. Makefile:分布在 Linux 內核源代碼中的 Makefile,定義 Linux 內核的編譯規則;
2. 配置文件(config.in):給用戶(hù)提供配置選擇的功能;
3. 配置工具:包括配置命令解釋器(對配置腳本中使用的配置命令進(jìn)行解釋?zhuān)┖团渲糜脩?hù)界面(提供基于字符界面、基于 Ncurses 圖形界面以及基于 Xwindows 圖形界面的用戶(hù)配置界面,各自對應于Make config、Make menuconfig 和 make xconfig)。
這些配置工具都是使用腳本語(yǔ)言,如 Tcl/TK、Perl 編寫(xiě)的(也包含一些用 C 編寫(xiě)的代碼):
配置命令                                             解釋腳本
make config,make oldcofig                    scripts/Configure
make menuconfig                                 scripts/Menuconfig
make xconfig                                       scripts/tkparse
除非是配置系統的維護者,一般的內核開(kāi)發(fā)者無(wú)須了解它們的原理,只需要知道如何編寫(xiě) Makefile 和配置文件就可以。
以字符界面配置(make config)為例,頂層Makefile調用scripts/Configure,按照arch/$(ARCH)/config.in來(lái)進(jìn)行配置。命令執行完后產(chǎn)生文件.config,其中保存著(zhù)配置信息。下一次再做make config將產(chǎn)生新的.config文件,原.config被改名為.config.old。


Linux 內核支持非常多的硬件平臺,對于具體的硬件平臺而言,有些配置就是必需的,有些配置就不是必需的。另外,新增加功能的正常運行往往也需要一定的先決條件,針對新功能,必須作相應的配

置。因此,特定硬件平臺能夠正常運行對應著(zhù)一個(gè)最小的基本配置,這就是缺省配置。
Linux 內核中針對每個(gè) ARCH 都會(huì )有一個(gè)缺省配置。在向內核代碼增加了新的功能后,如果新功能對于這個(gè) ARCH 是必需的,就要修改此 ARCH 的缺省配置。修改方法如下(在 Linux 內核根目錄下):
1. 備份 .config 文件
2. cp arch/arm/deconfig .config
3. 修改 .config
4. cp .config arch/arm/deconfig
5. 恢復 .config
如果新增的功能適用于許多的 ARCH,只要針對具體的 ARCH,重復上面的步驟就可以了。

看看內核源碼的README:
Do not skip this step even if you are only upgrading one minor version. New configuration options are added in each release, and odd problems will turn up if the configuration

files are not set up as expected. If you want to carry your existing configuration to a new version with minimal work, use "make oldconfig", which will only ask you for theanswers to new questions.

- Alternate configuration commands are:
"make config"      Plain text interface.
"make menuconfig" Text based color menus, radiolists & dialogs.
"make xconfig"     X windows (Qt) based configuration tool.
"make gconfig"     X windows (Gtk) based configuration tool.
"make oldconfig"   Default all questions based on the contents of your existing ./.config file and asking about new config symbols.
"make silentoldconfig"   Like above, but avoids cluttering the screen with questions already answered.
Additionally updates the dependencies.
"make defconfig"   Create a ./.config file by using the default symbol values from either arch/$ARCH/defconfig or arch/$ARCH/configs/${PLATFORM}_defconfig, depending on the architecture.
"make ${PLATFORM}_defconfig" Create a ./.config file by using the default symbol values from arch/$ARCH/configs/${PLATFORM}_defconfig.
Use "make help" to get a list of all available platforms of your architecture.
"make allyesconfig" Create a ./.config file by setting symbol values to 'y' as much as possible.
"make allmodconfig" Create a ./.config file by setting symbol values to 'm' as much as possible.
"make allnoconfig" Create a ./.config file by setting symbol values to 'n' as much as possible.
"make randconfig" Create a ./.config file by setting symbol
values to random values.
在網(wǎng)上搜到的一個(gè)解釋?zhuān)?br>1. 如果.config不存在,運行make config/menuconfig時(shí)的缺省設置由固化在各個(gè)Kconfig文件中各項目的缺省值決定。
2. 如果.config存在,運行make config/menuconfig時(shí)的缺省設置即是當前.config的設置,若對設置進(jìn)行了修改,.config將被更新。
3. arch/arm/defconfig是一個(gè)缺省的配置文件,make defconfig時(shí)會(huì )根據這個(gè)文件生成當前的.config。
4. arch/arm/configs文件夾中有許多命名為xxx_defconfig的配置文件,如果運行make xxx_defconfig,當前.config文件會(huì )由xxx_defconfig文件生成。
5. make oldconfig的作用是備份當前.config文件為.config.old,如若make config/menuconfig設置不當可用于恢復先前的.config。

       總結了一下,平時(shí)編譯內核時(shí)所采用的是先將當前版本內核的配置文件拷貝到源碼目錄下.config,然后采用make oldconfig的方式只回答新內核中添加功能的問(wèn)題,如果沒(méi)有.config文件,配置工具基于的默認值是arch/$(ARCH)/Kconfig里的缺省值。一般如果當前.config被配置工具改動(dòng)了,那么就會(huì )在該目錄下生成一個(gè).config.old文件,這是改動(dòng)之前配置文件的備份。make config毫無(wú)疑問(wèn)是最基本也是最繁瑣的一種方式,它會(huì )問(wèn)遍所有問(wèn)題,然后創(chuàng )建.config文件,如果已有該文件,它會(huì )進(jìn)行備份(文件名為.config.old)。

      不過(guò)貌似現在內核的編譯比較人性化,考慮到了配置時(shí)的可操作性,如果用戶(hù)在終端執行make menuconfig或者make oldconfig,它會(huì )自動(dòng)先將/boot目錄下的配置文件寫(xiě)進(jìn).config文件中,新增加的功能也會(huì )寫(xiě)進(jìn)去,不過(guò)采用的是注釋的形式(所以它會(huì )比直接拷貝來(lái)的.config文件要大一些)。

       有一點(diǎn)要說(shuō)明的是,.config文件中記錄的都是選擇y或者m的配置選項,如果配置的時(shí)候選擇了n,那么在配置文件中是不會(huì )有任何記錄的;但是如果當初配置時(shí)只是簡(jiǎn)單地按回車(chē)跳過(guò),那么它也認為是選擇了n,不過(guò)它在.config文件中會(huì )以注釋的形式進(jìn)行說(shuō)明該選項還沒(méi)進(jìn)行配置。

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
瑞芯微RK3568|SDK開(kāi)發(fā)之Kernel編譯
Linux 內核配置方式詳解
openwrt make menuconfig
linux設備驅動(dòng)歸納總結(一):內核的相關(guān)基礎概念
driver note
menuconfig過(guò)程詳解
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久