RedHatÆóÒµ°æ×Ô´ÓAS4¿ªÊ¼£¬×ÀÃæ°æ±¾×Ô´ÓFC3¿ªÊ¼£¬²»ÔÙµ¥¶ÀÌṩkernel-sourcecodeµÄrpm°²×°°ü,ÔÒòÊÇRedHatÈÏΪûÓбØҪά»¤µ¥¶ÀµÄkernel-sourcecode°ü£¬ÒòΪËùÓеÄÔ´´úÂë°ü¶¼Ó¦¸Ã°ü.ÔÚ.src.rpmÖжø²»ÊÇrpmÖС£ËùÒÔÔÚÕâЩ¸ß°æ±¾µÄRedHat LinuxÉÏ£¬ÎÒÃÇÈç¹ûÐèÒª¶¨ÖÆÄں˵Ļ°£¬Ã»ÓÐÖ±½ÓµÄÔ´´úÂërpm¿ÉÒÔ°²×°£¬Ö»ÄÜͨ¹ýkernel.orgÏÂÔصÄtar.gzµÄ°üÊÖ¹¤°²×°£¬»òÕßͨ¹ýkernel-*.src.rpm±àÒë³ökernel-source°üÔÙÀ´°²×°¡£ºóÃæÒ»ÖÖ·½·¨¿ÉÒÔÏíÊܵ½RedHatÕë¶ÔÄں˵ÄijЩ²ÎÊýºÍ´úÂëµÄÓÅ»¯£¬Òò´Ë¶ÔʹÓÃRedHat·¢ÐаæÌرðÊÇÆóÒµ°æ±¾µÄ£¬ÊÇÓÐÒ»¶¨ºÃ´¦µÄ¡£
µ«ÊÇÄ¿Ç°ºÜ¶àÈËÖÁ½ñ·Ö²»ÇåÄںˣ¬Äں˿ª·¢£¬ÄÚºËÔ´´úÂëһЩ°üÖ®¼äµÄ¹Øϵ£¬Òò´ËÔÚ±àÒëÄں˵Äʱºò¾³£×ßÍä·£¬Í¬Ê±RedHat¹Ù·½¶ÔÓÚÈç¹ûµÃµ½kernel-sourceҲûÓÐÃ÷È·µÄָʾ£¬µ¼ÖºܶàÈ˲»µÃÒªÁì¡£
Ê×ÏÈÈÏÇå³þ¸÷rpm°üµÄÄÚÈݺÍÓÃ;¡£
kernel-*.rpm ------------- Äں˶þ½øÖÆ°ü£¬Ã»ÓеĻ°ÏµÍ³¶¼Æð²»À´¡£kernel-sourcecode-*.rpm------------------- ÄÚºËÔ´´úÂë°ü£¬°²×°µ½/usr/src/linux-*ÏÂÃæµÄ£¬°üº¬ÄÚºËÔ´´úÂ룬±àÒëÄں˱ØÐ루µ±È»ÊDz»¿¼ÂÇÓÃkernel.tar.gz±àÒëµÄÇé¿ö£©£¬µ«¸ß°æ±¾RedHat Linux²»ÔÙÌṩ´Ërpm£¬ÔÒò²Î¼û¹Ù·½Release Note£¬ÕâƪÎÄÕµÄ×îÖÕÄ¿µÄ¾ÍÊÇÒªÎÒÃÇ×Ô¼º°ÑÕâ¸ö°ü¸ã³öÀ´¡£
kernel-devel-*.rpm----------------Äں˿ª·¢°ü£¬°²×°µ½/usr/src/kernels£¬ÓÃÓÚÄÚºËÄ£¿é¿ª·¢£¬×éÖ¯ÐÎʽ¸úÄÚºËÔ´´úÂë°üÀàËÆ£¬°üº¬Á˲¿·ÖÄÚºËÔ´´úÂë¡£×¢ÒâºÜ¶àÈËÎóÈÏΪÕâ¸ö¾ÍÊÇÄÚºËÔ´´úÂë°ü£¬Ö±½ÓÄÃËüÀ´±àÒëÄںˣ¬µ±È»²»¿ÉÄܳɹ¦¡£Õâ¸ö°üÖ»ÊÇÓÃÓÚÄÚºËÄ£¿éÒ»¼¶¿ª·¢£¬ÀýÈçÇý¶¯³ÌÐòµÈ£¬ËäȻҲ¿ÉÒÔmake menuconfig make depµÈ£¬µ«make bzImageÊDz»¿ÉÄܳɹ¦µÄ£¬ÒòΪȱʧÁ˺ËÐÄÔ´´úÂë¡£
kernel-*.src.rpm---------------RedHatÌṩµÄÓÃÓÚ½¨Á¢rpmµÄÔ´´úÂë°ü£¬°²×°µ½/usr/src/redhatÖУ¬Ê¹ÓÃrpmbuild¿ÉÒÔ´ÓÕâ¸ö°üÖÐbuild³öÉÏÃæËù˵µÄËùÓаü¡£
ÏÖÔÚ¾ÍÀ´´Ósrc.rpm±àÒë³öÉÏÃæµÄËùÓеİü£¬³ýÁËsourcecodeÕâ¸ö°üÆäËûµÄ°ü¶¼¿ÉÒÔÔÚ²»ÓÃÐÞ¸ÄÈκεط½µÄÇé¿öÏÂÖ±½Órpmbuild³öÀ´£¬Î¨ÓÐsourcecodeÕâ¸ö±È½ÏÂé·³£¬Ò»¶¨Òª°´ÕÕÏÂÃæµÄ²½ÖèÀ´×ö£¬ÎÒÒÔRedHat AS4 Ëù´øµÄ°æ±¾ÎªÀý£¬ÆäËû°æ±¾Ïàͬ¡£
#Ê×ÏÈ°²×°src.rpm
rpm -ivh kernel-2.6.9-5.EL.src.rpm
#½øÈëÏàӦĿ¼£¬ÒªÐÞ¸ÄspecÎļþ
cd /usr/src/redhat/SPECS
vi kernel-2.6.spec
#Ö÷ÒªÐÞ¸ÄÈçϵط½£º
1£¬define buildsource 0------------ÎÒµÄÕâ¸öÔÚµÚ8ÐУ¬¸ÄΪ1£¬Õâ¾ÍÊÇΪʲôûÓÐÔ´´úÂë°üµÄÔÒò£¬ÒòΪĬÈϲ»Éú³ÉÔ´´úÂë°ü¡£
2£¬ Requires: qt-devel, gtk2-devel readline-devel ncurses-devel-------ÎÒµÄÔÚ572ÐУ¬Èç¹ûûÓÃÓÃXµÄ»°£¬°ÑÕâ¾ä×¢Ê͵ô£¬ÕâÑù±àÒë³öÀ´µÄ°ü¾Í²»ÒÀÀµÓÚX-windowµÄijЩ°ü£¬ÒòΪÄÚºËÅäÖÃÊÇ¿ÉÒÔmake xconfigµÄ£¬ËùÒÔĬÈÏÒÀÀµX-window£¬ÎÒûװX-window£¬Òò´ËÕâ¸ö¾ÍÈ¥µôÁË¡£
3.
#Èç¹ûÖ»ÐèÒªsourcecode¶ø²¢·ÇËùÓÐrpm°ü£¬ÄÇÔÚÐÞ¸ÄspecÎļþʱ»¹ÒªÐÞ¸ÄÈçÏÂÐУº
48 %ifarch noarch
49 %define builddoc 1
50 %define buildsource 0----------------ÕâÀï0ÐÞ¸ÄΪ1
#±£´æÍ˳ö
touch /etc/beehive-root
#Õâ¾äÃüÁî·Ç±ØÐ룬Èç¹û²»×öµÄ»°£¬×îºó±àÒë³öÀ´µÄ°ü¶¼»á±ä³Ékernel-*.*-root.rpm£¬¶àÁ˸öroot£¬¾Ý˵ÊÇΪÁ˱êʾ°üµÄ±àÒëÈ˵ģ¬Èç¹ûtouchÁËÕâ¸öÎļþ£¬¾ÍûÓÐÕâ¸öÎÊÌâÁË£¬ÃüÃûºÍ¹Ù·½rpmÒ»Ñù¡£
ÔÚ±àÒëµÄʱºòʹÓÃrpmbuild -ba --target=noarch ./kernel-2.6.spec£¬ÕâÑù½ö½ö±àÒësoucecodeºÍdoc°ü£¬»á½ÚÊ¡ºÜ¶àʱ¼ä¡£
rpmbuild -ba --target=i686 ./kernel-2.6.spec
#±àÒëi686ƽ̨µÄËùÓаü£¬ÕâÑùÉÏÃæ½éÉܵÄËùÓаü¶¼»áÉú³É£¬»òÕß»»³Érpmbuild -bb --target=i686 ./kernel-2.6.specÖ»±àÒë·Çsrc.rpm¡£
#ËùÓаü¾Í»áÉú³Éµ½/usr/src/redhat/RPMS/i686ÏÂÃæ
°²×°/usr/src/redhat/RPMS/i686/kernel-source-*rpm°ü£¬½øÈë/usr/src/linux-*/ È»ºómake menuconfig;ÐÞ¸ÄÅäÖÃÄںˣ»È»ºómake && make modules && make modules_install && make install;ÐÞ¸Ä/boot/grub/grub.conf´ÓÄÚºËÆô¶¯