Linux Kernel kbuild ϵͳ
ÔÎÄÁ´½Ó£º
http://blog.chinaunix.net/u3/94283
´ÓÒÔÉÏÀý×ÓÖпÉÒÔ¿´µ½£¬Äں˵ıàÒëϵͳkbuildÊǸöºÜÅÓ´óµÄϵͳ¡£µ«ÊÇ£¬ËüËùʹÓõÄmakeºÍÎÒÃÇÆ½Ê±ÓõÄmakeÊÇһģһÑùµÄ¡£kbuildÖ»ÊÇͨ
¹ýÔ¤¶¨ÒåһЩ±äÁ¿£¨obj-m,obj-yµÈµÈ£©ºÍÄ¿±ê(bzImage
,menuconfigµÈµÈ)£¬Ê¹Äں˵ıàÒëºÍÀ©Õ¹±äµÃÊ®·Ö·½±ã¡£ÎÒÃDz»·ÁyyÒ»ÏÂkbuildµÄһЩ¹¦ÄÜ£º
1.¿¼Âǵ½Linux
Äܹ»·½±ãµØÒÆÖ²µ½¸÷¸öÓ²¼þƽ̨£¬kbuildÒ²±ØÐëºÜÈÝÒ×Ìí¼Ó¶Ôij¸öÐÂµÄÆ½Ì¨µÄÖ§³Ö£¬Í¬Ê±ÉϲãµÄMakefile²»ÐèÒª×ö´óµÄ¸Ä¶¯¡£
2.LinuxÏÂÓÐÖÚ¶àÇý¶¯É豸¡£ËüÃǵÄMakefileÏ£ÍûÄܹ»¾¡¿ÉÄܼò½à¡£¼ò½àµ½Ö»ÒªÖ¸¶¨Òª±àÒëµÄ.oÎļþ¾ÍÐС££¨Õâ·½Ãækbuild¶¨ÒåÁ˺ܶàÓÐÓÃ
µÄ±äÁ¿Èçobj-m obj-y,-objsµÈµÈ£¬Óû§Ö»ÒªÎªÕâЩ±äÁ¿¸³Öµ£¬kbuild»á×Ô¶¯°Ñ´úÂë±àÒëµ½Äں˻òÕß±àÒë³ÉÄ£¿é£©
3.ÒªÓз½±ãµÄ¿É¶¨ÖÆÐÔ¡£ºÜ¶à²ÎÊý¿ÉÒÔÈÃÓû§Ö¸¶¨¡£Õâ·½ÃækbuildÒ²ÌṩÁË´óÁ¿µÄ±äÁ¿ÈçEXTRA_CFLAGS£¬Óû§Èç¹ûÏëinclude×Ô¼ºµÄÍ·Îļþ»òÕß¼ÓÆäËü±àÒë²ÎÊý£¬Ö»ÒªÉèÖÃÒ»ÏÂEXTRA_CFLAGS¾Í¿ÉÒÔ¡£
4.ÓÐÄÜÁ¦µÝ¹éµØµ÷ÓÃMakefile¡£ÒòΪÄÚºËÊÇÒ»¸öÅÓ´óµÄÈí¼þ¡£ËüµÄÔ´´úÂëµÄĿ¼²ã´ÎºÜÉî¡£ÒªÌṩһÖÖ¼ò½àµÄ»úÖÆ£¬Ê¹ÉϲãµÄMakefileÄÜ·½±ãµØµ÷ÓÃϲãµÄMakefile¡£ÔÚÕâ¹ý³ÌÖУ¬ÃæÏò¶ÔÏóµÄ˼ÏëÒ²ÐíÖµµÃ½è¼ø¡£
5.ÔÚÅäÖÃÄÚºËʱ£¬ÒªÌṩÓѺõÄÓû§½çÃæ¡£Õâ·½ÃækbuildÒ²ÌṩÁ˲»ÉÙ¹¤¾ß£¬Èç³£ÓõÄmake menuconfigµÈµÈ¡£
ÎÒÃÇÍêÈ«¿ÉÒÔ°ÑkbuildÏëÏó³ÉÒ»¸öÀà¿â£¬ËüΪÆÕͨµÄÄں˿ª·¢ÈËÔ±ÌṩÁ˽ӿڣ¨obj-m obj-y EXTRA_CFLAGSµÈµÈ£©£¬ÎªÓû§ÌṩÁ˶¨Öƹ¤¾ß£¨make menuconfig£©
Èç¹ûÏëÁ˽âkbuildµÄʹÓ÷½·¨£¬¿ÉÒÔ²ÎÔÄÔ´´úÂë×Ô´øµÄÎĵµ£º
Documentation/kbuild/makefiles.txt
Documentation/kbuild/modules.txt
Ò»°ãÇé¿öÏÂÊDz»ÐèÒªÖªµÀ¾ßÌåµÄ±àÒë˳ÐòµÄ¡£³ýÁËÔÚ¸ö±ðÇé¿öÏ£¬Èçdo_initcalls()Öоͺͺ¯ÊýÔÚ.initcall.init
sectionÖеÄ˳ÐòÓйء£²»¹ýϲ»¶Ñ°¸ù¾¿µ×µÄÎÒ£¬»¹ÊÇÏëÀíһϱàÒëÄÚºËʱ¼¸¸ö³£ÓõÄÃüÁÈçmake bzImage,make
menuconfigµÈµÈ£¬½ø¶øÁ˽âkbuildµÄ¼Ü¹¹¡£ÏÈ¿´make bzImage°É¡£
ËüµÄ´ó¸ÅÂöÂçÊÇÔõÑùµÄÄØ£¿¿ÉÒÔÓÃÒÔÏÂÃüÁî²é¿´¡£
make -n bzImage
Èç¹ûÏÓÄÚÈÝÌ«¶à£¬¿ÉÒÔ¹ýÂ˵ô¶àÓàµÄÐÅÏ¢£º
make -n bzImage | grep “make -f”
¿ÉÒԲµ½£º
ÏÈ×÷һЩ׼±¸¹¤×÷
make -f scripts/Makefile.build obj=scripts/basic
È»ºóÒÀ´ÎµÝ¹éµØµ÷ÓÃÔ´´úÂëÖеÄMakefile
make -f scripts/Makefile.build obj=init
make -f scr
Ïà¹ØÎĵµ£º
×î½üʵÑéÊÒÄÚ²¿µÄmysqlµÄrootÃÜÂë±»ÐÞ¸ÄÁË£¬ÐèÒªÏë°ì·¨ÐÞ¸ÄÐÂÃÜÂë¡£·½·¨ÈçÏ£º
1£¬ ¹Ø±Õmysql·þÎñ
/etc/init.d/mysqld stop
2£¬Ê¹ÓÖskip-grant-tablesÑ¡ÏîÆô¶¯MySQL·þÎñ,¿ÉÒÔÐÞ¸Ä/etc/inin.d/mysqld½Å±¾Æô¶¯Î»ÖÃÔö¼Ó´ËÑ¡Ï
vi /etc/init.d/mysqld
ÔÚÏÂÃæÔËÐÐÆô¶¯µÄÓï¾äÀïÔö¼Ó--skip-grant-tables
......
Ò» ¡¢LinuxÎļþ½á¹¹
¡¡¡¡Îļþ½á¹¹ÊÇÎļþ´æ·ÅÔÚ´ÅÅ̵ȴæÖüÉ豸ÉϵÄ×éÖ¯·½·¨¡£Ö÷ÒªÌåÏÖÔÚ¶ÔÎļþºÍĿ¼µÄ×éÖ¯ÉÏ¡£
¡¡¡¡Ä¿Â¼ÌṩÁ˹ÜÀíÎļþµÄÒ»¸ö·½±ã¶øÓÐЧµÄ;¾¶¡£
¡¡¡¡LinuxʹÓñê×¼µÄĿ¼½á¹¹£¬ÔÚ°²×°µÄʱºò£¬°²×°³ÌÐò¾ÍÒѾΪÓû§´´½¨ÁËÎļþϵͳºÍÍêÕû¶ø¹Ì¶¨µÄĿ¼×é³ÉÐÎʽ£¬²¢Ö¸¶¨ÁËÿ¸öĿ¼µÄ×÷ÓÃºÍÆäÖеÄÎļþÀàÐÍ ......
1¡¢Éý¼¶ÏµÍ³
yum check-update
yum update
2¡¢°²×°Ò»Ð©³£ÓõŤ¾ß
yum install ntp iptraf sysstat screen subversion wget bzip2 nfs-utils vim-common
3¡¢ÉèÖÃÿÌì×Ô¶¯ºË׼ʱ¼ä
# crontab -e
0 * * * * /usr/sbin/ntpdate 210.72.145.44
:wq
4¡¢°²×°Ò»Ð©¿ª·¢°ü
# yum install make gcc gcc-c++ libjpeg-devel ......
ÏëҪͨ¹ýÆÕͨµÄ¾²Ì¬²ßÂÔ·ÓÉÀ´ÊµÏÖµçÐÅÍøÍ¨Ë«Ïß»ù±¾ÉÏÊDz»¿ÉÄܵģ¬ÒòΪÄǽ«ÐèҪά»¤Ï൱´óµÄÒ»¸öIP¶ÎµÄÊý¾Ý¿â£¬¶øÇÒ»¹ÐèÒªËæÊ±¸üвÅÄܱ£Ö¤Ð§¹û¡£
ºóÀ´Ìýǰ±²ÃÇ˵£¬¿ÉÒÔ²ÉÓûùÓÚÔ´µØÖ·Â·Óɵķ½Ê½À´´¦Àí£¬ÈýøÀ´µÄÊý¾Ý£¬´ÓÄĸöIP½øÀ´¾Í´ÓÄĸöIP·µ»Ø¡£
ÏÂÃæ¾ÍÊÇÒ»¸öÔÚÉú²úÖеõ½ÁËʵ¼ÊÓ¦ÓõĽű¾£º
====================== ......
Get Redhat Enterprise 3.0 from:
Your local RedHat rep�
Get Veritas’ VCS and VM products from:
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2.redhatlinux.tar.gz
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2MP1.redhatlinux.tar.gz
You will need a temporary key to complete this ......