1.檔案內容
kernel文字敘述檔的組成很簡單,每行都是由一個關鍵及一到二個參數組成。
#表示註解。
常用的敘述檔:/usr/src/sys/i386/conf/GENERIC
詳細的敘述檔:/usr/src/sys/i386/conf/LINT
#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you‘ve installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.246.2.48 2002/08/31 20:28:26 obrien Exp $
說明: 此段在說明編譯文字敘述檔的參考資料。
及目前編輯GENERIC的版本1.246.2.48 。
machine i386
選擇機器的內部結構,除了i386 還有 alpha 及 pc98 我們現今看到的多是 i386 。
#cpu I386_CPU
#cpu I486_CPU
cpu I586_CPU
#cpu I686_CPU
CPU的型態..透過 dmesg | grep CPU,可以看到您的CPU型態
CPU:Pentium (166-MHz 586-class CPU)
所以我將其他的3個型態#(註解)掉,只留下I586_CPU。
ident OHAHA
kernel的識別,通常我們用機器名稱的大寫..所以我的是OHAHA。
maxusers 0
這個數值大約等於你希望同時能夠登入機器的人數;
正確的說,此代表process的最大值有關,maximum=20+16*maxusers
在正常的情況下,如果您要跑X-Window的話,最小值是4;
以一般狀況來說,用64已經足夠,因為process值為:1044 (20+16*64)
從FreeBSD 4.5 開始系統會自動調整這個設定,若您將其設為0的話。
注意:maxusers不是能夠login的限制。要限制同時login數可以透過之後的
pseudo-device pty 16 來限制。
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
options MATH_EMULATE #Support for x87 emulation
模擬數學浮點運算器 除非您的機器是 386 或 486SX 之前的型號,
不然您可以將此行 # 掉, 因為FreeBSD在這方面的模擬並不很精確,
若您要求精確度的話..
將 MATH_EMULATE 改成 GPL_MATH_EMULATION 改用GNU 的模擬數學浮點運算器。
options INET #InterNETworking
網路支援,即使您沒有打算要連上網路也請保留,因為有些程式會用到loop
options INET6 #IPv6 communications protocols
IPv6 的通訊協定 (因為尚未啟用所以disable)
options FFS #Berkeley Fast Filesystem
options FFS_ROOT #FFS usable as root device [keep this!]
FFS是基本的FreeBSD硬碟檔案系統。若您要用硬碟開機...務必保留 !!
options SOFTUPDATES #Enable FFS soft updates support
Soft Updates 選項,可以加速磁碟的寫入。
FreeBSD 4.X 版後,預設已經加入,但未啟動。
options UFS_DIRHASH #Improve performance on big directories
改善FreeBSD在大資料夾中執行的效能。
options MFS #Memory Filesystem
options MD_ROOT #MD is a potential root device
memory-mapped檔案系統,如果您有很大的swap空間,您想要好好的利用的話...keep this
如果要使用的話,通常我們會將他掛在(mount)在/tmp 這個地方,
因為這裡有許多程式將暫存資料存放在此。
若要採用的話...請在/etc/fstab中的swap部分加入(或者說更新):
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s1b /tmp mfs rw 0 0
options NFS #Network Filesystem
options NFS_ROOT #NFS usable as root device, NFS required
網路檔案系統,除非您想經由TCP/IP的方式,將UNIX的系統分割區掛上,否則 # 掉
因為本網站之後有講到NFS方面...所以留著...^^"
#options MSDOSFS #MSDOS Filesystem
MSDOS檔案系統,除非您要在開機時就掛上此DOS分割區,否則您可以放心 # 掉
#options CD9660 #ISO 9660 Filesystem
#options CD9660_ROOT #CD-ROM usable as root, CD9660 required
ISO9660檔案系統,若您沒有光碟機,或者不常mount光碟機,則可以 # 掉
options PROCFS #Process filesystem
Process 檔案系統,為"假想"的檔案系統,掛(mount)在/proc,
此允許類似 ps 指令顯示process的資訊。
options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!]
與4.3BSD的相容性[務必保留!],否則有些程式會不正常
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI
使kernel暫停15秒,去搜尋您機器上的SCSI裝置。
這個您應該看過吧...就是開機時令你覺得很煩很慢的那個...
您可以將此數值減少..以加快開機速度。
#options UCONSOLE #Allow users to grab the console
讓您能夠抓取console的畫面...這個對 X 的使用者比較有用...
#options USERCONFIG #boot -c editor
允許您從開機選單中啟動組態編輯器(configuration editor) 幾乎用不到~"~
#options VISUAL_USERCONFIG #visual boot -c editor
同上...只不過是視覺化的...~"~
#options KTRACE #ktrace(1) support
啟動kernel process tracing(追蹤系統程序),在debug時很有用,
...一般人還是用不到...@@"
.
分页: [1] [2] [3]
TAG: freebsd kernel 编译