Ò»¡¢µ±Ç°ÏµÍ³¸Å¿ö£º
µ±Ç°ÏµÍ³ÎªCentOS5.2£¬Äں˰汾Ϊ£º2.6.18,ÓûÉý¼¶Äں˵½V2.6.26.4
¶þ¡¢×¼±¸¹¤×÷£º
Ê×Ïȵ½http://www.eu.kernel.org/pub/linux/kernel/»òhttp://www.kernel.org/pub/linux/kernel/ÏÂÔØ×îеÄÄÚºËÔ´´úÂë¡£ÏÂÔØlinux-2.6.26.4.tar.gzÍê±Ïºó£¬½«Æä½âѹÖÁ/usr/src/Ŀ¼Ï£¬¼´£º/usr/src/linux-2.6.26.4/¡£#cd /usr/src/linux-2.6.26.4 ½øÈëÔ´´úÂëĿ¼¡£
Èý¡¢¿ªÊ¼±àÒë
ÒÀ´ÎÖ´ÐÐÈçÏÂÃüÁ
#make mrproper
ÅäÖÃÄÚºËÑ¡Ïî
#make menuconfig [xconfig]
#make dep
±àÒëÄںˣº
#make bzImage
±àÒë³É¹¦ºó£¬make»áÔÚ×îºóÊä³ö
Kernel£ºarch/x86/boot/bzImage is ready(#1)
Äں˱àÒë³É¹¦ºó£¬ÏÂÃ濪ʼ±àÒë¿É¼ÓÔØÄ£¿é£º
#make modules
°²×°¿É¼ÓÔØÄ£¿é£º
#make modules_install
Ä£¿é°²×°³É¹¦ºó£¬»áÔÚ/lib/modules/Ŀ¼ÏÂÉú³ÉÒ»¸öÓ뵱ǰÄں˰汾ºÅͬÃûµÄĿ¼£¬Æä°²×°µÄ¿É¼ÓÔØÄ£¿é¾ÍÊDZ»°²×°µ½¸ÃĿ¼Ï¡£
°²×°¸Õ²Å±àÒëµÄÄںˣº
#make install
ÔÚ´Ë֮ǰ×îºÃÏȱ¸·ÝÒ»ÏÂ/boot/grub/grub.confÎļþ
ÖØÐÂÆô¶¯ÏµÍ³£¬ÔÚÆô¶¯Ê±Ñ¡Ôñ¸Õ²Å±àÒëµÄÄں˰汾ºÅ¾Í¿ÉÒÔÁË¡£
×¢£ºÈç¹û¶ÔÄں˱àÒëµÄmakeÑ¡Ï̫Çå³þ£¬¿ÉÒÔÊäÈ룺
#make help²é¿´Ïêϸ½âÊÍ¡£ÏÂÃæʱmake helpµÄ²¿·ÖÄÚÈݽØÈ¡
Cleaning targets:
clean - Remove most generated files but keep the config and
enough build support to build external modules
mrproper - Remove all generated files + config + various backup files
distclean - mrproper + remove editor backup and patch files
Configuration targets:
config - Update current config utilising a line-oriented program
menuconfig - Update current config utilising a menu based program
xconfig - Update current config utilising a QT based front-end
gconfig - Update current config utilising a GTK based front-end
oldconfig - Update current config utilising a provided .config as base
silentoldconfig - Same as oldconfig, but quietly
randconfig - New config with random answer to all options
defconfig - New config with default answer to all options
allmodconfig - New config selecting modules when possible
allyesconfig - New config where all options are accepted with yes
allnoconfig - New config where all options are answered with no
Other generic targets:
all - Build all targets marked with []
* vmlinux - Build the bare kernel
* modules - Build all modules
modules_install - Install all modules to INSTALL_MOD_PATH (default: /)
dir/ - Build all files in dir and below
dir/file.[ois] - Build specified target only
dir/file.ko - Build module including final link
rpm - Build a kernel as an RPM package
tags/TAGS - Generate tags file for editors
cscope - Generate cscope index
kernelrelease - Output the release version string
kernelversion - Output the version stored in Makefile
headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH
(default: /src/linux-2.6.21/usr)
Static analysers
checkstack - Generate a list of stack hogs
namespacecheck - Name space analysis on compiled kernel
headers_check - Sanity check on exported headers
Kernel packaging:
rpm-pkg - Build the kernel as an RPM package
binrpm-pkg - Build an rpm package containing the compiled kernel
and modules
deb-pkg - Build the kernel as an deb package
tar-pkg - Build the kernel as an uncompressed tarball
targz-pkg - Build the kernel as a gzip compressed tarball
tarbz2-pkg - Build the kernel as a bzip2 compressed tarball
Documentation targets:
Linux kernel internal documentation in different formats:
htmldocs - HTML
installmandocs - install man pages generated by mandocs
mandocs - man pages
pdfdocs - PDF
psdocs - Postscript
xmldocs - XML DocBook
Architecture specific targets (i386):
* bzImage - Compressed kernel image (arch/i386/boot/bzImage)
install - Install kernel using
(your) ~/bin/installkernel or
(distribution) /sbin/installkernel or
install to $(INSTALL_PATH) and run lilo
bzdisk - Create a boot floppy in /dev/fd0
fdimage - Create a boot floppy image
isoimage - Create a boot CD-ROM image
make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build
make V=2 [targets] 2 => give reason for rebuild of target
make O=dir [targets] Locate all output files in "dir", including .config
make C=1 [targets] Check all c source with $CHECK (sparse by default)
make C=2 [targets] Force check of all c source with $CHECK
Execute "make" or "make all" to build all targets marked with []
For further info see the ./README file
v7998 ÓÚ 2008-09-29 20:45:22·¢±í:
:0wl;l1