新手学堂:关于Linux内核源码使用的心得

2007-11-23     推荐:2    收藏:1    评论:14     来源:e800开发者频道

很多人对linux这一个开放内核源码的OS不会陌生,因此开源相关话题在此不再赘述。问题是,拿到了linux kernel source以后(不知道在哪里么,那就看下http://www.kernel.org/吧),应该如何正确的进行配置,编译,安装/升级工作。事先声明,安装/升级内核的操作被执行以前,系统中被修改的只有内核相关的源文件,执行以后新内核就取代旧内核,若出现配置误差或版本误差导致的不兼容问题,没有备份的话是无法执行恢复的。

(一)配置内核 Configure the kernel

在得到内核后,第一步要做的事情就是配置它(不先进行编译么,当然不能,编译的结果即模块的取舍取决于配置哦)。三种基本的配置命令是(请在内核源码linux/目录下执行,完整目录一般为/usr/src/liunx/)

a) 文本对话界面

make config

b) 菜单界面(半图形化界面)

make menuconfig

c) 图形界面(要求带有Xwindow库)

make xconfig

在配置内核时,有许多的选项供选择,CPU相关、内核管理方式、内存使用方式、即插即用支持、网络协议组件等,建议了解选项含义以后再作修改,否则可能编译出与所想不同的内核。可至http://www.tldp.org/查看选项含义相关内容。

(二)编译内核 Compile the kernel

一系列的命令,无错误提示就算通过。

make dep 确认依存关系

make bzImage 生成内核文件

make modules 配置所作选项

make modules_install 生成选项说明map

(三)安装/更新 Install / Update

将生成的arch/i386/boot/bzImage 和 System.map更新至/boot,然后使MBR引导程序(LILO, GRUB, etc)image选项指向新的内bzImage即可。

您可以针对本文进行:[评论]  [收藏]  [推荐]  
  • [14楼] 2008-07-24 22:44:33.0  网友
  • [回复]
  • [url=http://www.cnyouxiang.com/ypsjhf.html]杭州数据恢复[/url] 
    [url=http://www.cnyouxiang.com/indexa.html]杭州电脑维修[/url]
    [url=http://www.cnxskj.com.cn]钢塑管[/url] 
    [url=http://www.cnxskj.com.cn]pvc管[/url] 
    [url=http://www.cnxskj.com.cn]ppr管[/url] 
    [url=http://www.jinyuanchina.cn/about.htm]夹链贴合制袋机[/url]
    [url=http://www.cldhj.com/about.html]对焊机[/url]
  • [13楼] 2008-07-24 22:44:09.0  网友
  • [回复]
  • [url=http://www.sh28.com.cn/about.htm]上海大众搬场公司[/url]
    [url=http://www.sh28.com.cn/about.htm]上海大众搬场[/url]
    [url=http://www.nbuico.cn/aboutus.htm]烘箱[/url] 
    [url=http://www.nbuico.cn/aboutus.htm]固化炉[/url] 
    [url=http://www.nbuico.cn/aboutus.htm]烘道[/url]
    [url=http://www.cnyouxiang.com/ypsjhf.html]硬盘数据恢复[/url] 
  • [12楼] 2008-07-24 22:43:52.0  网友
  • [回复]
  • [url=http://www.sh28.com.cn]上海搬家[/url]
    [url=http://www.sh28.com.cn]上海搬家公司[/url]
    [url=http://www.sh28.com.cn]上海大众搬家公司[/url]
    [url=http://www.sh28.com.cn]上海大众搬家[/url]
    [url=http://www.sh28.com.cn/about.htm]上海搬场[/url]
    [url=http://www.sh28.com.cn/about.htm]上海搬场公司[/url]
  • [11楼] 2008-07-24 22:43:33.0  网友
  • [回复]
  • [url=http://www.0898hnly.com/hnly.html]海南旅游线路[/url]
    [url=http://www.0898hnly.com/hndly.html]海南岛旅游[/url]
    [url=http://www.0898hnly.com/about.html]海南中青旅[/url]
    [url=http://www.0898hnly.com/about.html]海南中国青年旅行社[/url]
    [url=http://www.0898hnly.com/hndly.html]海南参团旅游[/url]
  • [10楼] 2008-07-24 22:42:54.0  网友
  • [回复]
  • [url=http://www.printyoung.com/flexoprintingmachine.html]flexo printing machine[/url]
    [url=http://www.printyoung.com/corrugatedmachine.html]corrugated machine[/url]
    [url=http://www.0898hnly.com/about.html]三亚旅游[/url]
    [url=http://www.0898hnly.com/about.html]海南旅行社[/url]
    [url=http://www.0898hnly.com/hnly.html]海南旅游[/url]
    [url=http://www.0898hnly.com/hnly.html]海南旅游公司[/url]
  • [9楼] 2008-07-24 22:42:34.0  网友
  • [回复]
  • [url=http://www.beautyescort.com.cn]massage in shanghai[/url]
    [url=http://www.0577xm.com]瑞安货运[/url][url=http://www.0577xm.com]瑞安物流[/url] 
    [url=http://www.tglaser.net/index01.html]激光焊接机[/url]
    [url=http://www.fushi8.net.cn]制袋机[/url] [url=http://www.bhbzjx.cn]制袋机[/url]
    [url=http://www.printyoung.com/foldergluer.html]folder gluer[/url]
  • [8楼] 2008-07-24 22:42:01.0  网友
  • [回复]
  • [url=http://www.bhbzjx.cn/eproduct.html]Bag making Machine[/url]
    [url=http://www.guowang.com/en/eabout.html]paper cutting machine[/url]
    [url=http://www.beautyescort.com.cn]massage shanghai[/url]
    [url=http://www.beautyescort.com.cn]shanghai massage[/url]
    [url=http://www.beautyescort.com.cn]shanghai escort[/url]
  • [7楼] 2008-04-20 03:46:44.0  网友
  • [回复]
  • NYFeoM  <a href="http://eskvrpjvmook.com/">eskvrpjvmook</a>, [url=http://rupjyqqoqykw.com/]rupjyqqoqykw[/url], [link=http://fmmzxhypwjgm.com/]fmmzxhypwjgm[/link], http://qcvcoupkesqd.com/
  • [6楼] 2007-12-06 22:02:58.0  网友
  • [回复]
  •  <A href="http://www.njhgqq.cn">南京气球</A><A href="http://www.njhgqq.cn">南京气模</A><A href="http://www.577ft.cn">气垫膜</A><A href="http://www.aminweddingdress.com/index01.htm">wedding dress</A> <A href="http://www.aminweddingdress.com/index01.htm">wedding dress china</A> <A href="http://www.aminweddingdress.com/index02.htm">wedding gown</A> <A href="http://www.aminweddingdress.com/index02.htm">bridal gown</A>We 
  • [5楼] 2007-11-26 15:42:02.0  网友
  • [回复]
  •  <a href="http://www.hu-song.com/web/cn_product.asp.htm">分切机</a> <a href="http://www.hu-song.com">印刷机</a> <a href="http://www.hu-song.cn">柔印机</a> <a href="http://www.cnxingbao.com">全自动丝网印刷机</a> <a href="http://www.ruianpack.com/aboutus.asp">夹链粘合制袋机</a> <a href="http://www.gxysjx.com">印刷机</a> <a href="http://www.cnxinda.cn/lianx.htm">吹膜机</a> 
  • 共有14条评论  点击查看更多评论
  • 网友评论仅供网友表达个人看法,并不表明e800同意其观点或证实其描述
我想发表评论:
用户名密码
  • 匿名发表
    验证码: