⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kernel-howto.txt

📁 linux-bible.rar linux-bible.rar
💻 TXT
📖 第 1 页 / 共 4 页
字号:
   下面一些□例指令告诉你如何增加核心提供的上限:echo 4096 > /proc/sys/kernel/file-maxecho 12288 > /proc/sys/kernel/inode-maxecho 300 400 500 > /proc/sys/vm/freepages8. 升级至 2.0.x 的注意事项   核心 2.0.x 版在安装上引入了许多的改变. 在原始程式码里的   Documentation/Changes 档案包含了升级至 2.0.x 版所应知道的资讯. 你可能   还需要升级一些关键的套件,例如 gcc,libc 与 SysVInit,并改变一些系统档   案.不过,也别紧张.   9. 可载入模组   可载入模组能够节省记忆体,而且很容易设定. 模组的□围已经包含了档案系统   ,乙太网路卡驱动程式,磁带机,印表机驱动程式,还有更多.   9.1 安装模组工具   模组工具可以从你取得核心的地方找到,如 modules-x.y.z.tar.gz; 选择与你目   前核心版本相等或稍低的最接近的 x.y.z. 用 `tar zxvf   modules-x.y.z.tar.gz' 解开. cd 到它产生的目录(modules-x.y.z),看一下   README,然後按照安装指示执行 (通常很简单,就像 make install 之类的).   然後你在 /sbin 应该会有这些程式 insmod, rmmod, ksyms, lsmod, genksyms,   modprobe, 以及 depmod. 如果你想的话,可以用 insmod 里的□例驱动程   式``hw''来测试这些工具; 参见 INSTALL 档里的细节说明.      insmod 指令将一个模组插入运行中的核心.模组通会以 .o 为结尾; 上面提到的   □例程式就叫做 drv_hello.o,因此要插入此模组,就用 `insmod   drv_hello.o'. 要了解目前核心正在使用的模组,用 lsmod 指令.输出看起来   像这样:    blah# lsmod    Module:        #pages:  Used by:    drv_hello          1   `drv_hello' 是这模组的名称,它用了一页 (4K) 的记忆体,而且目前没有其它   的核心模组依赖於它. 要移除此模组,用 `rmmod drv_hello'.注意 rmmod 需   要的是模组名称,而不是档案名称; 就是你从 lsmod 指令列出来的.其馀工具的   作用在线上手册中都有说明.   9.2 与核心发行的模组   在 2.0.30 版中,几乎所有的东西都可以变成可载入模组. 要使用可载入模组,   首先确定你没有将其配置到正常的核心里,也就是说,在 `make config' 时不是   回答 y. 编译新核心并用它来开机.然後,再次 cd 到 /usr/src/linux,然後   执行 `make modules'. 这将编译所有你未指定在核心配置里的模组,并将其连   结到 /usr/src/linux/modules. 你可以直接由此目录使用,或是执行 `make   modules_install' 将其安装到 /lib/modules/x.y.z,其中 x.y.z 是核心版本.      这对处理档案系统上特别便利.你可能并不经常使用 minix 或 MS-DOS 的档案系   统. 例如,如果我遇到一 MS-DOS 的软碟片,我会用 insmod   /usr/src/linux/modules/msdos.o,并在使用完成後用 rmmod msdos 指令将其去   掉. 此过程大约可以节省核心 50K 左右的记忆体.对於 minix 档案系统有一点   要注意的就是, 为了要使用``急救磁片'',你应该总是直接将它配置到核心中.   10. 其它配置选项   本节包括了在配置一节中未列出的核心配置选项(在 make config 时). 大部份   的设备驱动程式并未列出.   10.1 General setup (一般设定)   Normal floppy disk support (一般软碟支援) - 就是这个. 你可能会想看一下   drivers/block/README.fd 这个档案; 对 IBM Thinkpad 的使用者来说特别重要      XT harddisk support (XT 硬碟支援) - 如果你想用老古董的八位元 XT 控制器   的话.      PCI bios support (PCI bios 的支援) - 如果你有 PCI,你可能会想打开此选项   . 但要小心,某些旧的 PCI 主机板在此选项下可能会当掉.更多关於 PCI 汇流   排在 Linux 下使用的资讯可以在 [19]PCI-HOWTO 里找到.      Kernel support for ELF binaries (核心支援 ELF 执行档) - ELF 是一种新的   二进位执行档. Linux 似乎正朝此方向前进,所以你可能会要这个.      Set version information on all symbols for modules - 在过去,核心模组与   每个新核心一起被编译. 如果你回答 y,它可能让你使用不同 patchlevel 下编   译的模组. 参见 README.modules 中的详细说明.   10.2 Networking options (网路选项)   网路选项在 [20]NET-3-HOWTO (或是 NET-什麽-HOWTO)中描述.   11. □诀和技巧11.1 重导 make 或是 patch 指令的输出   如果你想要记录这些 `make' 或是 `patch' 指令到底做了些什麽, 你可以把萤   幕的输出重导到一个档案去.首先,要知道你用的是是那一种 shell: `grep   root /etc/passwd' 然後寻找看起来像 `/bin/csh' 一类的东西.      如果你使用的是 sh 或是 bash,    (command) 2>&1 | tee (output file)   将会把一份 (command) 的输出放到 `(output file)' 这个档案去.      如果是 csh 或 tcsh,用    (command) |& tee (output file)   这个语法.      如果是 rc (注意:你应该不会是用 rc),语法是    (command) >[2=1] | tee (output file)11.2 条件式的核心安装   除了使用软碟片,还有数种在不动旧核心的情况下测试新核心的方法. 不像其它   的 Unix 系统,LILO 具有从任何地方启动核心的能力. (不过如果你有大的硬碟   ,超过 500 MB 的,请参考 LILO 的文件说明将可能引起的问题.) 因此,如果   你在 LILO 配置档案中用像这样的    image = /usr/src/linux/arch/i386/boot/zImage        label = new_kernel   你可以在不动旧核心 /vmlinuz 的情况下选择执行新编译的核心(当然,在执行完   lilo 後). 叫 LILO 启动新核心最简单的方法就是在启动时按下 shift 键(当你   在萤幕只看到 LILO 时), 这会给你一提示符号.此时你可以键入   `new_kernel' 来启动新核心.      如果你想在系统中同时保有数种不同的核心原始程式码(小心,这会用掉大量的硬   碟空间), 最普通的方法就是将其命名为 /usr/src/linux-x.y.z,其中 x.y.z   是核心版本. 然後你可以用符号连结来``选择''一份原始码; 例如,用 `ln   -sf linux-1.2.2 /usr/src/linux' 会让 1.2.2 成为目前的核心树. 但在建立   符号连结之前,先确定 ln 指令最後一个参数不是一个真正的目录(旧的符号连结   没有关系); 否则结果可能不会是你所预期的.   11.3 核心更新   Russell Nelson ( [21]nelson@crynwr.com) 总结了新版核心的改变. 这些是简   短的,而且你在升级前可能应该先看一下.可以从匿名 FTP 站 ftp.emlist.com   的 [22]pub/kchanges,   12. 其它可能相关有用的 HOWTOs     * Sound-HOWTO: 音效卡与工具     * SCSI-HOWTO: 所有关於 SCSI 控制卡与设备的资讯     * NET-2-HOWTO: 网路     * PPP-HOWTO: 特别关於 PPP 网路的     * PCMCIA-HOWTO: 笔记型电脑的驱动程式     * ELF-HOWTO: 什麽是 ELF,如何转换等…     * Hardware-HOWTO: 支援硬体的概要     * Module-HOWTO: 更多与核心模组有关的     * Kerneld mini-HOWTO: 关於 kerneld     * BogoMips mini-HOWTO: 你可能会有兴趣的       13. 杂项13.1 作者   Linux Kernel-HOWTO 的作者及维护人是 Brian Ward (   [23]bri@blah.math.tu-graz.ac.at). 请将任何评论,补充与更正寄给我(更正   对我来说是特别重要的).      你可以从这些 URL 找到我的网页:        [24]http://www.math.psu.edu/ward/     [25]http://blah.math.tu-graz.ac.at/~bri/        虽然我尽可能地去处理电子邮件,但请记住我每天都收到大量的信件,所以可能   要花一点时间才会回覆你. 特别是寄信来问我问题的,请尽量非常清楚与详尽地   描述你的讯息. 如果你说的是某个无法运作的硬体(或类似的),我需要知道你的   硬体配置是什麽. 如果你要回报错误,不要只是说``我这样试但它给我会错误讯   息''; 我需要知道这个错误讯息是什麽. 我可能也想知道你的核心,gcc,libc   的版本是什麽,如果你只是告诉我你用的是这个或那个套件,那没什麽用. 我不   介意你问我简单的问题; 请记住,如果你不问,你将永远不会得到解答. 我要感   谢每个给我回馈的人们.      如果你写信给我但在一段合理的时间内没有得到回应(三星期或更久),那麽可能   我不小心砍掉了你的信件或诸如此类的(抱歉). 请再试一次.      我收到许多信件是关於硬体问题的.这没问题,但请了解我并不是熟悉世界上所   有硬体的人而且我也不知道我能帮多少忙. 我个人使用的机器有 IDE 与 SCSI   硬碟,SCSI 光碟机,3Com 与 WD 的乙太网路卡,串列滑鼠, PCI 主机板,NCR   810 SCSI 控制器,AMD 386DX40 w/Cyrix 辅助处理器,AMD 5x86,AMD 486DX4   与 Intel 486DX4 处理器 (这只是我在使用而且熟悉的硬体摘要,并不是建议,   但如果你想要用,欢迎来询问 :-) ).      0.1 版完成於 1994 年十月三日.本文件可以 SGML, PostScript, TeX, roff 与   纯文字格式取得.   13.2 预定目标   ``□诀和技巧'' 一节太少了.我希望能用从别人得到的建议来扩充.      ``附加的套件'' 一节也是.      还需要更多的侦错/当机回复资讯.   13.3 贡献者   包含了一小部份 Linus 的 README 档案 (kernel hacking 选项).感谢 Linus!      uc@brian.lunetix.de (Ulrich Callmeier): patch -s and xargs.      quinlan@yggdrasil.com (Daniel Quinlan): corrections and additions in   many sections.      nat@nat@nataa.fr.eu.org (Nat Makarevitch): mrproper, tar -p, many   other things      boldt@math.ucsb.edu (Axel Boldt): collected descriptions of kernel   configuration options on the net; then provided me with the list      lembark@wrkhors.psyber.com (Steve Lembark): multiple boot suggestion      kbriggs@earwax.pd.uwa.edu.au (Keith Briggs): some corrections and   suggestions      rmcguire@freenet.columbus.oh.us (Ryan McGuire): makeables additions      dumas@excalibur.ibp.fr (Eric Dumas): French translation      simazaki@ab11.yamanashi.ac.jp (Yasutada Shimazaki): Japanese   translation      jjamor@lml.ls.fi.upm.es (Juan Jose Amor Iglesias): Spanish translation      mva@sbbs.se (Martin Wahlen): Swedish translation      jzp1218@stud.u-szeged.hu (Zoltan Vamosi): Hungarian translation      bart@mat.uni.torun.pl (Bartosz Maruszewski): Polish translation      donahue@tiber.nist.gov (Michael J Donahue): typos, winner of the   ``sliced bread competition''      rms@gnu.ai.mit.edu (Richard Stallman): ``free'' documentation   concept/distribution notice      dak@Pool.Informatik.RWTH-Aachen.DE (David Kastrup): NFS thing      esr@snark.thyrsus.com (Eric Raymond): various tidbits      曾寄信给我问问题的人也有很大帮助.   13.4 版权声明,许可,诸如此类的   Copyright (c) Brian Ward, 1994-1997.      Permission is granted to make and distribute copies of this manual   provided the copyright notice and this permission notice are preserved   on all copies.      Permission is granted to copy and distribute modified versions of this   manual under the conditions for verbatim copying, provided that the   derived work is distributed under the terms of a permission notice   identical to this one. Translations fall under the catagory of   ``modified versions.''      Warranty: None.      Recommendations: Commercial redistribution is allowed and encouraged;   however, it is strongly recommended that the redistributor contact the   author before the redistribution, in the interest of keeping things   up-to-date (you could send me a copy of the thing you're making while   you're at it). Translators are also advised to contact the author   before translating. The printed version looks nicer. Recycle.References   1. mailto:bri@blah.math.tu-graz.ac.at   2. http://www.phys.ntu.edu.tw/~cwhuang/pub/   3. http://ultima.ncnu.edu.tw/~asdchen/   4. file://localhost/tmp/bg5sgmltools.2952/Hardware-HOWTO.html   5. ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus   6. ftp://ftp.edu.tw/OS/Linux/kernel   7. http://www.linux.org/   8. file://localhost/tmp/bg5sgmltools.2952/Kernel-HOWTO.txt.html#other-options   9. file://localhost/tmp/bg5sgmltools.2952/HOWTO/SCSI-HOWTO.html  10. file://localhost/tmp/bg5sgmltools.2952/Kernel-HOWTO.txt.html#pitfalls  11. file://localhost/tmp/bg5sgmltools.2952/Sound-HOWTO.html  12. mailto:axel@uni-paderborn.de  13. http://math-www.uni-paderborn.de/~axel/config_help.html  14. ftp://sunsite.unc.edu/pub/Linux/kernel/config/krnl_cnfg_hlp.x.yz.tgz  15. mailto:faith@cs.unc.edu  16. mailto:util-linux@math.uio.no  17. ftp://sunsite.unc.edu/pub/Linux/system/misc  18. http://www.bitwizard.nl/sig11/  19. file://localhost/tmp/bg5sgmltools.2952/HOWTO/PCI-HOWTO.html  20. file://localhost/tmp/bg5sgmltools.2952/HOWTO/NET-3-HOWTO.html  21. mailto:nelson@crynwr.com  22. ftp://ftp.emlist.com/pub/kchanges  23. mailto:bri@blah.math.tu-graz.ac.at  24. http://www.math.psu.edu/ward/  25. http://blah.math.tu-graz.ac.at/~bri/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -