编译内核2.4.20-8custom

2016-01-29 19:03 4 1 收藏

编译内核2.4.20-8custom,编译内核2.4.20-8custom

【 tulaoshi.com - Linux 】


编译内核
做内核的错误信息:/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

编译完

来源:https://www.tulaoshi.com/n/20160129/1508291.html

延伸阅读
原内核rh9自带的2.4.20 新内核2.4.20 patched to 2.4.21-pre6 (patch -p1 就一个/和一个swap分区 /分区用的是reiserfs fs 以新的内核重启后,发现以下几个明显错误,例如数个/dev/tty1,/dev/tty2找不到文件.最关键的是最后显示的reiserfsck could not open filesystem on /dev/hdb3 fsck.reiserfs for device exited w...
说明:Apache整合PHP有两种方式:一种是DSO模式,把PHP当作Apache的外部模块来调用,这样增加了Apache的灵活性,但会带来5%的性能降低;另一种方式是把PHP编译进Apache的内核,这样牺牲了以后调整的灵活性(每次对PHP的重新编译,都需要再次编译Apache),但性能会高一些。对Perl也是如此。相比之下,本人更愿意使用第二种方式,即把PHP编译进A...
  内核重编译对很多Linux爱好者来说是一个不小的挑战。笔者认为,很多Linux用户对内核通常有一种误解,他们认为普通用户是不能调整内核的。其实,就实际情况而言,这种认识是不全面的。应该说,内核重编译是具有一定深度和复杂性的,同时也是易失败的配置工作。 如果大家留意那些比较权威的Linux参考工具书的话,就会发现很多原版书籍...
Linux的一个重要的特点就是其源代码的公开性,全世界任何一个软件工程师都可以将自己认为优秀的代码加入到其中,由此引发的一个明显的好处就是Linux修补漏洞的快速以及对最新软件技术的利用。而Linux的内核则是这些特点的最直接的代表。 为什么要升级内核 正如它的名字的字面意义,Linux的内核承担着Linux操作系统的最为核心的任...
驱动程序的使用可以按照两种方式编译,一种是静态编译进内核,另一种是编译成模块以供动态加载。由于uClinux不支持模块动态加载,而且嵌入式Linux不能够象桌面Linux那样灵活的使用insmod/rmmod加载卸载设备驱动程序,因而这里只介绍将设备驱动程序静态编译进uClinux内核的方法。 下面以uClinux为例,介绍在一个以模块方式出现的驱动程...

经验教程

510

收藏

57
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部