内核特别版是如何制作的?
我下了公社的制作的rh8的内核特别版,感觉很好,想知道它是如何做出来的?? sorry, it is not made by me, anybody can answer this? 是我做的,其实简单得不得了1.先在redhat那里下载最新内核的src.rpm
2.rpm -ivh kernelxxx.src.rpm,这将会将kernelxxx.spec安装在/usr/src/redhat/SPEC目录下,将内核源码补丁还有config都安装到/usr/src/redhat/SOURCE目录下
3.进入/usr/src/redhat/SOURCE,修改相应体系的config文件(基本的有i386,i586,athlon,i686),加入或修改某些选项,譬如,加入ntfs支持就是确认config文件里有:
CONFIG_NTFS_FS=m
CONFIG_NTFS_RW=y
加入默认cp936编码支持就是:
CONFIG_NLS_DEFAULT="cp936"
4.修改一下/usr/src/redhat/SOURCE下内核源码中,PS手柄驱动里的PSX_delay宏定义,保存(可以跳过这步)
5.进入/usr/src/redhat/SPEC,修改kernel-xxx.spec
将开头改成类似下面:
%define buildup 1
%define buildsmp 0
%define buildBOOT 0
%define buildbigmem 0
%define buildjensen 0
这样就表示只rebuild单CPU版本,其他什么bigmem支持,smp支持版本都通通不做(这些版本一般没有用上),这样会缩短编译时间
6./usr/src/redhat/SPEC下,
rpmbuild -bb kernel-xxx.spec --target=i386(生成i386体系内核)
rpmbuild -bb kernel-xxx.spec --target=i586(生成i586体系内核)
rpmbuild -bb kernel-xxx.spec --target=athlon(生成athlon体系内核)
rpmbuild -ba kernel-xxx.spec --target=i686(生成i686体系内核)
7.生成的内核可以在/usr/src/redhat/RPMS目录下的各个分目录里得到 ic. so it is a rh hacked kernel with some specific support for starters. i will think how to improve it. for example, a special one for laptop users, for game users... any good suggestion? 如果用原装的内核来rebuild rpm,比较麻烦,因为rh的内核是一个个patch打上的,要用原装的话,估计要自己写一个spec了
修改内核配置可以直接修改那些config文件,将特殊的要求设置好就可以
for laptop的话,APM或ACPI部分要注意一下,for game user的话,字符设备那里,agpgart要选上,DRI也要选上,RTC支持选上,cpu配置那里的mtrr也要选上
6./usr/src/redhat/SPEC下,
rpmbuild -bb kernel-xxx.spec --target=i386(生成i386体系内核)
rpmbuild -bb kernel-xxx.spec --target=i586(生成i586体系内核)
rpmbuild -bb kernel-xxx.spec --target=athlon(生成athlon体系内核)
rpmbuild -ba kernel-xxx.spec --target=i686(生成i686体系内核)
config的CPU配置中的CPU类型不用改吗? the target decides which config file it use, so for each config file the right cpu type is alreadyin the config file. the target decides which config file it use, so for each config file the right cpu type is alreadyin the config file.
多谢!我觉得应该自己下载一个亲自试试,您认为呢:-) sure, of course. tell me the result, hehe.
btw, where to download? sure, of course. tell me the result, hehe.
btw, where to download?
呵呵,我以为您知道呢.
去redhat找了一下没找到,呵呵.只好用up2date试试了:mrgreen: i am downlading the kernel 2.4.20-9 and kernel source 2.4.20-9 from one of redhat mirror. u need find these update from its mirrow sites.
i mean the kernel built by llc. 多谢,我试试:-D up2date有一个参数,忘记是什么了,大概是--src,用这个参数升级包时,会自动将升级包的src.rpm也下载下来,放在/var/spool的一个目录下,当然,下载的东西多了,升级时间也比较长
用up2data --help看看 我用 up2date-config 改的,但是下载的时候提示什么PGP错误:? 大家可以到:apt.freshrpms.net 下载rh的升级源包
页:
[1]
2