免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 938 | 回复: 0
打印 上一主题 下一主题

编译内核2.4.20-8custom [复制链接]

论坛徽章:
2
荣誉会员
日期:2011-11-23 16:44:17拜羊年徽章
日期:2015-03-03 16:15:43
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-07-07 13:25 |只看该作者 |倒序浏览

编译内核
做内核的错误信息:
/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 declaratio
n 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 used
make[1]: *** [cpufreq.o] Error 1
make[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 install
MOUNT出错:
# mount -t nfs  10.65.69.224:/home /mnt
mount: RPC: Program not registered
启动 nfs进程解决这个问题:service nfs start
编译完


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/76/showart_34492.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP