当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > 编译内核2.4.20-8custom

Unix/Linux
Linux系统下如何监视系统资源使用率
怎样在Red Hat Linux上使用BIND建立DNS服务器
多点触控技术终于在Linux中实现
中科红旗Linux桌面7.0版引入QtSDK组件
系统启动管理器与GRUB
Linux系统下配置CVS集成cvstrac
解析Linux操作系统下usr的目录结构
Linux系统与Windows系统的线程有何不同
黑客怎样入侵Linux系统
维护inittab配置文件时需要注意的事项
FreeBSD为powerd设置cpu最小工作频率
如何配置Linux才能保证其系统的安全
光驱的软开关与限速简介
新手教程之创建锁文件的方法
双系统计算机怎样卸载其中一个?
运行Linux时的快捷键使用
phpMyAdmin安装方法及介绍
Wine中中文存在很多的乱码怎么解决?
Linux教程:tail命令的巧妙应用
Wget命令来浏览网页的方法

Unix/Linux 中的 编译内核2.4.20-8custom


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 31 ::
收藏到网摘: n/a


编译内核
做内核的错误信息:/usr/src/linux-2.4.20-8/include/linux/dcache.h: In function `dget':/usr/src/linux-2.4.20-8/include/linux/dcache.h:254: warning: implicit declaration of function `__out_of_line_bug_R8b0fd3c5'cpufreq.c: In function `cpufreq_parse_policy':cpufreq.c:111: warning: implicit declaration of function `sscanf_R859204af'cpufreq.c: In function `cpufreq_proc_read':cpufreq.c:225: warning: implicit declaration of function `sprintf_R1d26aa98'cpufreq.c: In function `cpufreq_proc_init':cpufreq.c:327: warning: implicit declaration of function `printk_R1b7d4074'cpufreq.c: In function `cpufreq_restore':cpufreq.c:1109: warning: implicit declaration of function `panic_R01075bf0'cpufreq.c: At top level:cpufreq.c:192: warning: `cpufreq_setup' defined but not usedmake[1]: *** [cpufreq.o] Error 1make[1]: Leaving directory `/usr/src/linux-2.4.20-8/kernel'make: *** [_mod_kernel] Error 2解决办法:先执行:make mrpoper做内核的方法:将下载好的内核解压缩到:/usr/src/目录下 #cd /usr/src/ 进入该目录 #ln linux-2.4.26 linux-2.4 创建该目录的符号链接文件 #cd linux-2.4 进入内核目录 修改Makefile文件,找到包含EXTAVERSION的行将其改为EXTRAVERSION=qun #make mrproper 确保源文件的一致性 #make xconfig 选择需要编译进内核的功能 #make dep 解决依赖性 #make clean#make bzImage 生成内核 #make modules 编译内核模块 #cp usr/src/linux-2.4/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20tcp#make modules_install 安装内核模块记着查看/lib/modules新生成一个目录为:2.4.20-8custom#mkinitrd /boot/initrd-2.4.20-8custom.Img 2.4.20-8custom 生成启动镜像文件 # cp /usr/src/linux-2.4/System.map /boot/System.map-2.4.20-8tcp删除原有的/boot下的System.map文件Ln –s /boot/System.map-2.4.20-8tcp /boot/System.map #vi /etc/grub.conf # 在最后部分添加如下行: title Red hat Linux (2.4.20-8-tcp01) root (hd1,5) kernel /vmlinuz-2.4.20-8tcp ro root=LABEL=/12 initrd /initrd-2.4.20-8custom.img:wq! #reboot 重新启动后就可以看到刚刚安装好的内核了。 #对于2.6的内核而言,步骤就简单了很多只需要这几个命令: make xconfig、make、make installMOUNT出错:# mount -t nfs 10.65.69.224:/home /mntmount: RPC: Program not registered启动 nfs进程解决这个问题:service nfs start

编译完