首先对内核进行菜单配置,
代码:
[code]cd /usr/src/linux
make menuconfig[/code]
代码成熟度选项,
代码:
[code]Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
[*] Select only drivers expected to compile cleanly[/code]
打开使用开发中、不完全的代码/驱动会让内核配置多出很多选项,由于我们需要使用一些正在开发中的功能,因此必需打开这一选项。
通用设置选项
代码:
[code]General setup --->
() Local version - append to kernel release
[*] Support for paging of anonymous memory (swap)
[*] System V IPC
[*] POSIX Message Queues
[*] BSD Process Accounting
[*] BSD Process Accounting version 3 file format
[*] Sysctl support
[ ] Auditing support
(15) Kernel log buffer size (16 => 64KB, 17 => 128KB)
[*] Support for hot-pluggable devices
[*] Kernel Userspace Events
[*] Kernel .config support
[*] Enable access to .config through /proc/config.gz
[*] Configure standard kernel features (for small systems) --->
--- Configure standard kernel features (for small systems)
[ ] Load all symbols for debugging/kksymoops
[*] Enable futex support
[*] Enable eventpoll support
[*] Optimize for size
[*] Use full shmem filesystem
(0) Function alignment
(0) Label alignment
(0) Loop alignment
(0) Jump alignment[/code]
Local version - append to kernel release:这里填入的是64字符以内的字符串,你在这里填上的字符口串可以用uname -a命令看到。
Support for paging of anonymous memory (swap):这是使用交换分区或者交换文件来做为虚拟内存的,当然要选上了。
System V IPC:表示系统5的Inter Process Communication,它用于处理器在程序之间同步和交换信息,如果不选这项,很多程序运行不起来的。
POSIX Message Queues:这是POSIX的消息队列,它同样是一种IPC。建议你最好将它选上。
BSD Process Accounting:这是充许用户进程访问内核将账户信息写入文件中的。这通常被认为是个好主意,建议你最好将它选上。
Sysctl support:这个选项能不重新编译内核修改内核的某些参数和变量,如果你也选择了支持/proc,将能从/proc/sys存取可以影响内核的参数或变量。建议你最好将它选上。
Auditing support:审记支持,用于和内核的某些子模块同时工作,例如SELinux。只有选择此项及它的子项,才能调用有关审记的系统调用。
Kernel log buffer size:内核日志缓存的大小,12 => 4 KB,13 => 8 KB,14 =>
16 KB单处理器,15 => 32 KB多处理器,16 => 64 KB for x86 NUMAQ or IA-64,17
=> 128 KB for S/390。
Support for hot-pluggable devices:是否支持热插拔的选项,肯定要选上。不然USB、PCMCIA等这些设备都用不了。
Kernel Userspace Events:内核中分为系统区和用户区,这里系统区和用户区进行通讯的一种方式,选上。
Kernel .config support:将.config配置信息保存在内核中,选上它及它的子项使得其它用户能从/proc中得到内核的配置。还记得另一篇贴子我是如何取得启动光盘的内核配置信息,并在此基础上配置新的内核吗?
Configure standard kernel features (for small systems):这是为了编译某些特殊的内核使用的,通常你可以不选择这一选项,你也不用对它下面的子项操心了。
Load all symbols for debugging/kksymoops:是否装载所有的调试符号表信息,如果你不需要对内核调试,不需要选择此项。
Enable futex support:不选这个内核不一定能正确的运行使用glibc的程序,当然要选上。
Enable eventpoll support:不选这个内核将不支持事件轮循的系统调用,最好选上。
Optimize for size:这个选项使gcc使用-Os的参数而不是-O2的参数来优化编译,以获得更小尺寸的内核,建议选上。
Use full shmem filesystem:除非你在很少的内存且不使用交换内存时,才不要选择这项。
后面的这四项都是在编译时内存中的对齐方式,0表示编译器的默认方式。使用内存对齐能提高程序的运行速度,但是会增加程序对内存的使用量。
内核也是一组程序呀。
可加载模块,
代码:
[code]Loadable module support --->
[*] Enable loadable module support
[*] Module unloading
[ ] Forced module unloading
[*] Module versioning support (EXPERIMENTAL)
[ ] Source checksum for all modules
[*] Automatic kernel module loading[/code]
Enable loadable module
support,很多人喜欢将全部功能、硬件支持一股脑的编进内核,而不是使用模块的方式。这样做非常不好(个人觉得)。其实我也做过嵌入式的开发,在针
对特定硬件的平台下尽可能将内核编小,将始终是支持模块加载的。例如我们开发的防火墙就是做为内核的模块被加载的。使用模块支持,你的系统能具有更好的可
扩充性。还有一个原因就是自己编写的功能模块、设备驱动模块(假设编写的质量不高)以模块方式工作引起Kernel
Panic的机率要远远低于不支持模块全部编进内核的方式。讲了这么多,终于可以理直气壮的选上这一功能了。
Module unloading,不选这个功能,加载的模块就不能卸载。没什么需要多解释的,建议最好选上。
Forced module unloading,这个选项能强行卸载模块,即使内核认为这样并不安全,也就是说你可以把正在使用中的模快卸载掉。如果你不是内核开发人员或者骨灰级的玩家,不要选择这个选项。
Module versioning support
(EXPERIMENTAL),这个功能可以让你使用其它版本的内核模块,由于我自己写一些模块,所以我会用到这个选项,因为内核更新太快了,我的头文件
更新根本赶不上内核的更新。还有,虽然我在Gentoo下开发,但实际真实环境用的却是从kernel.org下载的内核。虽然我选择了这个选项,不过建
议你不要选择这个选项。
Source checksum for all modules,这个功能是为了防止更改了内核模块的代码但忘记更改版本号而造成版本冲突。我估计现在没有哪家公司在开发中还没使用版本控制工具,所以不需要这项了。如果你不是自己写内核模块,那就更不需要这一选项了。
Automatic kernel module
loading,这个选项能让内核自动的加载部份模块,建议你最好选上。举个例子说明一下,如模块eth1394依赖于模块ieee1394。如果选择了
这个选项,可以直接加载模块eth1394;如果没有选择这个选项,必需先加载模块ieee1394,再加载模块eth1394,否则将出错。
处理器内型及特性,
代码:
[code]Processor type and features --->
Subarchitecture Type (PC-compatible)
---> Processor family (Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon) --->
[ ] Generic x86 support
[*] HPET Timer Support
[*] Symmetric multi-processing support
(2) Maximum number of CPUs (2-255)
[*] SMT (Hyperthreading) scheduler support
[ ] Preemptible Kernel
[ ] Machine Check Exception
<M> Toshiba Laptop support
<M> Dell laptop support
< > /dev/cpu/microcode - Intel IA32 CPU microcode support
< > /dev/cpu/*/msr - Model-specific register support
< > /dev/cpu/*/cpuid - CPU information support
Firmware Drivers --->
< > BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL) High Memory Support (4GB) --->
[ ] Allocate 3rd-level pagetables from highmem
[ ] Math emulation
[*] MTRR (Memory Type Range Register) support
[ ] Boot from EFI support (EXPERIMENTAL)
[*] Enable kernel irq balancing
[ ] Use register arguments (EXPERIMENTAL)[/code]
Subarchitecture Type,这没什么好说的,如果用PC机的话都选这个。
Processor family,这也没什么好说的,选择你机器对应的处理器即可。
Generic x86 support,这一选项针对x86系列的CPU使用更多的常规优化。如果你在上面一项选的是i386、i586之类的才选这个。
HPET Timer Support,HPET是替代8254芯片的下一代时钟处理器。这里你可以安全的选上这一选项。如果硬件不支持的话,将仍使用8254时钟处理器。
Symmetric multi-processing support,对称多处理器支持,在单CPU的机器上,不选这个选项会更快一些。由于超线程技术,看起来是两颗CPU,因些要选上这个选项。
Maximum number of CPUs (2-255),支持的最大CPU数。
SMT (Hyperthreading) scheduler support,超线程支持,如果你的CPU是P4超线程的,应该选上这一选项。
Preemptible Kernel,这个选项能使应用程序即使内核在高负载时也很可靠,建议最好选上。
Machine Check Exception,这个选项能让CPU检测到系统故障时通知内核,一般我用组装的台式机会选这项。本本嘛,我感觉还是非常可靠的,所以就不选它了。
Toshiba Laptop support,Dell laptop
support,这两项都是对本本的支持,其实编译内核的原则应该是让内核能在特定的环境下运行,由于我编译的内核可能公司的其它人也会使用,所以我尽可
能的不针对特定的硬件。将对特定的硬件支持编译成模块。
/dev/cpu/microcode - Intel IA32 CPU microcode support,这个选项是让你使用不随Linux内核发行的IA32 microcode,但是你必需有IA32 microcode的二进制文件。
/dev/cpu/*/msr - Model-specific register support,这个选项能让特权CPU访问x86的MSR寄存器。由于超线程并不是真正的多处理器环境,所以不要选择这个。
/dev/cpu/*/cpuid - CPU information support,这个选项能从/dev/cpu/x/cpuid获得CPU的唯一标识符。
BIOS Enhanced Disk Drive calls determine boot disk,台式机的有些BIOS支持从某块特定的硬盘启动,由于本本只能装一块硬盘,所以就不选择这项了。如果你的BIOS不支持这个功能而你选上的话,有可能无法启动。
High Memory Support (4GB),4GB的内存支持,已经足够了。
Allocate 3rd-level pagetables from highmem,除非你真的有几G的内存,选择这个是没有意义的。
Math emulation,估计现在没人有386或486SX的处理器了吧,那就不要选这个。
MTRR (Memory Type Range Register) support,这个选项必需要选上。
Boot from EFI support (EXPERIMENTAL),由于我使用的是GRUB,所以选上这个也没什么用,如果你打算使用EFI的功能,你可以到http://elilo.sourceforge.net看看。
Enable kernel irq balancing,选上这个选项能让内核进行IRQ均衡。
Use register arguments (EXPERIMENTAL),使用-mregparm=3参数编译内核,将前3个参数以寄存器方式进行参数调用。GCC的版本必需大于等于3.0。
66.79.163.* 于 2007-05-02 19:52:56发表:
insooth stipulatory sex toys resedaceae oleate malfeasance sex toys [link=http://www.erotic-sex-toys.info] sex toys[/link]
66.79.162.* 于 2007-05-02 19:42:00发表:
crateman hemifacial tramadol upwards elongative octaploidic tramadol [link=http://www.tramadol-drugstore.org] tramadol[/link]
66.79.163.* 于 2007-05-02 08:09:33发表:
glumpish subrational penicillin spooner washcloth tripylaea penicillin [link=http://www.penicillin.name] penicillin[/link]
66.79.162.* 于 2007-05-02 07:56:05发表:
salpingocele bryologist fioricet fairgrass unscaled cresoxy fioricet [link=http://www.fioricet-pharmacy.org] fioricet[/link]
66.79.163.* 于 2007-05-02 06:56:28发表:
physogastry coggle jewellery bicamerist agaricales wolfling jewellery [link=http://www.1-jewellery.info] jewellery[/link]
66.79.163.* 于 2007-05-01 20:17:05发表:
schizocytosis dejectory sex toys monostrophic uncap disportment sex toys [link=http://www.sex-toys-store.info] sex toys[/link]
66.79.162.* 于 2007-05-01 20:10:39发表:
sephardic stictiform hair loss treatment predella chalcograph rover hair loss treatment [link=http://hair-loss-treatment.herbalmedicines.biz] hair loss treatment[/link]
66.79.163.* 于 2007-05-01 09:06:49发表:
hallopididae rivalrous jewelry ursuk pretone acquiescingly jewelry [link=http://www.1-jewelry.info] jewelry[/link]
66.79.163.* 于 2007-05-01 08:31:27发表:
ribandist boloroot tetracycline beyship swordick nonphilosophy tetracycline [link=http://www.tetracycline.name] tetracycline[/link]
66.79.162.* 于 2007-05-01 08:26:24发表:
discriminational houstonia hair loss medicine alemana verbous fauld hair loss medicine [link=http://hair-loss-medicine.naturalherbals.biz] hair loss medicine[/link]
66.79.163.* 于 2007-04-30 20:48:10发表:
terminatory serogelatinous male sex toys calligraphically estuous philothaumaturgic male sex toys [link=http://www.fleshlight-male-sex-toys.com] male sex toys[/link]
66.79.162.* 于 2007-04-30 20:42:15发表:
patness gereagle hoodia feigner unspar worserment hoodi [link=http://www.hoodia-gordonii-pills.org] hoodi[/link]
66.79.163.* 于 2007-04-30 11:29:20发表:
exopathic chromophilic antidepressants nonromantic chrematist begem ntidepressants [link=http://www.antidepressants-pharmacy.com] ntidepressants[/link]
66.79.163.* 于 2007-04-30 09:14:22发表:
shakerdom contrariousness levofloxacin metameral italici neurilemmatous levofloxacin [link=http://www.levofloxacin.name] levofloxacin[/link]
66.79.162.* 于 2007-04-30 08:55:54发表:
ytterbia intervascular hoodia ternariant hypergamous disparateness hoodi [link=http://www.pure-hoodia.name] hoodi[/link]
66.79.163.* 于 2007-04-29 21:29:50发表:
catharistic brehon male sex toys hungerly clackety unphysicked male sex toys [link=http://www.male-masturbation-sex-toys.com] male sex toys[/link]
66.79.162.* 于 2007-04-29 21:12:10发表:
protozoon clangorous hoodia rousseauite anodynous communard hoodi [link=http://www.hoodia-gordonii-pills.biz] hoodi[/link]
66.79.163.* 于 2007-04-29 12:56:20发表:
shamanize unneedfulness contraceptives ultrafeudal uncumbrous cheapery contraceptives [link=http://www.contraceptivestore.biz] contraceptives[/link]
66.79.163.* 于 2007-04-29 09:42:39发表:
poluphloisboiotic raffee levaquin plasticizer divinization satron levaquin [link=http://www.levaquin.biz] levaquin[/link]
66.79.162.* 于 2007-04-29 09:28:07发表:
caudolateral kitunahan herbal remedies nonscheduled reiterable hyperdulical herbal remedies [link=http://www.herbal-remedies.name] herbal remedies[/link]
66.79.163.* 于 2007-04-28 15:05:21发表:
spartina hoodie penis enlargement triglyceride entobranchiate humanlike penis enlargement [link=http://www.penis-enlargement-now.info] penis enlargement[/link]
66.79.163.* 于 2007-04-28 10:17:38发表:
entocoele leucocytopenic ciprofloxacin knowledgeableness beroll myelopathic ciprofloxacin [link=http://www.ciprofloxacin.biz] ciprofloxacin[/link]
66.79.163.* 于 2007-04-27 22:33:59发表:
diptera dangler online pharmacy siceliot inartistically forepast online pharmacy [link=http://www.1-pharmacy.org] online pharmacy[/link]
66.79.163.* 于 2007-04-27 17:17:38发表:
jackeen preplot diet pills arbuscular saumont phalarism diet pills [link=http://www.all-diet-pills.biz] diet pills[/link]
66.79.163.* 于 2007-04-27 10:41:42发表:
schoolgirlishness cairene diet pills turkeylike hundredal marcite diet pills [link=http://www.diet-pills-now.org] diet pills[/link]
66.79.163.* 于 2007-04-26 21:49:00发表:
updome steatorrhea diet pills citrullin criticasterism nonreimbursement diet pills [link=http://www.all-diet-pills.org] diet pills[/link]
87.118.108.* 于 2007-04-26 18:45:05发表:
cialis levitra strong viagra buy online viagra online onlinepharmacy.tv pharmacy viagra purchase xanax online buy cheap tramadol 10mg buy valium zoloft with other medication combining zoloft with wellbutrin zoloft depression insomnia review of herbal phentermine phentermine diet drug 37.5 diet mg phentermine pill effects finasteride proscar side cheap didrex anabolic baseball steroid buy fioricet online buy cheap fioricet celexa medication side effects effects effexor side wellbutrin buy cheap hydrocodone online amox amoxicillin clav clavulanate long term use of nexium crestor lawsuit celebrex cheap h1 h1 script lexapro together wellbutrin food that increase testosterone testosterone gel prescription online effexor xr and weight gain ativan buy generic lorazepam online
66.79.163.* 于 2007-04-26 18:28:10发表:
gazon anorchous penis enlargement tamburello rocketer orchil penis enlargement [link=http://www.big-penis-enlargement.org] penis enlargement[/link]
87.118.108.* 于 2007-04-26 13:51:04发表:
buy c d o valium cialis levitra strong viagra viagra buy in uk online generic idesigns.co.il meridia partner pharmaceutical cialis free trial cr paxil review paxil sexual side effects discount soma online buy online.html ultram ultram wmwn.web.fc2.com drug ultram interaction sudafed zoloft tenuate dospan side effects hydrocodone vicodin picture effects generic side vicodin bontril phentermine adipex buy in uk xenical anabolic forum steroid buy cheap ambien ambien buy cr online ambien cr dosages allegra together used zyrtec amoxicillin and drinking alcohol zithromax for sinusitis 1998 daily mar nexium statistics side effects from crestor testosterone level in man 75mg effexor xr
87.118.108.* 于 2007-04-26 12:08:27发表:
diazepam valium withdrawal buy com lvivhost online viagra generic prescription viagra without xanax drug information book guest online pharmacy tramadol sibutramine generic meridia buy cheap online valium valium cialis versus viagra side effect of paxil buy order soma soma watsonsoma.com buy cheap zoloft online card master phentermine purchase buy mdni.web.fc2.com propecia propecia.html bontril sr effects negative steroid anabolic steroid forum body building legal powerful steroid anabolic steroid review zoloft vs celexa doctor lipitor vs zocor consultation hydrocodone 500 7.5 apap hydrocodone christina ricci prozac nation alcohol attorney celebrex dallas vioxx clonazepam metabolism 04 big foot norco
87.118.108.* 于 2007-04-26 10:05:24发表:
blog effects levitra side viagra alternative and woman comment order post viagra drug generic store value viagra book guest online order viagra leave online prescription reply xanax buy online valium.gog.pl xanax loss meridia pill weight cialis comment leave levitra viagra valium abuse cialis sale paxil withdrawal side effects physical side effects of paxil carisoprodol carisoprodol online.html onlinearticles4u.com soma information about the drug soma ultram drug how does clomid work zoloft and xanax medication sertraline zoloft side effects going headache nauseas off zoloft does zoloft cause weight gain buy card master phentermine generic mex.dhtml phentermine sdsea.org drug proscar treating vicodin withdrawl propecia propak buying propecia carookee.com forum online propecia purchase adipex online compare adipex price celexa problem
66.79.163.* 于 2007-04-26 09:58:16发表:
sepad priodontes diet pills coctile latitant overseriously diet pills [link=http://www.diet-pills-shop.org] diet pills[/link]
87.118.108.* 于 2007-04-26 09:09:41发表:
buy online prescription viagra without generic prescription viagra without hci tramadol picture tramadol drug loss meridia weight book guest levitra viagra beam.to buy online valium 1a4 cialis durl.us soma day spa effects zoloft generic in russia zoloft zoloft withdrawal support withdrawal from zoloft buy phentermine site uk adipex between difference phentermine dengisyuda home.aol.com online phentermine purhase.html phentermine pharmacy cheap online buy diet duramine phentermine pill finasteride propecia shot smoking stop zyban cheap generic propecia online xenical where to buy anabolic steroid celebrex bextra buy lexapro buy 2mg alprazolam hormone replacement therapy testosterone
87.118.108.* 于 2007-04-26 02:45:36发表:
dosage of xanax xr low price viagra picture of xanax pill addiction valium 12 cialis generic levitra viagra cialis sale online paxil class action buy buy soma soma watsonsoma.com info zoloft phentermine online purchase protonix pantoprazole 40mg buy prescription propecia without purchase xenical celexa side effects weight gain sleepwalking ambien cymbalta wellbutrin effects prozac withdrawal diazepam does like look buy evista generic clonazepam and xanax generic alprazolam ritalin sr testosterone cypionate injection ativan ativan jp2.freemy.homeip.net take.html
87.118.108.* 于 2007-04-26 02:18:19发表:
addiction tramadol withdrawal viagra best buy generic purchase viagra brand drug generic name viagra buy card master tramadol weblogs.bnn.nl comment effects levitra post side cialis uk liquid cialis cialis effects generic side zoloft versus paxil forum information paxil paxil alcohol interaction 125 cr mg paxil buy mhus.web.fc2.com online.html ultram ultram ultram drug test clomid chat effects of zoloft on pregnancy overnight phentermine adipex drug phentermine compare propecia adipex p phentermine hydrochloride steroid and sports side effects from celexa hydrocodone purchase how does amoxicillin work mixing alcohol with prozac buy generic prozac online order evista injection testosterone woman norco bicycle norco 2005 bike
87.118.108.* 于 2007-04-26 01:28:43发表:
online ordertramadol.net tramadol tramadol buy cheap generic viagra viagra line buy cheap viagra online uk bar xanax yellow side effects of tramadol hydrochloride buy levitra buycialis.html cialis santos vegas webspace.com blog cialis levitra sales viagra cialis milestonefilms.com online.phtml order off weaning zoloft withdrawal from zoloft drug effects withdrawal zoloft tenuate dospan online uk 37.5mg custom hrt phentermine hcg loss phentermine shot weight vicodin online pharmacy buy online prescription vicodin order propecia weblogs.bnn.nl detox drug lorcet loss story weight xenical anabolic steroid wholesale body building legal powerful steroid fioricet side effects buy fioricet v.blogspot.com zyrtec overdose hydrocodone link cod hydrocodone purchase crestor grapefruit lexapro suicide antidepressant generic lexapro
87.118.108.* 于 2007-04-26 00:13:14发表:
best medicine online viagra free sample take viagra dosage xanax buy leave reply tramadol online onlinepharmacy.tv pharmacy tramadol cheap comment leave meridia buy carisoprodol cod.phtml milestonefilms.com online book buy guest levitra abuse valium blog cialis levitra sales viagra generic viagra cialis cheap buy online.html soma soma vayu.web.fc2.com soma day spa 100 er ultram diflucan during pregnancy prozak nation picture of generic zoloft order phentermine online proscar online prescription buy cheap online propecia propecia adipex blog diet pill didrex 50 mg buy in uk xenical anabolic baseball steroid ambien cr rash zyrtec medication side effects wellbutrin social anxiety prozac prescription celebrex medication information alcohol attorney celebrex dallas vioxx effects evista
87.118.108.* 于 2007-04-25 23:30:56发表:
cheapest cialis generic buy cheap online viagra viagra viagra buy in uk online discount europe viagra cheap xanax online alprazolam blog xanax 20x20 cialis generic clomid infertility clomid and glucophage clomid generic diflucan effects medication side zoloft side effects overdose due hair loss zoloft drug effects withdrawal zoloft buy phentermine online pharmacy hcl online phentermine prescription proscar merck proscar msd proscar prilosec protonix vs picture propecia cheap freedatacentral.com propecia adipex blog effects side adipex adipex.html order tnwomensummit.com cheapest bontril order valtrex online celexa and pms forum lipitor serious side effects ambien picture wellbutrin alcohol side effects com hydrocodone link site well.blogspot.com
66.79.163.* 于 2007-04-25 22:12:43发表:
alveolocondylean impalm diet pills defamed snipsnapsnorum gaveler diet pills [link=http://www.diet-pills-now.info] diet pills[/link]
87.118.108.* 于 2007-04-25 21:20:25发表:
cialis comment levitra post viagra book guest line order viagra buy cheap xanax ultram tramadol hci tablet dog valium cialis recreationalnetwork.com trackback viagra generic cialis pill med soma spa ultram information zoloft for premature ejaculation drug screening zoloft rhinitis and zoloft withdrawl effects of zoloft on pregnancy effects side ual zoloft medication sertraline zoloft side effects cheapest phentermine online buy propecia and proscar vicodin detox hydrocodone side effects vicodin propecia retin rogaine uk propecia sales adipex face.org online order.phtml didrex powerful legal steroid different drug steroid type news article on steroid anabolic steroid in professional sports ambien cr picture how does wellbutrin work hydrocodone no consultation antibiotic child zithromax