ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÊÖ°ÑÊÖ½ÌÄãÈçºÎ½¨Á¢×Ô¼ºµÄLinuxϵͳ µÚ¶þ°æ

·¢²¼Ê±¼ä:2009-09-15 15:45:26À´Ô´:ºìÁª×÷Õß:xh_8998
¸üÐÂÈÕÖ¾£¨¾ßÌå¸üÐÂÄÚÈݼûÎÄÄ©£©
¡¡¡¡2008Äê7ÔÂ7ÈÕ£ºÔö¼ÓÄÚºËÖ§³ÖÏÔʾUTF-8±àÂëÎÄ×Ö
¡¡¡¡2008Äê7ÔÂ6ÈÕ£ºÐ޸ıÊÎóÁ½´¦
¡¡¡¡2008Äê3ÔÂ16ÈÕ£ºÐ޸ıÊÎóÒ»´¦
¡¡¡¡2008Äê3ÔÂ8ÈÕ£ºÐÞ¸ÄÃüÁîÒ»´¦
¡¡¡¡2008Äê3ÔÂ3ÈÕ£ºÐÞ¸ÄÃüÁîÒ»´¦
¡¡¡¡2008Äê2ÔÂ12ÈÕ£ºÐÞ¸Ä/etc/profileµÄÄÚÈÝ
¡¡¡¡2008Äê2ÔÂ12ÈÕ£ºÐ޸ıÊÎóÒ»´¦
¡¡¡¡2008Äê2ÔÂ10ÈÕ£º±¾ÎÄ·¢²¼¡£

Ç°ÑÔ£º
¡¡¡¡ÕâÊDZ¾Îĵĵڶþ°æ±¾£¬¾ÝµÚÒ»°æ±¾·¢²¼ÒѾ­½«½üÁ½ÄêµÄʱ¼ä£¬µÚÒ»°æÕë¶ÔLFS-6.1.1µÄÊÖ²á½øÐн²½â£¬LFS-6.3Ïà¶ÔÓÚLFS-6.1.1·½·¨ÉÏÓÐÁËһЩ±ä»¯£¬Èí¼þ°üÒ²´óÁ¿¸üУ¬ÎªÁË·½±ãÐÂÊÖÄܹ»¿ìËÙ½øÈë״̬£¬¾ö¶¨ÔÙ´Î׫д´ËÎĵĵڶþ°æ£¬²¢Õë¶ÔLFS-6.3À´±àд¡£
¡¡¡¡±¾ÎÄÔÚÄÚÈݺÍÐÎʽÉÏÍêÈ«¼Ì³ÐµÚÒ»°æ±¾µÄ·ç¸ñ£¬ÄÚÈÝÉϸù¾Ý°æ±¾½øÐб仯£¬µ«ÕûÌåûÓб¾Öʵı仯£¬ÔÚÕâÀïÊ×ÏȸÐлÄÄЩÔÚµÚÒ»°æÖÐÌá³öÒâ¼ûºÍÎÊÌâµÄÍøÓÑ£¬Ê¹µÃ±¾ÎıäµÄÔ½À´Ô½ÍêÉÆ¡£
¡¡¡¡LFSÊÇÒ»²¿·Ç³£ºÃµÄÖÆ×÷Ò»¸öÍêÕûµÄ²Ù×÷ϵͳµÄÊֲᣬµ«LFSÊÇÊôÓÚÖ¸µ¼ÐÔµÄÊֲᣬÒò´ËËüĬÈϵÄÇ°ÌáÌõ¼þÊǾ߱¸Ò»¶¨µÄLinuxʹÓþ­ÑéµÄÓû§Èº£¬ËùÒÔËüÔÚÿ¸öÈí¼þ°üµÄ°²×°²¿·ÖÖ»¸ø³öÁËÔÚĿ¼ÖеÄÈ«²¿²Ù×÷Ö¸Á¶ø¶ÔÓÚ½âѹËõÖ®ÀàµÄÔò½»¸øÓû§×Ô¼ºÈ¥½â¾ö£¬µ«¶ÔÓںܶàµÚÒ»´ÎʹÓÃLFSµÄÓû§ÍùÍù»á³öÏÖһЩ²»Çå³þijÌõÃüÁîÓ¦¸ÃÊÇÔÚÄÄÀïÖ´ÐеÄÎÊÌ⣬±¾ÎÄÁ¦Í¼´ÓʵÀýÉÏÀ´½âÊÍÕâЩÎÊÌâ¡£
¡¡¡¡±¾ÎÄËäÈ»ÊDzÉÓÃVMWare Workstation 5.5µÄ»·¾³ÏÂÖÆ×÷µÄ£¬µ«ÈÔÈ»·ûºÏʹÓÃÕæʵ»úÆ÷ÉϵĹý³Ì£¬Ö»ÊÇ»áÔÚijЩµØ·½Òª¸ù¾Ý¾ßÌå»úÆ÷½øÐиü¸Ä£¬ÎÄÖлáÔÚÕâЩµØ·½×ö³ö˵Ã÷¡£
¡¡¡¡Ê¹ÓÃWMWareÀ´Ð´ÕâƪÎÄÕÂÊÇΪÁË˵Ã÷·½±ã£¬ÒòΪVMWareÔÚ¸÷ÖÖ²»Í¬»úÆ÷»·¾³ÏÂÄ£ÄâµÄÐéÄâÉ豸¼¸ºõÏàͬ£¬ËùÒÔÓÃËüÀ´ËµÃ÷һЩÐèҪʵ¼ÊÀý×Ó²Å˵µÄÇå³þµÄµØ·½·Ç³£ºÏÊÊ£¬¶øÇÒÓÃVMWareÀ´×ö¼´Ê¹³ö´íÒ²²»»á¶ÔÕæʵµÄϵͳÔì³ÉÆÆ»µ£¬ºÜÊʺÏÐÂÊÖʹÓã¬Î¨Ò»µÄȱµã¾ÍÊÇËÙ¶ÈÂýÁËЩ£¬Ò»°ãÖ»ÓÐÕæʵ»úÆ÷µÄÒ»°ë×óÓÒµÄËٶȡ£
¡¡¡¡±¾ÎÄÁ¦ÕùÍê³ÉÒ»¸öÍêÕûµÄÖÆ×÷ÃüÁ¿ÉÒÔ¸ù¾Ý±¾ÎÄÌṩµÄÃüÁî˳ÐòÊäÈë¾Í¿ÉÒÔÍê³ÉLFSÁË£¬Í¨³£ÃüÁî±íʾΪ
¡¡¡¡ ´úÂë:
[align=left]ÃüÁî[/align]

¡¡¡¡ÓÉÓÚÖÆ×÷¹ý³Ì±È½ÏÂþ³¤£¬ÌرðÊÇÔÚһЩ±È½ÏÂýµÄ»úÆ÷ÉÏ£¬¹ØÓÚÔÚÖÆ×÷¹ý³ÌÖÐÖØÐÂÆô¶¯ºó»Ö¸´µ½¹¤×÷״̬µÄ·½·¨ÔÚÎÄÖÐÓÐÏêϸµÄ½éÉÜ£¬µ«ÓÉÓÚƪ·ù±È½Ï³¤¿ÉÄÜ¿´ÆðÀ´±È½ÏÂé·³£¬¿ÉÒÔ¿´ÎÒרÃŽ«Õⲿ·ÖÌáÈ¡³öÀ´ºóÍê³ÉµÄһƪ¡¶ÖÆ×÷LFS¹ý³ÌÖи÷¸ö½×¶Î»Ö¸´¹¤×÷״̬µÄ·½·¨ µÚ¶þ°æ(ÊʺÏLFS6.3)¡·£¬ÄÚÈݱȽϼ¯ÖÐÈÝÒײ鿴¡£
¡¡¡¡»Ö¸´¹¤×÷µÄ·½·¨¸ü¼ÓÊʺÏÔÚÕæʵ»úÆ÷ÉÏÖÆ×÷LFSµÄÅóÓÑ£¬Èç¹ûʹÓÃVMWareÒ²¿ÉÒÔÖ±½ÓʹÓÃVMWareµÄÔÝÍ£¹¦ÄÜÀ´±£´æÏÖ³¡£¬¼ÌÐøµÄʱºò»Ö¸´ÏÖ³¡¾Í¿ÉÒÔÁË¡£
¡¡¡¡¡¡¡¡
×¼±¸¹¤×÷£º
¡¡¡¡ÏÂÔØLiveCDµÄISOÎļþ(ÒòΪÔÚÖÆ×÷±¾ÎÄʱ×îÐÂÕýʽ°æÖ»ÓÐ6.3-r2145ÏÂÔØ)£ºhttp://ftp.osuosl.org/pub/lfs-livecd/lfslivecd-x86-6.3-r2145.iso
¡¡¡¡¿Ì¼ISOÎļþµ½¹âÅÌÉÏ£¬Èç¹ûÄãÊÇÓÃÕæʵ»úÆ÷µ±È»ÉÙ²»ÁËÕâ²½£¬²»¹ýÈç¹ûÄãÓÃVMWareµÄ»°£¬¾Í¿ÉÒÔÖ±½ÓʹÓÃISOÎļþÁË¡£
¡¡¡¡ÒÔVMWare Workstation 5.5ΪÀý£¨Õæʵ»úÆ÷¿ÉÌø¹ý´Ë²¿·Ö£©
¡¡¡¡Ñ¡ÔñFile->New->Virtual Machine...Æô¶¯Ïòµ¼
¡¡¡¡Ñ¡ÔñCustom£¬²¢Ñ¡ÔñNew-Workstation 5È»ºóÔÚÑ¡ÔñGuest operating systemÀïÑ¡ÔñLinux£¬ÔÚVersionÀïÑ¡ÔñOther Linux 2.6.x kernel
¡¡¡¡´æ·ÅĿ¼¡¢´¦ÀíÆ÷ÊýÁ¿ºÍÄÚ´æ´óС¸ù¾Ýʵ¼ÊÇé¿ö£¬½¨ÒéÄÚ´æ²»µÃСÓÚ128M£¬×îºÃ256MÒÔÉÏ
Ïà¹Ø֪ʶµã£º
¡¡¡¡LFS-6.3²ÉÓÃÁËGCC4.1.2£¬Èç¹ûʹÓÃ128M±àÒëGCC4.x.x»°¾ÍÐèҪʹÓÃswapÁË£¬µ«Èç¹ûÅäÖÃÁË256M¾Í¿ÉÒÔÔÚûÓÐswapµÄÇé¿öÏÂÍê³É±àÒ룬ËùÒÔÌõ¼þÔÊÐíµÄÇé¿öÏÂʹÓÃ256M¡£
¡¡¡¡Network connectionÀïÑ¡ÔñUse network address translation(NAT)
¡¡¡¡SCSI AdptersÑ¡ÔñĬÈϵÄLSI Logic¾Í¿ÉÒÔÁË
×¢Òâµã£º
¡¡¡¡ÕâÀïÑ¡ÔñµÄ´ÅÅÌÀàÐͶÔÓÚ×îºó±àÒëÄÚºËʹÓÃÑ¡ÏîÊÇÓÐÓ°ÏìµÄ£¬ÎÒÔÚ±¾ÎĵĵÚÒ»°æÖÐʹÓÃBusLogicÀ´½¨Á¢ÏµÍ³£¬Òò´ËÕâÀïÑ¡ÔñʹÓÃLSI LogicÀ´Óã¬Èç¹ûʹÓÃBusLogicµÄ»°¿ÉÒԲο¼±¾ÎĵÚÒ»°æÖеÄÄں˱àÒëÑ¡ÏîÀ´´úÌæºóÃæµÄÄÚºËÑ¡Ï·Ö¡£
¡¡¡¡Ñ¡ÔñCreate a new virtual disk
¡¡¡¡ÔÚVirtual Disk TypeÕâ²½±È½ÏÖØÒª£¬Äã¿ÉÒÔÑ¡ÔñIDEÒ²¿ÉÒÔÑ¡ÔñSCSI£¬µ«ÕâÀïµÄÑ¡ÔñÖ±½ÓÓ°Ïìµ½×îºó±àÒëÄÚºËʱµÄÑ¡Ïî¡£ÕâÀïÒÔÑ¡ÔñIDEΪÀý×Ó¡£
Ïà¹Ø֪ʶµã£º
¡¡¡¡Èç¹ûÑ¡ÔñÁËIDE£¬ÔòÄں˵ÄĬÈÏÉèÖþͿÉÒÔÖ§³Ö£¬µ«Èç¹ûÑ¡ÔñÁËSCSI£¬¾Í±ØÐëÔÚÄÚºËÖмÓÈë¶ÔSCSI AdptersµÄÖ§³Ö£¬ÒòΪǰÃæÑ¡ÔñÁËLSI Logic£¬ËùÒÔÄÚºËÖоͱØÐë¼ÓÈë¶ÔLSI LogicµÄÖ§³Ö£¬·ñÔò½«ÎÞ·¨Æô¶¯£¬Ïà¹Ø²¿·ÖÔÚ×îºóµÄÄں˱àÒ벿·ÖÓÐ˵Ã÷¡£
¡¡¡¡²»¹ýÕâÀïÎÒ½¨ÒéÑ¡ÔñʹÓÃIDE£¬Ò»·½Ãæ·½±ãÇý¶¯£¬ÁíÍâËƺõLFS-6.3-r2145Éв»ÄÜÖ§³ÖLSI LogicµÄSCSI´ÅÅÌ£¬ÓøÃLiveCDÆô¶¯ºó¿ÉÄÜÎÞ·¨Ê¶±ð³öÓ²ÅÌÀ´¡£
¡¡¡¡¶ÔÓÚ´ÅÅÌ´óС£¬Ê¹ÓÃ4G×ã¹»±àÒëLFSÁË£¬µ«Èç¹ûÄã´òËã±àÒë¸ü¶àµÄBLFS£¬ÕâÀï¿ÉÒÔ¿¼ÂÇÊʵ±µÄÔö¼ÓһЩ´óС£¬Èç¹û´ÅÅÌ¿Õ¼ä±È½Ï¸»Ô£¾ÍÓÃĬÈϵÄ8GºÃÁË¡£
¡¡¡¡Íê³ÉÏòµ¼ºóÔÚÐéÄâ»úµÄ½çÃæÀïÑ¡ÔñEdit virtual machine settings£¬½«CD-ROM¸ÄΪUse ISO image£¬È»ºóÑ¡ÔñLiveCDµÄISOÎļþ£¬Èç¹ûÄãÒѾ­¿Ì¼ºÃÁ˹âÅÌ£¬½«¹âÅÌ·ÅÈë¹âÇý¾ÍÐÐÁË¡£
¡¡¡¡µãStart this virtual machine¿ªÊÇÐéÄâ»ú
¡¡¡¡ÓÉÓÚÐéÄâÅÌÉÏûÓÐÈκÎÐÅÏ¢£¬Òò´Ë½«×Ô¶¯´ÓLiveCDÖÐÆô¶¯£¬ÔÚÆô¶¯¹ý³ÌÖлá³öÏÖÑ¡ÔñʱÇøµÈÐÅÏ¢£¬Äã¿ÉÒÔ°´ÕÕʵ¼ÊÇé¿öÑ¡Ôñ£¬Ò²¿ÉÒÔ°´ÕÕĬÈÏÑ¡Ôñ£¬¼òµ¥µã¾ÍÊǵȴýÒ»»áϵͳ»á×Ô¶¯½øÐÐÑ¡Ôñ¡£ÕâÀïÎÒÑ¡ÔñʱÇøΪAsia/Shanghai£¬Ñ¡Ôñ±¾µØÓïÑÔΪChinese (Simplified, UTF-8)£¬ÆäËüµÄ¶¼°´Ä¬ÈÏÑ¡ÔñÁË¡£
¡¡¡¡
¡¡¡¡
¡¡¡¡Æô¶¯Íê³ÉLiveCDºó¾Í¿ªÊ¼½¨Ôì×Ô¼ºµÄLFSµÄÀú³ÌÁË¡£
ÕâÀïÏȽéÉÜÒÔÏÂÁ½¸öLiveCDϵÄÖØҪĿ¼
/usr/share/LFS-BOOK-6.3-HTMLĿ¼´æ·ÅµÄ¾ÍÊÇLFSÊÖ²áÁË
/lfs-sourcesÀïÃæ´æ·ÅµÄ¾ÍÊǽ¨ÔìLFSËùÐèÒªµÄÔ´Âë°ü£¬²»ÐèÒªµ½´¦ÏÂÈí¼þÁË¡£

´ÅÅÌ·ÖÇø£º
ÊäÈëÃüÁ
´úÂë:
[align=left]cfdisk /dev/hda[/align]

½«³öÏÖ·ÖÇø½çÃæ

ÕâÀï¿ÉÒÔ°´ÕÕÄã×Ô¼ºµÄÐèÒªµÄ·ÖÇø£¬ÕâÀïÎÒ°´ÕÕÉèÖÃÒ»¸ö¸ù·ÖÇøºÍÒ»¸ö½»»»·ÖÇøΪÀý£¬½»»»·ÖÇøÕ¼ÓÃ512M£¬ÆäÓàµÄÈ«²¿·Ö¸ø¸ù·ÖÇø¡£
´ÅÅÌ·ÖÇø¡¡ ¡¡ ×÷ÓÃ
/dev/hda1¡¡¡¡¡¡ swap
/dev/hda2¡¡ ×÷ΪĿ±êϵͳ¸ùĿ¼

±£´æÍ˳öºó½øÐдÅÅÌ·ÖÇøµÄ¸ñʽ»¯
´úÂë:
[align=left]mkswap /dev/hda1mkfs.xfs /dev/hda2[/align]

Ïà¹Ø֪ʶµã£º
¡¡¡¡´ÅÅ̸ñʽ»¯Ò»¶¨ÒªÔÚ´ÅÅÌ·ÖÇøδ½øÐмÓÔØÇ°½øÐС£
¡¡¡¡mkswapÊÇÓÃÓÚ½«´ÅÅÌ·ÖÇø¸ñʽ»¯Îª½»»»·ÖÇøµÄÃüÁî¡£
¡¡¡¡ÕâÀïÎÒ½«/dev/hda2¸ñʽ»¯ÁËΪXfs¸ñʽ£¬Èç¹ûÄãϲ»¶ÆäËü¸ñʽµÄÎļþϵͳ£¬Äã¿ÉÒÔʹÓÃÏàÓ¦µÄÃüÁîÀ´¸ñʽ»¯¡£
×¢Ò⣺ÕâÀïÒª¸ù¾Ýʵ¼ÊÇé¿ö½¨Á¢ºÍÉèÖ÷ÖÇø£¬Èç¹ûÄ㲻̫Çå³þÕâ¸öÎÊÌ⣬ÇëÏȲ»Òª¿ªÊ¼£¬·ñÔò¿ÉÄÜÔì³ÉÄÑÒÔ»Ö¸´µÄËðʧ£¡£¨ÕâÀïÖ»ÊǸù¾ÝVMWareÀïÃæµÄÇé¿ö×öµÄÀý×Ó£¬ÔÚVMWareÖÐÏà¶Ô°²È«Ð©£¬½¨Òé³õѧÕßÔÚÐéÄâ»úÖпªÊ¼¡££©

Èç¹ûÄãµÄÄڴ治̫´ó£¬ÏëÔÚ±àÒëÆÚ¼ä¾ÍʹÓÃÉϽ»»»·ÖÇøµÄ»°£¬¿ÉʹÓÃÏÂÃæµÄÃüÁ»î½»»»·ÖÇø
swapon /dev/hda1
Ïà¹Ø֪ʶµã£º
¡¡¡¡swaponÓÃÓÚ¼¤»î½»»»·ÖÇø
¡¡¡¡swapoffÓÃÓÚ½«¼¤»îµÄ½»»»·ÖÇøÍ£ÓÃ
¡¡¡¡¿ÉÒÔͨ¹ýfreeÃüÁîÀ´²é¿´µ±Ç°µÄÄÚ´æʹÓÃÇé¿ö


´´½¨LFSµÄ¡°´´×÷»ùµØ¡±
´úÂë:
[align=left]export LFS=/mnt/lfsmkdir -pv $LFS[/align]

Ïà¹Ø֪ʶµã£º
¡¡¡¡export LFS=/mnt/lfsÕâÌõÃüÁîµÄ×÷ÓÃÊÇΪÁ˺óÃæÒýÓá°´´×÷»ùµØ¡±µÄ¾ø¶Ô·¾¶·½±ã¶øÉèÖÃLFSÕâÑùµÄ»·¾³±äÁ¿¡£

¼ÓÔØ/dev/hda2µ½¡°´´×÷»ùµØ¡±
´úÂë:
[align=left]mount /dev/hda2 $LFS[/align]


´´½¨±ØÒªµÄĿ¼²¢ÉèÖÃÊôÐÔ
´´½¨Ô´´úÂë±àÒëÓÃĿ¼
´úÂë:
[align=left]mkdir -v $LFS/sourceschmod -v a+wt $LFS/sources[/align]

Ïà¹Ø֪ʶµã£º
¡¡¡¡chmod a+wtÊǽ«Ä¿Â¼»òÎļþµÄÊôÐÔÉèÖÃΪ1777£¬ÕâÑùÈκÎÈ˶¼¿ÉÒÔ¶ÔÆä½øÐжÁд¡£


´´½¨¹¤¾ßÁ´Ä¿Â¼
´úÂë:
[align=left]mkdir -v $LFS/toolsln -sv $LFS/tools /[/align]

×¢Ò⣺
¡¡¡¡ln -sv $LFS/toolsÖ´ÐкóÓ¦¸Ã»áÊä³ö
¡¡¡¡¡¡¡¡`/tools' -> `/mnt/lfs/tools'
¡¡¡¡±íʾÕýÈ·¡£


Ïà¹Ø֪ʶµã£º
¡¡¡¡ÉÏÃæÕâÁ½¾ä¾Í½¨Á¢ÁËÉñÆæµÄ¹¤¾ßÁ´Ä¿Â¼£¨Êǹ¤¾ßÁ´Ä¿Â¼²»Êǹ¤¾ßÁ´£©£¬ÕâÑùµÄ´´½¨·½Ê½ÊÇΪÁËÔÚ´´½¨¹¤¾ßÁ´ºÍʹÓù¤¾ßÁ´´´½¨Ä¿±êϵͳµÄʱºò¶ÔÓÚ¹¤¾ßÁ´µÄλÖö¼ÊÇ/tools£¬ÕâÑù¿É±£Ö¤¹¤¾ßÁ´µÄÕý³£Ê¹ÓÃ


´´½¨lfsÓû§
´úÂë:
[align=left]groupadd lfsuseradd -s /bin/bash -g lfs -m -k /dev/null lfs[/align]

ÉèÖÃlfsÃÜÂ룬ÉèÖÃΪ¿Õ¾ÍÐÐÁË£¬Ò²¾ÍÊÇÊäÈëÃÜÂëµÄʱºòÖ±½Ó»Ø³µ¾Í³É¡£
´úÂë:
[align=left]passwd lfs[/align]

½«toolsºÍsourcesĿ¼µÄÓû§¸ÄΪlfs£¬ÒÔ±ãºóÃæʹÓÃlfsÀ´²Ù×÷ÕâÁ½¸öĿ¼
´úÂë:
[align=left]chown -v lfs $LFS/toolschown -v lfs $LFS/sources[/align]

µÇ½µ½lfsÓû§
´úÂë:
[align=left]su - lfs[/align]

ÕâʱºòÄã»á·¢ÏÖÃüÁîÐÐÌáʾ·ûÒѾ­ÓÉ#¸ÄΪÁË$
Ïà¹Ø֪ʶµã£º
¡¡¡¡ÆäʵÈç¹û²»Ê¹ÓÃlfsÓÃrootÒ²ÊÇÄÜÍê³É¹¤¾ßÁ´µÄ£¬²»¹ýÐèÒª¶ÔrootµÄ»·¾³±äÁ¿½øÐÐÐ޸ģ¬»¹Òª·ÀÖ¹ÒòΪÊäÈë´íÎó¶øµ¼Ö¸²¸ÇÖ÷ϵͳϵÄÎļþ£¬ËùÒÔLFSÊÖ²áÖÐÖÆ×÷¹¤¾ßÁ´²¿·Ö¾ÍÊÇΪÁ˽â¾öÕâÖÖÒâÍâµÄ·¢Éú¶øÓÃlfsÓû§À´½¨Á¢¹¤¾ßÁ´


½¨Á¢lfsÓû§µÄ»·¾³
´úÂë:
[align=left]cat > ~/.bash_profile << "EOF"exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bashEOFcat > ~/.bashrc << "EOF"set +humask 022LFS=/mnt/lfsLC_ALL=POSIXPATH=/tools/bin:/bin:/usr/binexport LFS LC_ALL PATHEOFsource ~/.bash_profile[/align]

¡¡¡¡ÕâÀïÀûÓÃÁËbashµÄ»·¾³±äÁ¿µÄÉèÖÃÎļþ½«lfsµÄ»·¾³ÉèÖÃΪ·ûºÏ±àÒ빤¾ßÁ´ÒªÇóµÄ×îÉٵĻ·¾³²ÎÊý
¡¡¡¡ÕâÀïÃæ×îÖØÒªµÄ¾ÍÊÇPATHÕâ¸ö²ÎÊý£¬Ä¿µÄÊÇΪÁËÄܹ»ÀûÓù¤¾ßÁ´ÀïÃæµÄ¹¤¾ßÖÆ×÷¹¤¾ßÁ´£ºÊ×ÏȲéÕÒ/tools/binÏÂÊÇ·ñÓÐÐèÒªµÄÃüÁÈç¹ûûÓÐÔÙµ½/binºÍ/usr/binÏÂÕÒ£¬È»ºóÓÃ/bin»ò/usr/binÏÂÃæµÄÃüÁîÀ´°ïÖúÉú³ÉÐèÒªµÄÃüÁî²¢·ÅÔÚ/tools/binÏ£¬ÕâÑù´ËÏû±ËÕÇ£¬×îÖÕ¿ÉÍê³ÉÒ»¸ö×Ô¸ø×Ô×ãµÄ¹¤¾ßÁ´¡£
¡¡¡¡µ½´ËΪֹ¾Í¿ÉÒÔ¿ªÊ¼¹¤¾ßÁ´µÄÖÆ×÷ÁË£¬²»¹ýÖÆ×÷LFSÊÇÒ»¸öÂþ³¤¶øºÆ´óµÄ¹¤³Ì£¬ËùÒÔÒªÒ»Ö±¿ª»úÖ±µ½Íê³ÉÓÐʱºò±È½ÏÀ§ÄÑ£¬ÌرðÊÇÔÚ»úÆ÷ËٶȱȽÏÂýµÄÇé¿öÏ£¬Äܹ»ÖØÐÂÆô¶¯µ½×îºó¹¤×÷µÄ״̬ÊǺÜÖØÒªµÄ¡£ÔÚ²»Í¬µÄ½×¶ÎÖØÐÂÆô¶¯²¢»Ö¸´×´Ì¬µÄ²½Öè²»ÍêÈ«Ïàͬ£¬ËùÒÔ±¾ÎÄ»áÔÚ²»Í¬µÄ½×¶ÎÌÖÂÛÖØÐÂÆô¶¯»Ö¸´µ½¹¤×÷״̬µÄ·½·¨ºÍ²½Öè¡£

¡¡¡¡´ÓÏÖÔÚ¿ªÊ¼Ò»Ö±µ½µÚÎåÕ½áÊø£¬Ò²¾ÍÊÇÍê³ÉStrippingÖмäµÄ²½ÖèÖÐÈç¹ûÖØÐÂÆô¶¯µÄ»Ö¸´²½Ö裺
¡¡¡¡1.ÖØÐÂÆô¶¯¼ÆËã»ú£¬²¢´ÓLiveCDÆô¶¯
¡¡¡¡Ïà¹Ø֪ʶµã£ºÔÚVMWareÖÐÒòΪ´ÅÅÌÒѾ­ÓÐÁËÐÅÏ¢ÁË£¬ËùÒÔ»á´Ó´ÅÅÌÆô¶¯£¬ÐèÒªÔÚÆô¶¯ÐéÄâ»úÖеĻúÆ÷ʱ°´F2½øÈëÐéÄâ»úµÄÐéÄâBIOS£¬È»ºóÔÚBOOTÖÐÉèÖõÚÒ»Æô¶¯ÎªCD-ROM£¬±£´æÍ˳ö¼´¿É¡£

¡¡¡¡2.LiveCDÆô¶¯¹ý³ÌͬµÚÒ»´ÎÆô¶¯Ñ¡ÔñÒ»Ñù¡£
¡¡¡¡3.¼ÓÔØ·ÖÇø
¡¡¡¡export LFS=/mnt/lfs
¡¡¡¡mkdir -pv $LFS
¡¡¡¡mount /dev/hda2 $LFS
¡¡¡¡4.¼ÓÔؽ»»»·ÖÇø£¨Èç¹û²»ÏëÓý»»»·ÖÇø»òÕßûÓн»»»·ÖÇø¿ÉÌø¹ý´Ë²½Ö裩
¡¡¡¡swapon /dev/hda1
¡¡¡¡5.½¨Á¢¹¤¾ßÁ´µÄÁ´½Ó
¡¡¡¡ln -sv $LFS/tools /
¡¡¡¡6.´´½¨lfsÓû§
¡¡¡¡groupadd lfs
¡¡¡¡useradd -s /bin/bash -g lfs -m -k /dev/null lfs
¡¡¡¡passwd lfs
¡¡¡¡chown -v lfs $LFS/tools
¡¡¡¡chown -v lfs $LFS/sources
¡¡¡¡su - lfs
¡¡¡¡7.½¨Á¢lfsÓû§µÄ»·¾³
¡¡¡¡cat > ~/.bash_profile << "EOF"
¡¡¡¡exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
¡¡¡¡EOF
¡¡¡¡cat > ~/.bashrc << "EOF"
¡¡¡¡set +h
¡¡¡¡umask 022
¡¡¡¡LFS=/mnt/lfs
¡¡¡¡LC_ALL=POSIX
¡¡¡¡PATH=/tools/bin:/bin:/usr/bin
¡¡¡¡export LFS LC_ALL PATH
¡¡¡¡EOF
¡¡¡¡source ~/.bash_profile
¡¡¡¡8.¼ì²éÒ»ÏÂ
¡¡¡¡exportÃüÁî²é¿´Êä³ö£¬Ó¦¸ÃÊÇ
¡¡¡¡declare -x HOME="/home/lfs"
¡¡¡¡declare -x LC_ALL="POSIX"
¡¡¡¡declare -x LFS="/mnt/lfs"
¡¡¡¡declare -x OLDPWD
¡¡¡¡declare -x PATH="/tools/bin:/bin:/usr/bin"
¡¡¡¡declare -x PS1="\\u:\\w\\\$ "
¡¡¡¡declare -x PWD="/home/lfs"
¡¡¡¡declare -x SHLVL="1"
¡¡¡¡declare -x TERM="linux"
¡¡¡¡9.½øÈë±àÒëĿ¼
¡¡¡¡cd $LFS/sources
¡¡¡¡»ù±¾ÉϾͻָ´¹¤×÷״̬ÁË¡£



¿ªÊ¼¹¤¾ßÁ´µÄÖÆ×÷
½øÈëLFS°ü±àÒëĿ¼
´úÂë:
[align=left]cd $LFS/sources[/align]

Binutils-2.17 - Pass 1
´úÂë:
[align=left]tar xvf /lfs-sources/binutils-2.17.tar.bz2cd binutils-2.17[/align]

Ïà¹Ø֪ʶµã£º
¡¡¡¡´ó¼Ò¿ÉÒÔ×¢Òâµ½ºóÃæËùÓеĽâ°üÃüÁî¾ùʹÓÃtar xvfÀ´Íê³É£¬¶ø²»¹ÜÎļþµÄѹËõ·½Ê½ÊÇbz2»¹ÊÇgz£¬ÕâÊÇÒòΪ½ÏеÄtar³ÌÐò¶¼¾ßÓÐ×Ô¶¯Ê¶±ðºó׺Ãû²¢×Ô¶¯µ÷ÓÃÏàÓ¦µÄ½âѹËõ¹¤¾ßµÄÄÜÁ¦£¬ËùÒÔ¿ÉÒÔ²»ÐèÒªÖ¸¶¨Ñ¹Ëõ·½Ê½£¬µ«¶ÔÓÚÔçÆÚµÄtarÃüÁîÔò¿ÉÄܲ»¾ß±¸Õâ¸ö¹¦ÄÜÒò´ËÐèÒªÄã¸ù¾Ý°üµÄѹËõ·½Ê½À´Ö¸¶¨£¬Èçbz2ʹÓÃj£¬gzʹÓÃz£¬¶ÔÓ¦ÉÏÃæµÄbinutilsÔòÊÇtar xvjf /lfs-sources/binutils-2.17.tar.bz2
¡¡¡¡ÒòLFSµÄLiveCDÖÐÌṩµÄtar°æ±¾±È½ÏУ¬ºóÃæÖÆ×÷µÄtar°æ±¾Ò²±È½ÏУ¬Òò´ËÖ§³Ö×Ô¶¯Ê¶±ðµÄÄÜÁ¦£¬Í¬Ê±ÎªÁËʹÎÄÕµĽâѹÃüÁî¿´ÆðÀ´±È½Ïͳһ·½±ãά»¤£¨Í¬Ñù¶ÔÓÚÏëÖÆ×÷³É½Å±¾µÄÅóÓÑÒ²»á±È½Ï·½±ã£©Òò´ËºóÃæͳһʹÓÃtar xvfÀ´½âѹ¡£

¡¡¡¡½Ó×ÅÎÒÃÇÐèÒª½¨Á¢Ò»¸öĿ¼£¬ÒòΪbinutils½¨ÒéʹÓÃÒ»¸ö¿ÕĿ¼À´±àÒ룬ËùÒÔ
´úÂë:
[align=left]mkdir -v ../binutils-buildcd ../binutils-buildCC="gcc -B/usr/bin/" ../binutils-2.17/configure --prefix=/tools --disable-nls --disable-werrormakemake installmake -C ld cleanmake -C ld LIB_PATH=/tools/libcp -v ld/ld-new /tools/bincd ..rm -rf binutils-buildrm -rf binutils-2.17[/align]


GCC-4.1.2 - Pass 1
´úÂë:
[align=left]tar xvf /lfs-sources/gcc-4.1.2.tar.bz2mkdir -v gcc-buildcd gcc-buildCC="gcc -B/usr/bin/" ../gcc-4.1.2/configure --prefix=/tools \ --with-local-prefix=/tools --disable-nls \ --enable-shared --enable-languages=cmake bootstrapmake installln -vs gcc /tools/bin/cccd ..rm -rf gcc-buildrm -rf gcc-4.1.2[/align]

×¢Ò⣺ÕâÀﲻҪͼʡʶø²»É¾gcc-4.1.2£¬ÒòΪÕâÑù¿ÉÄÜ»á¸øºóÃæµÄ±àÒë²úÉúһЩÒâÍâµÄ´íÎó¡£



Linux-2.6.22.5 API Headers
´úÂë:
[align=left]tar xvf /lfs-sources/linux-2.6.22.5.tar.bz2cd linux-2.6.22.5make mrpropermake headers_checkmake INSTALL_HDR_PATH=dest headers_installcp -rv dest/include/* /tools/includecd ..rm -rf linux-2.6.22.5[/align]


Glibc-2.5.1
´úÂë:
[align=left]tar xvf /lfs-sources/glibc-2.5.1.tar.bz2cd glibc-2.5.1mkdir -v ../glibc-buildcd ../glibc-build../glibc-2.5.1/configure --prefix=/tools \--disable-profile --enable-add-ons \--enable-kernel=2.6.0 --with-binutils=/tools/bin \--without-gd --with-headers=/tools/include \--without-selinuxmakemkdir -v /tools/etctouch /tools/etc/ld.so.confmake installcd ..rm -rf glibc-buildrm -rf glibc-2.5.1[/align]

Ïà¹Ø֪ʶµã£º
¡¡¡¡ÕâÀïµÄ²ÎÊý--enable-kernel=2.6.0£¬Ö»ÊÇΪÁË˵Ã÷kernelµÄ´ó°æ±¾£¬ËùÒÔ²»ÐèÒª¸ù¾Ýʵ¼ÊµÄkernel°æ±¾À´¸Ä£¬¼´Ê¹ÊÇÓÃlinux-2.6.15Ò²Ò»Ñùֻд2.6.0¾Í¿ÉÒÔÁË¡£

µ÷Õû¹¤¾ßÁ´
´úÂë:
[align=left]mv -v /tools/bin/{ld,ld-old}mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}mv -v /tools/bin/{ld-new,ld}ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ldgcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&@g' > `dirname $(gcc -print-libgcc-file-name)`/specsGCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &&find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &&rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &&unset GCC_INCLUDEDIR[/align]

Ïà¹Ø֪ʶµã£º
¡¡¡¡¹¤¾ßÁ´µÄµ÷Õû·½·¨Óкü¸ÖÖ£¬¶øÇÒ²»Í¬°æ±¾GCCµÄspecs¿ÉÄÜ»áÓв»Í¬£¬µ«Êµ¼ÊÉ϶¼ÊÇ°ÑspecsÎļþÖеÄ/lib/ld-linux.so.2Ìæ»»³ÉÁË/tools/lib/ld-linux.so.2£¬ËùÒÔ¼´Ê¹ÓÐЩÎÄÕÂÔÚµ÷Õû¹¤¾ßÁ´ÉϵÄÃüÁîºÍLFSÊÖ²áÉϵIJ»Ò»ÑùÒ²²»ÓÃÌ«Ææ¹Ö£¬µ±È»Ò²¿ÉÒÔÖ±½ÓÓÃgcc -dumpspecsµ¼³öºóÊÖ¹¤Ö±½Ó±à¼­specsÎļþ¡£

²âÊÔ¹¤¾ßÁ´µÄµ÷Õû
echo 'main(){}' > dummy.c
cc dummy.c
readelf -l a.out | grep 'tools'
Èç¹ûÊä³ö´óÖÂÈçÏÂ
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
Ôò±íʾµ÷Õû³É¹¦£¬ÒòΪËùÓеĿâÒѾ­Á¬½Óµ½ÁË/tools/libÏ¡£
rm -rf a.out dummy.c


²âÊÔ¹¤¾ß°²×°
˵Ã÷£ºÕⲿ·Ö½«°²×°3¸öÓÃÓÚµÚÁùÕ¸÷ÖÖÔ´Âë°ü±àÒëºóµÄ²âÊԵŤ¾ß£¬ËùÒÔÈç¹ûÄã²»´òËã×ömake checkÖ®ÀàµÄÊÂÇ飬ÄÇôÕâ3¸ö°ü¿ÉÒÔ²»×°¡£
Tcl-8.4.15 Expect-5.43.0 DejaGNU-1.4.4
´úÂë:
[align=left]tar xvf /lfs-sources/tcl8.4.15-src.tar.gzcd tcl8.4.15/unix./configure --prefix=/toolsmakemake installmake install-private-headersln -sv tclsh8.4 /tools/bin/tclshcd $LFS/sourcestar xvf /lfs-sources/expect-5.43.0.tar.gzcd expect-5.43patch -Np1 -i /lfs-sources/expect-5.43.0-spawn-1.patchcp configure{,.bak}sed 's:/usr/local/bin:/bin:' configure.bak > configure./configure --prefix=/tools --with-tcl=/tools/lib --with-tclinclude=/tools/include --with-x=nomakemake SCRIPTS="" installcd $LFS/sourcestar xvf /lfs-sources/dejagnu-1.4.4.tar.gzcd dejagnu-1.4.4./configure --prefix=/toolsmake installcd ..rm -rf tcl8.4.15rm -rf expect-5.43rm -rf dejagnu-1.4.4[/align]


GCC-4.1.2 - Pass 2
´úÂë:
[align=left]tar xvf /lfs-sources/gcc-4.1.2.tar.bz2cd gcc-4.1.2cp -v gcc/Makefile.in{,.orig}sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.incp -v gcc/Makefile.in{,.tmp}sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \> gcc/Makefile.inpatch -Np1 -i /lfs-sources/gcc-4.1.2-specs-1.patchmkdir -v ../gcc-buildcd ../gcc-build../gcc-4.1.2/configure --prefix=/tools \--with-local-prefix=/tools \--enable-clocale=gnu --enable-shared \--enable-threads=posix --enable-__cxa_atexit \--enable-languages=c,c++ --disable-libstdcxx-pchmakemake installcd ..rm -rf gcc-buildrm -rf gcc-4.1.2[/align]

ÔٴβâÊÔ¹¤¾ßÁ´µÄµ÷Õû£¬ÒÔÈ·±£¸Õ¸Õ±àÒëµÄgccÕýÈ·¹¤×÷
echo 'main(){}' > dummy.c
cc dummy.c
readelf -l a.out | grep 'tools'
Èç¹ûÊä³ö´óÖÂÈçÏÂ
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
Ôò±íʾµ÷Õû³É¹¦£¬ÒòΪËùÓеĿâÒѾ­Á¬½Óµ½ÁË/tools/libÏ¡£
rm -rf a.out dummy.c


Binutils-2.17 - Pass 2
´úÂë:
[align=left]tar xvf /lfs-sources/binutils-2.17.tar.bz2mkdir -v binutils-buildcd binutils-build../binutils-2.17/configure --prefix=/tools --disable-nls \ --with-lib-path=/tools/libmakemake installmake -C ld cleanmake -C ld LIB_PATH=/usr/lib:/libcp -v ld/ld-new /tools/bincd ..rm -rf binutils-buildrm -rf binutils-2.17[/align]

Ncurses-5.6
´úÂë:
[align=left]tar xvf /lfs-sources/ncurses-5.6.tar.gzcd ncurses-5.6./configure --prefix=/tools --with-shared --without-debug --without-ada --enable-overwritemakemake installcd ..rm -rf ncurses-5.6[/align]


Bash-3.2
´úÂë:
[align=left]tar xvf /lfs-sources/bash-3.2.tar.gzcd bash-3.2patch -Np1 -i /lfs-sources/bash-3.2-fixes-5.patch./configure --prefix=/tools --without-bash-mallocmakemake installln -vs bash /tools/bin/shcd ..rm -rf bash-3.2[/align]


Bzip2-1.0.4
´úÂë:
[align=left]tar xvf /lfs-sources/bzip2-1.0.4.tar.gzcd bzip2-1.0.4makemake PREFIX=/tools installcd ..rm -rf bzip2-1.0.4[/align]


Coreutils-6.9
´úÂë:
[align=left]tar xvf /lfs-sources/coreutils-6.9.tar.bz2cd coreutils-6.9./configure --prefix=/toolsmakemake installcp -v src/su /tools/bin/su-toolscd ..rm -rf coreutils-6.9[/align]


Diffutils-2.8.1
´úÂë:
[align=left]tar xvf /lfs-sources/diffutils-2.8.1.tar.gzcd diffutils-2.8.1./configure --prefix=/toolsmakemake installcd ..rm -rf diffutils-2.8.1[/align]


Findutils-4.2.31
´úÂë:
[align=left]tar xvf /lfs-sources/findutils-4.2.31.tar.gzcd findutils-4.2.31./configure --prefix=/toolsmakemake installcd ..rm -rf findutils-4.2.31[/align]


Gawk-3.1.5
´úÂë:
[align=left]tar xvf /lfs-sources/gawk-3.1.5.tar.bz2cd gawk-3.1.5./configure --prefix=/toolscat >> config.h << "EOF"#define HAVE_LANGINFO_CODESET 1#define HAVE_LC_MESSAGES 1EOFmakemake installcd ..rm -rf gawk-3.1.5[/align]


Gettext-0.16.1
´úÂë:
[align=left]tar xvf /lfs-sources/gettext-0.16.1.tar.gzcd gettext-0.16.1cd gettext-tools./configure --prefix=/tools --disable-sharedmake -C gnulib-libmake -C src msgfmtcp -v src/msgfmt /tools/bincd $LFS/sourcesrm -rf gettext-0.16.1[/align]


Grep-2.5.1a
´úÂë:
[align=left]tar xvf /lfs-sources/grep-2.5.1a.tar.bz2cd grep-2.5.1a./configure --prefix=/tools --disable-perl-regexpmakemake installcd ..rm -rf grep-2.5.1a[/align]


Gzip-1.3.12
´úÂë:
[align=left]tar xvf /lfs-sources/gzip-1.3.12.tar.gzcd gzip-1.3.12./configure --prefix=/toolsmakemake installcd ..rm -rf gzip-1.3.12[/align]


Make-3.81
´úÂë:
[align=left]tar xvf /lfs-sources/make-3.81.tar.bz2cd make-3.81./configure --prefix=/toolsmakemake installcd ..rm -rf make-3.81[/align]


Patch-2.5.4
´úÂë:
[align=left]tar xvf /lfs-sources/patch-2.5.4.tar.gzcd patch-2.5.4./configure --prefix=/toolsmakemake installcd ..rm -rf patch-2.5.4[/align]


Perl-5.8.8
´úÂë:
[align=left]tar xvf /lfs-sources/perl-5.8.8.tar.bz2cd perl-5.8.8patch -Np1 -i /lfs-sources/perl-5.8.8-libc-2.patch./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper Fcntl IO POSIX'make perl utilitiescp -v perl pod/pod2man /tools/binmkdir -pv /tools/lib/perl5/5.8.8cp -Rv lib/* /tools/lib/perl5/5.8.8cd ..rm -rf perl-5.8.8[/align]


Sed-4.1.5
´úÂë:
[align=left]tar xvf /lfs-sources/sed-4.1.5.tar.gzcd sed-4.1.5./configure --prefix=/toolsmakemake installcd ..rm -rf sed-4.1.5[/align]


Tar-1.18
´úÂë:
[align=left]tar xvf /lfs-sources/tar-1.18.tar.bz2cd tar-1.18./configure --prefix=/toolsmakemake installcd ..rm -rf tar-1.18[/align]


Texinfo-4.9
´úÂë:
[align=left]tar xvf /lfs-sources/texinfo-4.9.tar.bz2cd texinfo-4.9./configure --prefix=/toolsmakemake installcd ..rm -rf texinfo-4.9[/align]


Util-linux-2.12r
´úÂë:
[align=left]tar xvf /lfs-sources/util-linux-2.12r.tar.bz2cd util-linux-2.12rsed -i 's@/usr/include@/tools/include@g' configure./configuremake -C libmake -C mount mount umountmake -C text-utils morecp -v mount/{,u}mount text-utils/more /tools/bincd ..rm -rf util-linux-2.12r[/align]

Stripping
Õâ²½ÊÇ¿ÉÓпÉÎ޵ģ¬Èç¹ûÄã´òËã½ñºó»¹ÒªÓÃ/toolsÀïÃæµÄ¶«Î÷£¬ÄÇô¿ÉÒÔstripÒ»ÏÂÀ´¼õÉÙÕ¼ÓõĴÅÅ̿ռ䣬µ«Èç¹û×öÍêÄ¿±êϵͳºó¾Íɾ³ýÁË£¬²»StripÒ²¿ÉÒÔ£¬·´Õý×îºóÒ²ÊÇҪɾµôµÄ¡£
´úÂë:
[align=left]strip --strip-debug /tools/lib/*strip --strip-unneeded /tools/{,s}bin/*[/align]

infoºÍmanÀïÃæµÄÄÚÈÝÔÚÖÆ×÷¹ý³ÌÖÐûʲôÓô¦£¬ËùÒÔɾµôҲûɶ¹Øϵ¡£
´úÂë:
[align=left]rm -rf /tools/{info,man}[/align]


Í˳ölfsÓû§£¨Õâ²½²»ÒªÉÙÁË£©
´úÂë:
[align=left]exit[/align]

µ½Ä¿Ç°ÎªÖ¹£¬¹¤¾ßÁ´ÒѾ­ÖÆ×÷Íê³ÉÁË£¬½ÓמÍÒª¿ªÊ¼ÖÆ×÷ÕæÕýµÄÄ¿±êϵͳÁË£¬Èç¹ûÄ㵽ĿǰΪֹû³öʲôÎÊÌ⣬ÄÇô¹§Ï²Äã³É¹¦µÄͨ¹ýÁËÒ»¹Ø£¬²»¹ý½Ó×Å»¹ÓÐÏ൱³¤µÄ·¡£

ÏÖÔÚÄãÓ¦¸ÃÊÇ´¦ÓÚrootÓû§×´Ì¬µÄ£¬¿´¿´ÄãµÄÃüÁîÐÐÌáʾ·ûÊDz»Êǻص½ÁË#¡£

´ÓÏÖÔÚ¿ªÊ¼²»ÔÚÐèÒªlfsÓû§À´ÖÆ×÷ϵͳÁË£¬Òò´ËÎÒÃÇÓÃ
´úÂë:
[align=left]chown -R root:root $LFS/tools[/align]

ÖØÐÂÉèÖÃĿ¼ȨÏÞ£¬±ãÓÚºóÃæµÄ¹¤×÷¡£


´´½¨Èý¸öÖØҪĿ¼
´úÂë:
[align=left]mkdir -pv $LFS/{dev,proc,sys}[/align]

´´½¨Á½¸öÄ¿±êϵͳËù±ØÐëµÄÉ豸Îļþ
´úÂë:
[align=left]mknod -m 600 $LFS/dev/console c 5 1mknod -m 666 $LFS/dev/null c 1 3[/align]


Õâ¸öʱºòÒ²ÐíÄãÏë˯¾õ¹Ø»úÁË£¬ÄÇôÖØпª»úºó»Øµ½¹¤×÷״̬µÄ²½ÖèÊÇ£º
¡¡¡¡1.ÖØÐÂÆô¶¯¼ÆËã»ú£¬²¢´ÓLiveCDÆô¶¯
¡¡¡¡2.¼ÓÔØ·ÖÇø
¡¡¡¡export LFS=/mnt/lfs
¡¡¡¡mkdir -pv $LFS
¡¡¡¡mount /dev/hda2 $LFS
¡¡¡¡3.¼ÓÔؽ»»»·ÖÇø£¨Èç¹û²»ÏëÓý»»»·ÖÇø»òÕßûÓн»»»·ÖÇø¿ÉÌø¹ý´Ë²½Ö裩
¡¡¡¡swapon /dev/hda1
Ïà¹Ø֪ʶµã£º
¡¡¡¡ÕâʱºòÒѾ­ÖÆ×÷ºÃÁ˹¤¾ßÁ´£¬Òò´Ë¿ÉÒÔ²»ÐèÒª½¨Á¢¸ùĿ¼ÏµÄtoolsÁ´½ÓÁË¡£


ÀûÓÃÖ÷ϵͳ¼ÓÔؼ¸¸öÖØÒªµÄÎļþϵͳ£¬Çë×¢ÒâÕâ¸ö²½Öè¶ÔÓÚºóÃæµÄ¹¤×÷¼«ÆäÖØÒª¡£
´úÂë:
[align=left]mount -v --bind /dev $LFS/devmount -vt devpts devpts $LFS/dev/ptsmount -vt tmpfs shm $LFS/dev/shmmount -vt proc proc $LFS/procmount -vt sysfs sysfs $LFS/sys[/align]

Ïà¹Ø֪ʶµã£º
mountÃüÁî¼ÓÔصķÖÇøÔÚÖØÐÂÆô¶¯ºó¾ÍʧЧÁË£¬ËùÒÔÔÚÕâÆäÖÐÖØÐÂÆô¶¯ÔòÐèÒªÖØмÓÔØ¡£


ÕâÀïΪÁË·½±ãʹÓÃÔ´Âë°ü£¬ÎÒ½«¹âÅ̼ÓÔص½Ä¿±êϵͳÀï
mkdir $LFS/cdrom
mount /dev/cdrom $LFS/cdrom
Õâ¸ö²½Öè²»ÊDZØÐëµÄ£¬Èç¹ûÄãÏëʹÓã¬ÄÇôÔÚÖØÐÂÆô¶¯ºó½øÈ빤×÷״̬µÄ²½ÖèÖÐÔÚÏàÓ¦µÄλÖÃÉϼÓÈë¡£
ÕâÀïÓÐÒ»¸ö¸ü¼òµ¥µÄ°ì·¨£¬½«lfs-sourcesÀïÃæËùÓÐÔ´Âë°ü¸´ÖƵ½$LFS/sourcesĿ¼ÖУ¬Õâ²½¶ÔÓÚºóÃæÔÚµÚÁùÕÂʹÓÃÔ´´úÂ뽫·Ç³£·½±ã¡£
´úÂë:
[align=left]cp -a /lfs-sources/* $LFS/sources/[/align]

¹ØÓÚÔö¼ÓÖÐÎÄÏÔʾ¹¦ÄÜ£º
¡¡¡¡ÎªÁË·½±ãÔÚÖÆ×÷ÍêºóµÄϵͳÄܹ»Ö±½ÓÏÔʾÖÐÎÄ£¬ÕâÀï¿ÉÒÔ´ÓÍøÂçÉÏÏÂÔر¾ÈËдµÄÒ»¸öÏÔʾUTF-8±àÂëÎÄ×ÖµÄÄں˲¹¶¡¡£
¡¡¡¡Ê¹ÓÃÏÂÃæµÄÃüÁîÀ´ÏÂÔØ£º
¡¡¡¡¡¡¡¡cd $LFS/sources/
¡¡¡¡¡¡¡¡wget http://zdbr.net.cn/download/utf8-kernel-2.6.22.5-core-1.patch.bz2
¡¡¡¡¡¡¡¡wget http://zdbr.net.cn/download/utf8-kernel-2.6.22.5-fonts-1.patch.bz2
¡¡¡¡½âѹËõÕâÁ½¸ö²¹¶¡
¡¡¡¡¡¡¡¡bunzip2 utf8-kernel-2.6.22.5-core-1.patch.bz2
¡¡¡¡¡¡¡¡bunzip2 utf8-kernel-2.6.22.5-fonts-1.patch.bz2

Chrootµ½Ä¿±êϵͳµÄĿ¼Ï£¬ÒԱ㲻ÊÜÖ÷ϵͳµÄÓ°ÏìÀ´ÖÆ×÷Ä¿±êϵͳ
´úÂë:
[align=left]chroot "$LFS" /tools/bin/env -i \HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \/tools/bin/bash --login +h[/align]

×¢Ò⣺Õâ¸öʱºòÄãµÄÌáʾ·û»áÊÇ¡°I have no name!¡±£¬Ã»ÓйØϵ¼ÌÐøÎÒÃǵŤ×÷ºÜ¿ì¾Í¿ÉÒÔÕý³£ÁË¡£


Õâ¸öʱºòÈç¹ûÄã¹Ø»ú»òÖØÐÂÆô¶¯£¬ÄÇôÖØпª»úºó»Øµ½¹¤×÷״̬µÄ²½ÖèÊÇ£º
¡¡¡¡1.ÖØÐÂÆô¶¯¼ÆËã»ú£¬²¢´ÓLiveCDÆô¶¯
¡¡¡¡2.¼ÓÔØ·ÖÇø
¡¡¡¡export LFS=/mnt/lfs
¡¡¡¡mkdir -pv $LFS
¡¡¡¡mount /dev/hda2 $LFS
¡¡¡¡3.¼ÓÔؽ»»»·ÖÇø£¨Èç¹û²»ÏëÓý»»»·ÖÇø»òÕßûÓн»»»·ÖÇø¿ÉÌø¹ý´Ë²½Ö裩
¡¡¡¡swapon /dev/hda1
¡¡¡¡4.¼ÓÔرØÒªµÄÎļþϵͳ
¡¡¡¡mount -v --bind /dev $LFS/dev
¡¡¡¡mount -vt devpts devpts $LFS/dev/pts
¡¡¡¡mount -vt tmpfs shm $LFS/dev/shm
¡¡¡¡mount -vt proc proc $LFS/proc
¡¡¡¡mount -vt sysfs sysfs $LFS/sys
¡¡¡¡5.Chrootµ½Ä¿±êϵͳÏÂ
¡¡¡¡chroot "$LFS" /tools/bin/env -i \
¡¡¡¡HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
¡¡¡¡ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
¡¡¡¡/tools/bin/bash --login +h


½¨Á¢Ä¿±êϵͳµÄĿ¼½á¹¹
´úÂë:
[align=left]mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}install -dv -m 0750 /rootinstall -dv -m 1777 /tmp /var/tmpmkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}mkdir -pv /usr/{,local/}share/{doc,info,locale,man}mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}mkdir -pv /usr/{,local/}share/man/man{1..8}for dir in /usr /usr/local; doln -sv share/{man,doc,info} $dirdonemkdir -pv /var/{lock,log,mail,run,spool}mkdir -pv /var/{opt,cache,lib/{misc,locate},local}[/align]


´´½¨¼¸¸ö±ØÒªµÄÁ´½Ó£¬ÒòΪÔÚÄ¿±êϵͳµÄ±àÒë¹ý³ÌÖУ¬²¿·Ö±àÒë³ÌÐò»áÓþø¶Ô·¾¶À´Ñ°ÕÒÃüÁî»òÎļþ¡£
´úÂë:
[align=left]ln -sv /tools/bin/{bash,cat,echo,grep,pwd,stty} /binln -sv /tools/bin/perl /usr/binln -sv /tools/lib/libgcc_s.so{,.1} /usr/libln -sv /tools/lib/libstdc++.so{,.6} /usr/libln -sv bash /bin/shtouch /etc/mtab[/align]


´´½¨root¼°nobodyÓû§ºÍ±ØÒªµÄ×é
´úÂë:
[align=left]cat > /etc/passwd << "EOF"root:x:0:0:root:/root:/bin/bashnobody:x:99:99:Unprivileged User:/dev/null:/bin/falseEOFcat > /etc/group << "EOF"root:x:0:bin:x:1:sys:x:2:kmem:x:3:tty:x:4:tape:x:5:daemon:x:6:floppy:x:7:disk:x:8:lp:x:9:dialout:x:10:audio:x:11:video:x:12:utmp:x:13:usb:x:14:cdrom:x:15:mail:x:34:nogroup:x:99:EOF[/align]


ÖØмÓÔØbash£¬ÒÔʹrootÓû§ÆðЧ£¬ÕâÑùÇ°ÃæµÄÌáʾ·û¾Í²»»áÊÇ¡°I have no name!¡±
´úÂë:
[align=left]exec /tools/bin/bash --login +h[/align]


´´½¨ºÍÉèÖü¸¸öÁÙʱÎļþºÍÈÕÖ¾Îļþ¡£
´úÂë:
[align=left]touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}chgrp -v utmp /var/run/utmp /var/log/lastlogchmod -v 664 /var/run/utmp /var/log/lastlog[/align]


µ½Ä¿Ç°ÎªÖ¹£¬´´½¨Ä¿±êϵͳµÄ×¼±¸¹¤×÷ÒÔ»ù±¾Íê³É£¬ÏÂÃæ¾ÍÒª¿ªÊ¼Ä¿±êϵͳµÄÈí¼þ°ü°²×°ÁË¡£

Ê×ÏȽøÈëµ½Ô´ÂëĿ¼Ï¡£
´úÂë:
[align=left]cd /sources[/align]

£¨´ËÇ°ÒѾ­½«LFSÐèÒªµÄÔ´Âë°ü¼ÓÔص½ÁË/cdromÏ£¬Òò´ËºóÃæµÄÃüÁ´Ó/cdrom/lfs-sourcesĿ¼Ï½â³ö£¬Èç¹ûÄ㽫ԴÂë°üÖ±½Ó¸´ÖƵ½ÁËsourcesĿ¼Ï»ò±ðµÄʲôĿ¼Ï£¬ÔòÒªÏàÓ¦µÄÐÞ¸ÄÏÂÃæµÄÃüÁ
export LFS=/cdrom/lfs-sources
Èç¹û֮ǰÊǽ«ËùÓÐÔ´Âë°ü¸´ÖƵ½sourcesϵģ¬ÔòÖ´ÐÐ
´úÂë:
[align=left]export LFS=/sources[/align]


´ÓÏÖÔÚ¿ªÊ¼Ò»Ö±µ½µÚÁùÕµÄStripping Again֮ǰ£¬Õâ¸ö½×¶ÎÈç¹ûÄã¹Ø»ú»òÖØÐÂÆô¶¯£¬ÄÇôÖØпª»úºó»Øµ½¹¤×÷״̬µÄ²½ÖèÊÇ£º
¡¡¡¡1.ÖØÐÂÆô¶¯¼ÆËã»ú£¬²¢´ÓLiveCDÆô¶¯
¡¡¡¡2.¼ÓÔØ·ÖÇø
¡¡¡¡export LFS=/mnt/lfs
¡¡¡¡mkdir -pv $LFS
¡¡¡¡mount /dev/hda2 $LFS
¡¡¡¡3.¼ÓÔؽ»»»·ÖÇø£¨Èç¹û²»ÏëÓý»»»·ÖÇø»òÕßûÓн»»»·ÖÇø¿ÉÌø¹ý´Ë²½Ö裩
¡¡¡¡swapon /dev/hda1
¡¡¡¡4.¼ÓÔرØÒªµÄÎļþϵͳ
¡¡¡¡mount -v --bind /dev $LFS/dev
¡¡¡¡mount -vt devpts devpts $LFS/dev/pts
¡¡¡¡mount -vt tmpfs shm $LFS/dev/shm
¡¡¡¡mount -vt proc proc $LFS/proc
¡¡¡¡mount -vt sysfs sysfs $LFS/sys
¡¡¡¡5.Chrootµ½Ä¿±êϵͳÏÂ
¡¡¡¡chroot "$LFS" /tools/bin/env -i \
¡¡¡¡HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
¡¡¡¡ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
¡¡¡¡/bin/bash --login +h
¡¡¡¡6.½øÈë±àÒëĿ¼
¡¡¡¡cd /sources
¡¡¡¡export LFS=/sources


Linux-2.6.22.5
´úÂë:
[align=left]tar xvf $LFS/linux-2.6.22.5.tar.bz2cd linux-2.6.22.5sed -i '/scsi/d' include/Kbuildmake mrpropermake headers_checkmake INSTALL_HDR_PATH=dest headers_installcp -rv dest/include/* /usr/includecd ..rm -rf linux-2.6.22.5[/align]

Man-pages-2.63
´úÂë:
[align=left]tar xvf $LFS/man-pages-2.63.tar.bz2cd man-pages-2.63make installcd ..rm -rf man-pages-2.63[/align]

man-pagesµÄ°æ±¾¿ÉÒÔʹÓøüеİ汾¡£


Glibc-2.5.1
ÔÚ½øÐÐ֮ǰÇë¼ì²éÒ»ÏÂÊÇ·ñglibc-2.5.1ºÍglibc-buildÕâÁ½¸öĿ¼ÒѾ­±»É¾³ý£¬Èç¹ûûÓÐɾ³ýÇëɾ³ýºóÔÚ¼ÌÐø¡£
´úÂë:
[align=left]tar xvf $LFS/glibc-2.5.1.tar.bz2cd glibc-2.5.1tar -xvf $LFS/glibc-libidn-2.5.1.tar.gzmv glibc-libidn-2.5.1 libidnsed -i '/vi_VN.TCVN/d' localedata/SUPPORTEDsed -i \'s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \ scripts/test-installation.plsed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.inmkdir -v ../glibc-buildcd ../glibc-build../glibc-2.5.1/configure --prefix=/usr \--disable-profile --enable-add-ons \--enable-kernel=2.6.0 --libexecdir=/usr/lib/glibcmakemake -k check 2>&1 | tee glibc-check-loggrep Error glibc-check-logtouch /etc/ld.so.confmake installmake localedata/install-locales[/align]

¡¡¡¡make localedata/install-locales½«°²×°È«²¿µÄlocale£¬Èç¹ûÄã²»Ïë×°Õâô¶àlocaleµÄ»°¾ÍÓÃlocaledefÃüÁîÀ´°²×°£¬LFSÊÖ²áÉÏÓÐÀý×Ó£¬Èç¹û½öÏë¼ÓÈëÖÐÎĵÄlocale£¬¾ÍÓÃ
¡¡¡¡¡¡¡¡mkdir -pv /usr/lib/locale
¡¡¡¡¡¡¡¡localedef -i zh_CN -f GB18030 zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_CN -f GBK zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_CN -f UTF-8 zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_CN -f GB2312 zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_HK -f UTF-8 zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_HK -f BIG5-HKSCS zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_TW -f EUC-TW zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_TW -f UTF-8 zh_CN
¡¡¡¡¡¡¡¡localedef -i zh_TW -f BIG5 zh_CN
½¨Á¢¼¸¸öÖØÒªÎļþ£º
´úÂë:
[align=left]cat > /etc/nsswitch.conf << "EOF"# Begin /etc/nsswitch.confpasswd: filesgroup: filesshadow: fileshosts: files dnsnetworks: filesprotocols: filesservices: filesethers: filesrpc: files# End /etc/nsswitch.confEOFcp -v --remove-destination /usr/share/zoneinfo/Asia/Shanghai /etc/localtimecat > /etc/ld.so.conf << "EOF"/usr/local/lib/opt/libEOF[/align]

ɾ³ý±àÒëĿ¼
´úÂë:
[align=left]cd ..rm -rf glibc-buildrm -rf glibc-2.5.1[/align]

Ïà¹Ø֪ʶ£º
¡¡¡¡glibcµÄ²âÊԱȽÏÈÝÒ׳öÏÖ´íÎ󣬱ÈÈç»úÆ÷Âý¾ÍÓпÉÄܳöÏÖ³¬Ê±µÄ´íÎ󣬻¹ÓÐһЩÄÜÒýÆð´íÎóµÄLFSÊÖ²áÉÏÓÐËùÌá¼°£¬Ïñ³¬Ê±ÕâÖÖ´íÎóÓÐʱºòºÜÄѱÜÃ⣬¾ÍÌø¹ýÈ¥°É¡£


µ÷Õû¹¤¾ßÁ´
´úÂë:
[align=left]mv -v /tools/bin/{ld,ld-old}mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}mv -v /tools/bin/{ld-new,ld}ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld[/align]

µ÷ÕûspecsÎļþ£º
´úÂë:
[align=left]gcc -dumpspecs | sed \-e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \-e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \-e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \`dirname $(gcc --print-libgcc-file-name)`/specs[/align]

²âÊÔ¹¤¾ßÁ´ÊÇ·ñ±»µ÷Õû³É¹¦
echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep '/lib'
Èç¹ûÏÔʾ[Requesting program interpreter: /lib/ld-linux.so.2]±íʾµ÷Õû³É¹¦£¬¶¯Ì¬¿âÒѾ­Á¬½Óµ½ÁËÄ¿±êϵͳµÄ/libÏ¡£
grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡/usr/lib/crt1.o succeeded
¡¡¡¡/usr/lib/crti.o succeeded
¡¡¡¡/usr/lib/crtn.o succeeded
grep -B1 '^ /usr/include' dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡#include <...> search starts here:
¡¡¡¡ /usr/include
grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
Ó¦¸ÃÏÔʾ
¡¡¡¡SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
¡¡¡¡SEARCH_DIR("/usr/lib")
¡¡¡¡SEARCH_DIR("/lib");
grep "/lib/libc.so.6 " dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡attempt to open /lib/libc.so.6 succeeded
grep found dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡found ld-linux.so.2 at /lib/ld-linux.so.2
Èç¹ûÉÏÃæ¾ùÏÔʾÕý³££¬ÄÇô±íÃ÷¹¤¾ßÁ´µ÷Õû³É¹¦£¬¿ÉÒÔɾ³ý²âÊÔÎļþÁË
rm -v dummy.c a.out dummy.log


Binutils-2.17
´úÂë:
[align=left]tar xvf $LFS/binutils-2.17.tar.bz2mkdir binutils-buildcd binutils-build../binutils-2.17/configure --prefix=/usr --enable-sharedmake tooldir=/usr[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀï²âÊÔͳ¼Æ¿ÉÄÜ»á³öÏÖ¸ö±ðʧ°Ü¡£
´úÂë:
[align=left]make tooldir=/usr installcp -v ../binutils-2.17/include/libiberty.h /usr/includecd ..rm -rf binutils-buildrm -rf binutils-2.17[/align]


GCC-4.1.2
´úÂë:
[align=left]tar xvf $LFS/gcc-4.1.2.tar.bz2cd gcc-4.1.2sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.insed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.insed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.insed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.inmkdir -v ../gcc-buildcd ../gcc-build../gcc-4.1.2/configure --prefix=/usr \--libexecdir=/usr/lib --enable-shared \--enable-threads=posix --enable-__cxa_atexit \--enable-clocale=gnu --enable-languages=c,c++make[/align]

²âÊÔ£º
´úÂë:
[align=left]make -k check[/align]

ÕâÀïcheckʱ¼ä±È½Ï³¤£¬¿ÉÄÜ»áÓÐһЩ´íÎó·¢Éú
´úÂë:
[align=left]make installln -sv ../usr/bin/cpp /libln -sv gcc /usr/bin/cccd ..rm -rf gcc-buildrm -rf gcc-4.1.2[/align]

ÖØвâÊÔ¹¤¾ßÁ´ÊÇ·ñÕýÈ·£¬È·¶¨GCCÊÇ·ñ°²×°ÕýÈ·
echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep 'lib'
Èç¹ûÏÔʾ[Requesting program interpreter: /lib/ld-linux.so.2]±íʾÁ´½ÓλÖÃÕýÈ·£¬¶¯Ì¬¿âÒѾ­Á¬½Óµ½ÁËÄ¿±êϵͳµÄ/libÏ¡£
grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../crt1.o succeeded
¡¡¡¡/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../crti.o succeeded
¡¡¡¡/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../crtn.o succeeded
grep -B3 '^ /usr/include' dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡#include <...> search starts here:
¡¡¡¡ /usr/local/include
¡¡¡¡ /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include
¡¡¡¡ /usr/include
grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
Ó¦¸ÃÏÔʾ
¡¡¡¡SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
¡¡¡¡SEARCH_DIR("/usr/local/lib")
¡¡¡¡SEARCH_DIR("/lib")
¡¡¡¡SEARCH_DIR("/usr/lib");
grep "/lib/libc.so.6 " dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡attempt to open /lib/libc.so.6 succeeded
grep found dummy.log
Ó¦¸ÃÏÔʾ
¡¡¡¡found ld-linux.so.2 at /lib/ld-linux.so.2
Èç¹ûÉÏÃæ¾ùÏÔʾÕý³££¬ÄÇô±íÃ÷¹¤¾ßÁ´Õý³££¬¿ÉÒÔɾ³ý²âÊÔÎļþÁË
rm -v dummy.c a.out dummy.log


Berkeley DB-4.5.20
´úÂë:
[align=left]tar xvf $LFS/db-4.5.20.tar.gzcd db-4.5.20patch -Np1 -i $LFS/db-4.5.20-fixes-1.patchcd build_unix../dist/configure --prefix=/usr --enable-compat185 --enable-cxxmakemake docdir=/usr/share/doc/db-4.5.20 installchown -Rv root:root /usr/share/doc/db-4.5.20cd /sourcesrm -rf db-4.5.20[/align]


Sed-4.1.5
´úÂë:
[align=left]tar xvf $LFS/sed-4.1.5.tar.gzcd sed-4.1.5./configure --prefix=/usr --bindir=/bin --enable-htmlmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf sed-4.1.5[/align]


E2fsprogs-1.40.2
´úÂë:
[align=left]tar xvf $LFS/e2fsprogs-1.40.2.tar.gzcd e2fsprogs-1.40.2sed -i -e 's@/bin/rm@/tools&@' lib/blkid/test_probe.inmkdir -v buildcd build../configure --prefix=/usr --with-root-prefix="" \--enable-elf-shlibsmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installmake install-libscd ../..rm -rf e2fsprogs-1.40.2[/align]


Coreutils-6.9
´úÂë:
[align=left]tar xvf $LFS/coreutils-6.9.tar.bz2cd coreutils-6.9patch -Np1 -i $LFS/coreutils-6.9-uname-1.patchpatch -Np1 -i $LFS/coreutils-6.9-suppress_uptime_kill_su-1.patchpatch -Np1 -i $LFS/coreutils-6.9-i18n-1.patchchmod +x tests/sort/sort-mb-tests./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make NON_ROOT_USERNAME=nobody check-rootecho "dummy:x:1000:nobody" >> /etc/groupsu-tools nobody -s /bin/bash -c "make RUN_EXPENSIVE_TESTS=yes check"[/align]

Õâ¸ö²âÊÔÓ¦¸ÃÄÜÕý³£½áÊø¡£
ɾ³ý²âÊÔÓÃÊý¾Ý£º
´úÂë:
[align=left]sed -i '/dummy/d' /etc/group[/align]

´úÂë:
[align=left]make installmv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /binmv -v /usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,readlink,rm} /binmv -v /usr/bin/{rmdir,stty,sync,true,uname} /binmv -v /usr/bin/chroot /usr/sbinmv -v /usr/bin/{head,sleep,nice} /bincd ..rm -rf coreutils-6.9[/align]


Iana-Etc-2.20
´úÂë:
[align=left]tar xvf $LFS/iana-etc-2.20.tar.bz2cd iana-etc-2.20makemake installcd ..rm -rf iana-etc-2.20[/align]


M4-1.4.10
´úÂë:
[align=left]tar xvf $LFS/m4-1.4.10.tar.bz2cd m4-1.4.10./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf m4-1.4.10[/align]


Bison-2.3
´úÂë:
[align=left]tar xvf $LFS/bison-2.3.tar.bz2cd bison-2.3./configure --prefix=/usrecho '#define YYENABLE_NLS 1' >> config.hmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf bison-2.3[/align]


Ncurses-5.6
´úÂë:
[align=left]tar xvf $LFS/ncurses-5.6.tar.gzcd ncurses-5.6patch -Np1 -i $LFS/ncurses-5.6-coverity_fixes-1.patch./configure --prefix=/usr --with-shared --without-debug --enable-widecmakemake installchmod -v 644 /usr/lib/libncurses++w.amv -v /usr/lib/libncursesw.so.5* /libln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.sofor lib in curses ncurses form panel menu ; do \rm -vf /usr/lib/lib${lib}.so ; \echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \doneln -sfv libncurses++w.a /usr/lib/libncurses++.arm -vf /usr/lib/libcursesw.soecho "INPUT(-lncursesw)" >/usr/lib/libcursesw.soln -sfv libncurses.so /usr/lib/libcurses.soln -sfv libncursesw.a /usr/lib/libcursesw.aln -sfv libncurses.a /usr/lib/libcurses.acd ..rm -rf ncurses-5.6[/align]


Procps-3.2.7
´úÂë:
[align=left]tar xvf $LFS/procps-3.2.7.tar.gzcd procps-3.2.7makemake installcd ..rm -rf procps-3.2.7[/align]


Libtool-1.5.24
´úÂë:
[align=left]tar xvf $LFS/libtool-1.5.24.tar.gzcd libtool-1.5.24./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf libtool-1.5.24[/align]


Perl-5.8.8
´úÂë:
[align=left]tar xvf $LFS/perl-5.8.8.tar.bz2cd perl-5.8.8echo "127.0.0.1 localhost $(hostname)" > /etc/hosts./configure.gnu --prefix=/usr \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ -Dpager="/usr/bin/less -isR"make[/align]

²âÊÔ£º
´úÂë:
[align=left]make test[/align]

ÕâÀïtest²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf perl-5.8.8[/align]


Readline-5.2
´úÂë:
[align=left]tar xvf $LFS/readline-5.2.tar.gzcd readline-5.2sed -i '/MV.*old/d' Makefile.insed -i '/{OLDSUFF}/c:' support/shlib-installpatch -Np1 -i $LFS/readline-5.2-fixes-3.patch./configure --prefix=/usr --libdir=/libmake SHLIB_XLDFLAGS=-lncursesmake installmv -v /lib/lib{readline,history}.a /usr/librm -v /lib/lib{readline,history}.soln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.soln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.socd ..rm -rf readline-5.2[/align]


Zlib-1.2.3
´úÂë:
[align=left]tar xvf $LFS/zlib-1.2.3.tar.gzcd zlib-1.2.3./configure --prefix=/usr --shared --libdir=/libmake[/align]

²âÊÔ¶¯Ì¬Á´½Ó¿â£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installrm -v /lib/libz.soln -sfv ../../lib/libz.so.1.2.3 /usr/lib/libz.somake clean./configure --prefix=/usrmake[/align]

²âÊÔ¾²Ì¬¿â
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installchmod -v 644 /usr/lib/libz.acd ..rm -rf zlib-1.2.3[/align]


Autoconf-2.61
´úÂë:
[align=left]tar xvf $LFS/autoconf-2.61.tar.bz2cd autoconf-2.61./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀï²âÊÔʱ¼ä±È½Ï³¤£¬µ«²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf autoconf-2.61[/align]


Automake-1.10
´úÂë:
[align=left]tar xvf $LFS/automake-1.10.tar.bz2cd automake-1.10./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀï²âÊÔʱ¼ä±È½Ï³¤£¬¿ÉÄÜ»áÓÐ3¸ö²âÊÔʧ°Ü£¬µ«ÄÜ˳Àû½áÊø¡£
´úÂë:
[align=left]make installcd ..rm -rf automake-1.10[/align]


Bash-3.2
´úÂë:
[align=left]tar xvf $LFS/bash-3.2.tar.gzcd bash-3.2tar -xvf $LFS/bash-doc-3.2.tar.gz &&sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-3.2|" Makefile.inpatch -Np1 -i $LFS/bash-3.2-fixes-5.patch./configure --prefix=/usr --bindir=/bin --without-bash-malloc --with-installed-readlinemake[/align]

²âÊÔ£º
´úÂë:
[align=left]sed -i 's/LANG/LC_ALL/' tests/intl.testssed -i 's@tests@& chown -Rv nobody ./su-tools nobody -s /bin/bash -c "make tests"[/align]

ÕâÀïcheck²»»áÓÐ´í£¬¿ÉÄÜ»áÓв»ÉÙ¾¯¸æ¡£
´úÂë:
[align=left]make installcd ..rm -rf bash-3.2[/align]

Ó¦ÓøձàÒëºÃµÄ/bin/bash£º
´úÂë:
[align=left]exec /bin/bash --login +h[/align]


Bzip2-1.0.4
´úÂë:
[align=left]tar xvf $LFS/bzip2-1.0.4.tar.gzcd bzip2-1.0.4patch -Np1 -i $LFS/bzip2-1.0.4-install_docs-1.patchmake -f Makefile-libbz2_somake cleanmakemake PREFIX=/usr installcp -v bzip2-shared /bin/bzip2cp -av libbz2.so* /libln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.sorm -v /usr/bin/{bunzip2,bzcat,bzip2}ln -sv bzip2 /bin/bunzip2ln -sv bzip2 /bin/bzcatcd ..rm -rf bzip2-1.0.4[/align]


Diffutils-2.8.1
´úÂë:
[align=left]tar xvf $LFS/diffutils-2.8.1.tar.gzcd diffutils-2.8.1patch -Np1 -i $LFS/diffutils-2.8.1-i18n-1.patchtouch man/diff.1./configure --prefix=/usrmakemake installcd ..rm -rf diffutils-2.8.1[/align]


File-4.21
´úÂë:
[align=left]tar xvf $LFS/file-4.21.tar.gzcd file-4.21./configure --prefix=/usrmakemake installcd ..rm -rf file-4.21[/align]


Findutils-4.2.31
´úÂë:
[align=left]tar xvf $LFS/findutils-4.2.31.tar.gzcd findutils-4.2.31./configure --prefix=/usr --libexecdir=/usr/lib/findutils \--localstatedir=/var/lib/locatemake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installmv -v /usr/bin/find /binsed -i -e 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedbcd ..rm -rf findutils-4.2.31[/align]


Flex-2.5.33
´úÂë:
[align=left]tar xvf $LFS/flex-2.5.33.tar.bz2cd flex-2.5.33./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installln -sv libfl.a /usr/lib/libl.a[/align]

´´½¨Ò»¸ölexµÄÃüÁî¡£
´úÂë:
[align=left]cat > /usr/bin/lex << "EOF"#!/bin/sh# Begin /usr/bin/lexexec /usr/bin/flex -l "$@"# End /usr/bin/lexEOFchmod -v 755 /usr/bin/lex[/align]

´úÂë:
[align=left]cd ..rm -rf flex-2.5.33[/align]


GRUB-0.97
´úÂë:
[align=left]tar xvf $LFS/grub-0.97.tar.gzcd grub-0.97patch -Np1 -i $LFS/grub-0.97-disk_geometry-1.patch./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installmkdir -v /boot/grubcp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grubcd ..rm -rf grub-0.97[/align]


Gawk-3.1.5
´úÂë:
[align=left]tar xvf $LFS/gawk-3.1.5.tar.bz2cd gawk-3.1.5patch -Np1 -i $LFS/gawk-3.1.5-segfault_fix-1.patch./configure --prefix=/usr --libexecdir=/usr/libcat >> config.h << "EOF"#define HAVE_LANGINFO_CODESET 1#define HAVE_LC_MESSAGES 1EOFmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf gawk-3.1.5[/align]


Gettext-0.16.1
´úÂë:
[align=left]tar xvf $LFS/gettext-0.16.1.tar.gzcd gettext-0.16.1./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheckµÄʱ¼ä±È½Ï³¤£¬µ«²»»áÓÐ´í¡£
´úÂë:
[align=left]make installcd ..rm -rf gettext-0.16.1[/align]


Grep-2.5.1a
´úÂë:
[align=left]tar xvf $LFS/grep-2.5.1a.tar.bz2cd grep-2.5.1apatch -Np1 -i $LFS/grep-2.5.1a-redhat_fixes-2.patchchmod +x tests/fmbtest.sh./configure --prefix=/usr --bindir=/binmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf grep-2.5.1a[/align]


Groff-1.18.1.4
´úÂë:
[align=left]tar xvf $LFS/groff-1.18.1.4.tar.gzcd groff-1.18.1.4patch -Np1 -i $LFS/groff-1.18.1.4-debian_fixes-1.patchsed -i -e 's/2010/002D/' -e 's/2212/002D/' \-e 's/2018/0060/' -e 's/2019/0027/' font/devutf8/R.protoPAGE=A4 ./configure --prefix=/usr --enable-multibytemakemake installln -sv eqn /usr/bin/geqnln -sv tbl /usr/bin/gtblcd ..rm -rf groff-1.18.1.4[/align]


Gzip-1.3.12
´úÂë:
[align=left]tar xvf $LFS/gzip-1.3.12.tar.gzcd gzip-1.3.12./configure --prefix=/usr --bindir=/binmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installmv -v /bin/{gzexe,uncompress,zcmp,zdiff,zegrep} /usr/binmv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bincd ..rm -rf gzip-1.3.12[/align]


Inetutils-1.5
´úÂë:
[align=left]tar xvf $LFS/inetutils-1.5.tar.gzcd inetutils-1.5patch -Np1 -i $LFS/inetutils-1.5-no_server_man_pages-2.patch./configure --prefix=/usr --libexecdir=/usr/sbin \--sysconfdir=/etc --localstatedir=/var \--disable-ifconfig --disable-logger --disable-syslogd \--disable-whois --disable-serversmakemake installmv -v /usr/bin/ping /bincd ..rm -rf inetutils-1.5[/align]


IPRoute2-2.6.20-070313
´úÂë:
[align=left]tar xvf $LFS/iproute2-2.6.20-070313.tar.bz2cd iproute-2.6.20-070313sed -i -e '/tc-bfifo.8/d' -e '/tc-pfifo.8/s/pbfifo/bfifo/' Makefilemake SBINDIR=/sbinmake SBINDIR=/sbin installmv -v /sbin/arpd /usr/sbincd ..rm -rf iproute-2.6.20-070313[/align]


Kbd-1.12
´úÂë:
[align=left]tar xvf $LFS/kbd-1.12.tar.bz2cd kbd-1.12patch -Np1 -i $LFS/kbd-1.12-backspace-1.patchpatch -Np1 -i $LFS/kbd-1.12-gcc4_fixes-1.patch./configure --datadir=/lib/kbdmakemake installmv -v /usr/bin/{kbd_mode,openvt,setfont} /bincd ..rm -rf kbd-1.12[/align]


Less-406
´úÂë:
[align=left]tar xvf $LFS/less-406.tar.gzcd less-406./configure --prefix=/usr --sysconfdir=/etcmakemake installcd ..rm -rf less-406[/align]


Make-3.81
´úÂë:
[align=left]tar xvf $LFS/make-3.81.tar.bz2cd make-3.81./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installcd ..rm -rf make-3.81[/align]


Man-DB-2.4.4
´úÂë:
[align=left]tar xvf $LFS/man-db-2.4.4.tar.gzcd man-db-2.4.4mv man/de{_DE.88591,}mv man/es{_ES.88591,}mv man/it{_IT.88591,}sed -i 's,\*_\*,??,' man/Makefile.insed -i -e '\%\t/usr/man%d' -e '\%\t/usr/local/man%d' src/man_db.conf.incat >> include/manconfig.h.in << "EOF"#define WEB_BROWSER "exec /usr/bin/lynx"#define COL "/usr/bin/col"#define VGRIND "/usr/bin/vgrind"#define GRAP "/usr/bin/grap"EOFpatch -Np1 -i $LFS/man-db-2.4.4-fixes-1.patch./configure --prefix=/usr --enable-mb-groff --disable-setuidmakemake install[/align]

´´½¨Ò»¸öÓÃÓÚת»»manÊÖ²á±àÂëµÄ½Å±¾
´úÂë:
[align=left]cat >> convert-mans << "EOF"#!/bin/sh -eFROM="$1"TO="$2"shift ; shiftwhile [ $# -gt 0 ]do FILE="$1" shift iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv mv .tmp.iconv "$FILE"doneEOF[/align]

´úÂë:
[align=left]install -m755 convert-mans /usr/bincd ..rm -rf man-db-2.4.4[/align]


Mktemp-1.5
´úÂë:
[align=left]tar xvf $LFS/mktemp-1.5.tar.gzcd mktemp-1.5patch -Np1 -i $LFS/mktemp-1.5-add_tempfile-3.patch./configure --prefix=/usr --with-libcmakemake installmake install-tempfilecd ..rm -rf mktemp-1.5[/align]


Module-Init-Tools-3.2.2
´úÂë:
[align=left]tar xvf $LFS/module-init-tools-3.2.2.tar.bz2cd module-init-tools-3.2.2patch -Np1 -i $LFS/module-init-tools-3.2.2-modprobe-1.patch./configuremake checkmake distclean./configure --prefix=/ --enable-zlibmakemake INSTALL=install installcd ..rm -rf module-init-tools-3.2.2[/align]


Patch-2.5.4
´úÂë:
[align=left]tar xvf $LFS/patch-2.5.4.tar.gzcd patch-2.5.4./configure --prefix=/usrmakemake installcd ..rm -rf patch-2.5.4[/align]


Psmisc-22.5
´úÂë:
[align=left]tar xvf $LFS/psmisc-22.5.tar.gzcd psmisc-22.5./configure --prefix=/usr --exec-prefix=""makemake installmv -v /bin/pstree* /usr/binln -sv killall /bin/pidofcd ..rm -rf psmisc-22.5[/align]


Shadow-4.0.18.1
´úÂë:
[align=left]tar xvf $LFS/shadow-4.0.18.1.tar.bz2cd shadow-4.0.18.1patch -Np1 -i $LFS/shadow-4.0.18.1-useradd_fix-2.patch./configure --libdir=/lib --sysconfdir=/etc --enable-shared --without-selinuxsed -i 's/groups$(EXEEXT) //' src/Makefilefind man -name Makefile -exec sed -i 's/groups\.1 / /' {} \;sed -i -e 's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \-e 's@/var/spool/mail@/var/mail@' etc/login.defsmakemake installmv -v /usr/bin/passwd /binmv -v /lib/libshadow.*a /usr/librm -v /lib/libshadow.soln -sfv ../../lib/libshadow.so.0 /usr/lib/libshadow.so[/align]

ÅäÖÃÔö¼ÓÓû§µÄĬÈÏÉèÖá£
´úÂë:
[align=left]pwconvgrpconvuseradd -D -b /homesed -i 's/yes/no/' /etc/default/useradd[/align]

ÉèÖÃrootÓû§ÃÜÂ룺
´úÂë:
[align=left]passwd root[/align]

Ò»¶¨ÒªÉèÖÃrootµÄÃÜÂ룬·ñÔòÖØÐÂÆô¶¯ºóÎÞ·¨µÇ½¡£
´úÂë:
[align=left]cd ..rm -rf shadow-4.0.18.1[/align]


Sysklogd-1.4.1
´úÂë:
[align=left]tar xvf $LFS/sysklogd-1.4.1.tar.gzcd sysklogd-1.4.1patch -Np1 -i $LFS/sysklogd-1.4.1-fixes-2.patchpatch -Np1 -i $LFS/sysklogd-1.4.1-8bit-1.patchmakemake install[/align]

ÉèÖÃsyslogµÄÅäÖÃÎļþ
´úÂë:
[align=left]cat > /etc/syslog.conf << "EOF"# Begin /etc/syslog.confauth,authpriv.* -/var/log/auth.log*.*;auth,authpriv.none -/var/log/sys.logdaemon.* -/var/log/daemon.logkern.* -/var/log/kern.logmail.* -/var/log/mail.loguser.* -/var/log/user.log*.emerg *# End /etc/syslog.confEOF[/align]

´úÂë:
[align=left]cd ..rm -rf sysklogd-1.4.1[/align]


Sysvinit-2.86
´úÂë:
[align=left]tar xvf $LFS/sysvinit-2.86.tar.gzcd sysvinit-2.86sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.cmake -C srcmake -C src install[/align]

ÉèÖÃÆô¶¯ÅäÖÃÎļþ¡£
´úÂë:
[align=left]cat > /etc/inittab << "EOF"# Begin /etc/inittabid:3:initdefault:si::sysinit:/etc/rc.d/init.d/rc sysinitl0:0:wait:/etc/rc.d/init.d/rc 0l1:S1:wait:/etc/rc.d/init.d/rc 1l2:2:wait:/etc/rc.d/init.d/rc 2l3:3:wait:/etc/rc.d/init.d/rc 3l4:4:wait:/etc/rc.d/init.d/rc 4l5:5:wait:/etc/rc.d/init.d/rc 5l6:6:wait:/etc/rc.d/init.d/rc 6ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r nowsu:S016:once:/sbin/sulogin1:2345:respawn:/sbin/agetty tty1 96002:2345:respawn:/sbin/agetty tty2 96003:2345:respawn:/sbin/agetty tty3 96004:2345:respawn:/sbin/agetty tty4 96005:2345:respawn:/sbin/agetty tty5 96006:2345:respawn:/sbin/agetty tty6 9600# End /etc/inittabEOF[/align]

´úÂë:
[align=left]cd ..rm -rf sysvinit-2.86[/align]


Tar-1.18
´úÂë:
[align=left]tar xvf $LFS/tar-1.18.tar.bz2cd tar-1.18./configure --prefix=/usr --bindir=/bin --libexecdir=/usr/sbinmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheckÓ¦ÄÜͨ¹ý
´úÂë:
[align=left]make installcd ..rm -rf tar-1.18[/align]


Texinfo-4.9
´úÂë:
[align=left]tar xvf $LFS/texinfo-4.9.tar.bz2cd texinfo-4.9patch -Np1 -i $LFS/texinfo-4.9-multibyte-1.patchpatch -Np1 -i $LFS/texinfo-4.9-tempfile_fix-1.patch./configure --prefix=/usrmake[/align]

²âÊÔ£º
´úÂë:
[align=left]make check[/align]

ÕâÀïcheck²»»áÓдí
´úÂë:
[align=left]make installmake TEXMF=/usr/share/texmf install-tex[/align]

´úÂë:
[align=left]cd /usr/share/inform dirfor f in *do install-info $f dir 2>/dev/nulldone[/align]

´úÂë:
[align=left]cd /sourcesrm -rf texinfo-4.9[/align]


Udev-113
´úÂë:
[align=left]tar xvf $LFS/udev-113.tar.bz2cd udev-113tar -xvf $LFS/udev-config-6.3.tar.bz2install -dv /lib/{firmware,udev/devices/{pts,shm}}mknod -m0666 /lib/udev/devices/null c 1 3ln -sv /proc/self/fd /lib/udev/devices/fdln -sv /proc/self/fd/0 /lib/udev/devices/stdinln -sv /proc/self/fd/1 /lib/udev/devices/stdoutln -sv /proc/self/fd/2 /lib/udev/devices/stderrln -sv /proc/kcore /lib/udev/devices/coremake EXTRAS="`echo extras/*/`"[/align]

²âÊÔ£º
´úÂë:
[align=left]make test[/align]

ÕâÀïtest¿ÉÄÜÓдíÎ󣬲»±ØÀí»á¡£
´úÂë:
[align=left]make DESTDIR=/ EXTRAS="`echo extras/*/`" installcp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/cd udev-config-6.3make installmake install-docmake install-extra-doccd ..install -m644 -v docs/writing_udev_rules/index.html \/usr/share/doc/udev-113/index.htmlcd ..rm -rf udev-113[/align]


Util-linux-2.12r
´úÂë:
[align=left]tar xvf $LFS/util-linux-2.12r.tar.bz2cd util-linux-2.12rsed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \-i $(grep -rl '/etc/adjtime' .)mkdir -pv /var/lib/hwclockpatch -Np1 -i $LFS/util-linux-2.12r-cramfs-1.patchpatch -Np1 -i $LFS/util-linux-2.12r-lseek-1.patch./configuremake HAVE_KILL=yes HAVE_SLN=yesmake HAVE_KILL=yes HAVE_SLN=yes installcd ..rm -rf util-linux-2.12r[/align]


Vim-7.1
´úÂë:
[align=left]tar xvf $LFS/vim-7.1.tar.bz2tar xvf $LFS/vim-7.1-lang.tar.gzcd vim71patch -Np1 -i $LFS/vim-7.1-fixes-1.patchpatch -Np1 -i $LFS/vim-7.1-mandir-1.patchecho '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h./configure --prefix=/usr --enable-multibytemake[/align]

²âÊÔ£º
´úÂë:
[align=left]make test[/align]

ÕâÀïtest¿ÉÄÜ»áÓиö±ð´íÎó
´úÂë:
[align=left]make installln -sv vim /usr/bin/vifor L in "" fr it pl ru; doln -sv vim.1 /usr/share/man/$L/man1/vi.1doneln -sv ../vim/vim71/doc /usr/share/doc/vim-7.1[/align]

½¨Á¢vimµÄĬÈÏÅäÖÃÎļþ
´úÂë:
[align=left]cat > /etc/vimrc << "EOF"" Begin /etc/vimrcset nocompatibleset backspace=2syntax onif (&term == "iterm") || (&term == "putty")set background=darkendif" End /etc/vimrcEOF[/align]

´úÂë:
[align=left]cd ..rm -rf vim71[/align]



Í˳öchroot»·¾³£º
´úÂë:
[align=left]logout[/align]


ΪStrip¶ø½øÈëchroot»·¾³£º
´úÂë:
[align=left]chroot $LFS /tools/bin/env -i \HOME=/root TERM=$TERM PS1='\u:\w\$ ' \PATH=/bin:/usr/bin:/sbin:/usr/sbin \/tools/bin/bash --login[/align]

Èç¹ûÏÖÔÚÖØÐÂÆô¶¯£¬ÄÇôÖØпª»úºó»Øµ½¹¤×÷״̬µÄ²½ÖèÊÇ£º
¡¡¡¡1.ÖØÐÂÆô¶¯¼ÆËã»ú£¬²¢´ÓLiveCDÆô¶¯
¡¡¡¡2.¼ÓÔØ·ÖÇø
¡¡¡¡export LFS=/mnt/lfs
¡¡¡¡mkdir -pv $LFS
¡¡¡¡mount /dev/hda2 $LFS
¡¡¡¡3.¼ÓÔؽ»»»·ÖÇø£¨Èç¹û²»ÏëÓý»»»·ÖÇø»òÕßûÓн»»»·ÖÇø¿ÉÌø¹ý´Ë²½Ö裩
¡¡¡¡swapon /dev/hda1
¡¡¡¡4.¼ÓÔرØÒªµÄÎļþϵͳ
¡¡¡¡mount -v --bind /dev $LFS/dev
¡¡¡¡mount -vt devpts devpts $LFS/dev/pts
¡¡¡¡mount -vt tmpfs shm $LFS/dev/shm
¡¡¡¡mount -vt proc proc $LFS/proc
¡¡¡¡mount -vt sysfs sysfs $LFS/sys
¡¡¡¡5.Chrootµ½Ä¿±êϵͳÏÂ
¡¡¡¡chroot "$LFS" /tools/bin/env -i \
¡¡¡¡HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
¡¡¡¡ PATH=/bin:/usr/bin:/sbin:/usr/sbin \
¡¡¡¡/tools/bin/bash --login


Strip
´úÂë:
[align=left]/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \-exec /tools/bin/strip --strip-debug '{}' ';'[/align]

Í˳öchroot»·¾³
´úÂë:
[align=left]logout[/align]

Ϊ×îºóµÄÉèÖýøÈëchroot»·¾³
´úÂë:
[align=left]chroot "$LFS" /usr/bin/env -i \HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \PATH=/bin:/usr/bin:/sbin:/usr/sbin \/bin/bash --logincd /sourcesexport LFS=/sources[/align]

´ÓÏÖÔÚ¿ªÊ¼Ò»Ö±µ½ÖÆ×÷½áÊø£¬ÖØпª»úºó»Øµ½¹¤×÷״̬µÄ²½ÖèÊÇ£º
¡¡¡¡1.ÖØÐÂÆô¶¯¼ÆËã»ú£¬²¢´ÓLiveCDÆô¶¯
¡¡¡¡2.¼ÓÔØ·ÖÇø
¡¡¡¡export LFS=/mnt/lfs
¡¡¡¡mkdir -pv $LFS
¡¡¡¡mount /dev/hda2 $LFS
¡¡¡¡3.¼ÓÔؽ»»»·ÖÇø£¨Èç¹û²»ÏëÓý»»»·ÖÇø»òÕßûÓн»»»·ÖÇø¿ÉÌø¹ý´Ë²½Ö裩
¡¡¡¡swapon /dev/hda1
¡¡¡¡4.¼ÓÔرØÒªµÄÎļþϵͳ
¡¡¡¡mount -v --bind /dev $LFS/dev
¡¡¡¡mount -vt devpts devpts $LFS/dev/pts
¡¡¡¡mount -vt tmpfs shm $LFS/dev/shm
¡¡¡¡mount -vt proc proc $LFS/proc
¡¡¡¡mount -vt sysfs sysfs $LFS/sys
¡¡¡¡5.Chrootµ½Ä¿±êϵͳÏÂ
¡¡¡¡chroot "$LFS" /usr/bin/env -i \
¡¡¡¡HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
¡¡¡¡ PATH=/bin:/usr/bin:/sbin:/usr/sbin \
¡¡¡¡/bin/bash --login
¡¡¡¡6.½øÈë±àÒëĿ¼
¡¡¡¡cd /sources
¡¡¡¡export LFS=/sources


LFS-Bootscripts-6.3
´úÂë:
[align=left]tar xvf $LFS/lfs-bootscripts-6.3.tar.bz2cd lfs-bootscripts-6.3make installcd ..rm -rf lfs-bootscripts-6.3[/align]


ʱ¼äÉèÖã¨Configuring the setclock Script£©
´úÂë:
[align=left]cat > /etc/sysconfig/clock << "EOF"# Begin /etc/sysconfig/clockUTC=1# End /etc/sysconfig/clockEOF[/align]


ÉèÖÃbashϵļüÅ̹¦ÄܼüÉèÖÃ
´úÂë:
[align=left]cat > /etc/inputrc << "EOF"set horizontal-scroll-mode Offset meta-flag Onset input-meta Onset convert-meta Offset output-meta Onset bell-style none"\eOd": backward-word"\eOc": forward-word"\e[1~": beginning-of-line"\e[4~": end-of-line"\e[5~": beginning-of-history"\e[6~": end-of-history"\e[3~": delete-char"\e[2~": quoted-insert"\eOH": beginning-of-line"\eOF": end-of-line"\e[H": beginning-of-line"\e[F": end-of-lineEOF[/align]


ÉèÖÃBash ShellÆô¶¯Îļþ£¨The Bash Shell Startup Files£©
´úÂë:
[align=left]cat > /etc/profile << "EOF"# Begin /etc/profileexport LANG=zh_CN.UTF-8export INPUTRC=/etc/inputrcalias ls="ls --color"export PS1='\u:\w\$ '# End /etc/profileEOF[/align]


ÉèÖñ¾µØÍøÂçÃû
´úÂë:
[align=left]echo "HOSTNAME=mylinux" > /etc/sysconfig/network[/align]


ÉèÖÃhostsÎļþ
´úÂë:
[align=left]cat > /etc/hosts << "EOF"# Begin /etc/hosts (no network card version)127.0.0.1 mylinux localhost# End /etc/hosts (no network card version)EOF[/align]


ÉèÖÃÍøÂçµÄ¾²Ì¬µØÖ·
´úÂë:
[align=left]cd /etc/sysconfig/network-devices &&mkdir -v ifconfig.eth0 &&cat > ifconfig.eth0/ipv4 << "EOF"ONBOOT=yesSERVICE=ipv4-staticIP=192.168.1.1GATEWAY=192.168.1.2PREFIX=24BROADCAST=192.168.1.255EOF[/align]

×¢Ò⣺IP¡¢GATEWAY¡¢BROADCASTµÄµØÖ·¸ù¾Ý×Ô¼ºµÄʵ¼ÊÇé¿öÉèÖá£


ÉèÖÃDNS

´úÂë:
[align=left]cat > /etc/resolv.conf << "EOF"# Begin /etc/resolv.confnameserver ÄãµÄÊ׸öDNSµÄµØÖ·nameserver ÄãµÄµÚ¶þDNSµÄµØÖ·# End /etc/resolv.confEOF[/align]


½¨Á¢fstabÎļþ
´úÂë:
[align=left]cat > /etc/fstab << "EOF"# Begin /etc/fstab# file system mount-point type options dump fsck# order/dev/hda2 / xfs defaults 1 1/dev/hda1 swap swap pri=1 0 0proc /proc proc defaults 0 0sysfs /sys sysfs defaults 0 0devpts /dev/pts devpts gid=4,mode=620 0 0shm /dev/shm tmpfs defaults 0 0# End /etc/fstabEOF[/align]

×¢Ò⣺ÕâÀïµÄ´ÅÅÌÃûÒÔ¼°ÎļþϵͳÃûÐèÒª¸ù¾Ýʵ¼ÊÇé¿öÐ޸ġ£


°²×°ÄÚºËLinux-2.6.22.5

´úÂë:
[align=left]cd /sourcestar xvf $LFS/linux-2.6.22.5.tar.bz2cd linux-2.6.22.5[/align]

°²×°ÏÔʾUTF-8±àÂëÎÄ×ֵIJ¹¶¡
Èç¹û֮ǰÏÂÔØÁËUTF-8±àÂëÎÄ×ÖÏÔʾ²¹¶¡£¬ÄÇôÕâÀï¿ÉÒÔ½«ÕâÁ½¸ö²¹¶¡´òÈëÄÚºË
patch -Np1 -i $LFS/utf8-kernel-2.6.22.5-core-1.patch
patch -Np1 -i $LFS/utf8-kernel-2.6.22.5-fonts-1.patch
´úÂë:
[align=left]make mrpropermake menuconfig[/align]

¸ù¾ÝÄãµÄ»úÆ÷ʵ¼ÊÇé¿öÅäÖÃÄÚºËÑ¡ÏÕâÀïΪÁË˵Ã÷·½±ã£¬ÒÔVMWare5.5Ϊ»ù´¡ÐéÄâµÄÓ²¼þÀ´ÅäÖÃÄÚºË
Èç¹ûÔÚ½¨Á¢ÐéÄâ»úµÄʱºòÊÇÑ¡ÔñµÄBusLogicµÄSCSI´ÅÅÌ£¬ÄÇôӦ¸ÃÔÚDevice Drivers->SCSI device support->SCSI low-level driversϼÓÈëBusLogic SCSI supportµÄÖ§³Ö£¬¿ÉÒÔ²ÉÓñàÒëµ½ÄÚºËÀ´±ÜÃâδÓÃinitrd½Å±¾À´¼ÓÔØÄ£¿é¶øµ¼ÖÂÆô¶¯Ê§°Ü


Èç¹ûÏëÖ§³ÖÍøÂçÔòÓ¦¸ÃÔÚDevice Drivers->Networking support->Ethernet (10 or 100Mbit)¼ÓÈëAMD PCnet32 PCI supportµÄÖ§³Ö£¬¿ÉÒÔ²ÉÓñàÒëµ½ÄÚºËÒ²¿ÉÒÔ±àÒë³ÉÄ£¿éµÄ·½Ê½


Èç¹ûÏëÖ§³ÖÉù¿¨ÔòÓ¦¸ÃÔÚDevice Drivers->Sound->Advanced Linux Sound Architecture->PCI devices¼ÓÈë(Creative) Ensoniq AudioPCI 1371/1373µÄÖ§³Ö£¬±àÒë³ÉÄ£¿é¼´¿É


ÎļþϵͳµÄÖ§³Ö£¬ÐèÒª¸ù¾Ý֮ǰ½«Ä¿±êϵͳ·ÖÇø¸ñʽ»¯µÄÇé¿ö¶ø¶¨£¬Ê¹ÓÃÁËʲôÎļþϵͳ¾ÍÐèÒª¼ÓÈë¸ÃÎļþϵͳµÄÖ§³Ö£¬Òò֮ǰ²ÉÓõÄÊÇXfsÎļþϵͳ£¬Òò´ËÔÚFile Systems->XFS support¼ÓÈëXFSµÄÖ§³Ö£¬¿ÉÒÔ²ÉÓñàÒëµ½ÄÚºËÀ´±ÜÃâδÓÃinitrd½Å±¾À´¼ÓÔØÄ£¿é¶øµ¼ÖÂÆô¶¯Ê§°Ü


Èç¹û֮ǰ¸øÄں˼ÓÈëÁËÏÔʾUTF-8±àÂëÎÄ×ֵIJ¹¶¡µÄ»°£¬ÄÇôÕâÀïÐèÒª¼ÓÈëframebufferµÄÖ§³Ö²ÅÄÜʹ²¹¶¡ÉúЧ£¬ÔÚDevice Drivers->Graphics supportÖмÓÈëSupport for frame buffer devices£¬²¢Ñ¡ÔñÉÏVESA VGA graphics supports£¬ÕâÀォÆä±àÒëµ½ÄÚºËÖÐ


ͬʱ»¹ÐèÒª¼ÓÈëframebuffer×ÖÌåÖ§³Ö£¬ÔÚDevice Drivers->Graphics support->Console display driver supportÖмÓÈëFramebuffer Console support²¢Ñ¡ÔñÉÏSelect compiled-in fonts£¬Ñ¡ÉÏVGA 8x16 fontÕâÒ»ÖÖ×ÖÌå¾Í¿ÉÒÔÁË£¬ÕâÀォÕâЩѡÔñ¶¼±àÒëµ½ÄÚºËÖÐ

¿ÉÒÔ±£´æÍ˳öÁË
´úÂë:
[align=left]makemake modules_installcp -v arch/i386/boot/bzImage /boot/lfskernel-2.6.22.5cp -v System.map /boot/System.map-2.6.22.5cp -v .config /boot/config-2.6.22.5install -d /usr/share/doc/linux-2.6.22.5cp -r Documentation/* /usr/share/doc/linux-2.6.22.5[/align]


°²×°Grub£¬Ê¹ÏµÍ³ÄÜÆô¶¯£¬ÕâÀïÉèÖÃÐèÒª¸ù¾ÝÇé¿ö¶øÐ޸ģ¬ÕâÀïÒÔ֮ǰ½éÉܵķÖÇøÉèÖÃΪÀý£º
´úÂë:
[align=left]grub[/align]

ÊäÈëroot (hd0,1)
ÊäÈësetup (hd0)
quit
ÉèÖÃgrubÆô¶¯²Ëµ¥
´úÂë:
[align=left]cat > /boot/grub/menu.lst << "EOF"# Begin /boot/grub/menu.lst# By default boot the first menu entry.default 0# Allow 30 seconds before booting the default.timeout 30# Use prettier colors.color green/black light-green/black# The first entry is for LFS.title LFS 6.3root (hd0,1)kernel /boot/lfskernel-2.6.22.5 root=/dev/hda2 vga=788EOF[/align]

×¢Ò⣺ÕâÀïrootºóÃæµÄ´ÅÅÌ·ÖÇøÐèÒª¸ù¾Ýʵ¼ÊÇé¿öµ÷Õû¡£
½«menu.lstÁ¬½Óµ½/etcĿ¼ÏÂ

´úÂë:
[align=left]mkdir -v /etc/grubln -sv /boot/grub/menu.lst /etc/grub[/align]


Í˳öÖÆ×÷»·¾³£º
´úÂë:
[align=left]logout[/align]


ÏÖÔÚÒѾ­Íê³ÉÁËlfsµÄ°²×°£¬¿ÉÒÔÖØÐÂÆô¶¯À´ÔËÐÐÎÒÃÇ×Ô¼ºµÄϵͳ¿©£¡
GrubÆô¶¯½çÃæ

Æô¶¯Íê³É



£¨×ªÔØÇë±£³ÖÎÄÕµÄÍêÕûÐÔ£¬Çë×¢Ã÷×÷Õߺͳö´¦£©
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡×÷ÕߣºËﺣÓ£¨³åÌì·É±ª£©
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Email:youbest@sina.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2008Äê2ÔÂ10ÈÕ

¸üÐÂÈÕÖ¾£º
2008Äê2ÔÂ10ÈÕ£º±¾ÎÄ·¢²¼¡£

2008Äê2ÔÂ12ÈÕ£º
½«chown -R root:root $LFS/toolsÎóдΪchwon -R root:root $LFS/tools
ÒѸÄÕý¹ýÀ´
ÓÉlinuxsirÉϵÄ"ºýÍ¿"·¢ÏÖ²¢±¨¸æ

2008Äê2ÔÂ12ÈÕ£º
ÔÚÄ¿±êϵͳµÄ/etc/profileÖÐÔö¼Ó
alias ls="ls --color"
export PS1='\u:\w\$ '


2008Äê3ÔÂ3ÈÕ£º
ÐÞ¸ÄÃüÁî
gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&@g' \
> `dirname $(gcc -print-libgcc-file-name)`/specs
Ϊ
gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&@g' > `dirname $(gcc -print-libgcc-file-name)`/specs

Ô­Òò£¬ÎªÇ°ÃæµÄ¡°>¡±ÊÇÊäÈë·ûºÅ£¬¶øÔÚÃüÁîÊäÈë¹ý³ÌÖÐϵͳ»á×Ô¶¯³öÏÖÒ»¸ö¡°>¡±£¬Îª±ÜÃâÐÂÊÖÎó½â£¬Ð޸ĸÃÃüÁî±í´ï·½Ê½¡£
ÓÉcublogÉϵġ°·ÉÌìÀÏÊó¡±Ö¸³ö¡£


2008Äê3ÔÂ3ÈÕ£º
ÐÞ¸ÄÃüÁî
./configure.gnu --prefix=/usr \
-Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3
-Dpager="/usr/bin/less -isR"
Ϊ
./configure.gnu --prefix=/usr \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR"
Ô­ÒòΪ±ÊÎó£¬È±ÉÙÁ½¸ö¶ÏÐзûºÅ¡£
ÓÉcublogÉϵġ°embeddedarmlinux¡±Ö¸³ö

2008Äê3ÔÂ16ÈÕ£º
Ð޸ıÊÎó
rm-rf gcc-3.4.3
¸ÄΪ
rm -rf gcc-4.1.2
ÓÉlinuxsirÉϵġ°yagng¡±Ö¸³ö

2008Äê7ÔÂ6ÈÕ£º
Ð޸ıÊÎó
tar xvf /lfs-sources/findutils-4.2.31.tar.bz2
¸ÄΪ
tar xvf /lfs-sources/findutils-4.2.31.tar.gz
ÓÉcublogÉϵġ°¼áÓ²µÄ±´¿Ç¡±Ö¸³ö

2008Äê7ÔÂ6ÈÕ£º
Ð޸ıÊÎó
ÔÚµÚÁùÕÂÖÐglibcµÄlocale°²×°²¿·Ö
mkdir -pv /tools/lib/locale
¸ÄΪ
mkdir -pv /usr/lib/locale
ÓÉcublogÉϵġ°Leon¡±Ö¸³ö

2008Äê7ÔÂ7ÈÕ£º
Ôö¼ÓÏÔʾUTF-8±àÂëÎÄ×Ö
¸øÄں˴òÉÏÎÒÖÆ×÷µÄUTF-8±àÂëÎÄ×ÖÏÔʾ²¹¶¡£¬ÕâÑù¿ÉÒÔÈÃÖÆ×÷³öÀ´µÄϵͳÔÚ´øÓÐframebufferÆÕͨµÄÖÕ¶ËÏ£¨·ÇX»·¾³£©¾Í¿ÉÒÔÖ±½ÓÏÔʾ³öÖÐÎļ°ÆäËüÓïÑÔµÄÎÄ×Ö£¬²¢ÇÒ¿ÉÒÔͬÆÁÏÔʾ¶à¹úÎÄ×Ö¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 9 ÌõÆÀÂÛ

  1. ÒâʶµÄÃÎÀï ÓÚ 2009-10-23 20:53:23·¢±í:

    ÖÕÓÚÔÚÕâÕÒµ½Ò»¸öתÌû×Ó£¬ºÇºÇlinuxsirÉϵĶ«Î÷»¹ÊDz»´í£¬Ö®Ç°×öÁËÏÂLFS6.5µÄ»¹²»´í£¬ÏÖÔÚÖ»ÊÇÒ»¸ö»ù±¾ÏµÍ³£¬ÓÐʱ¼äÔÙ×öÒ»ÏÂBLFS£¬°¥»¹ÊDz»ÊìÁ·°¡£¬µÃ¶à×ö¼¸±é¡£

  2. ÂÌÉ«Ê¥¹â ÓÚ 2009-10-06 21:13:21·¢±í:

    Ö§³ÖÒ»ÏÂÂ¥Ö÷~

  3. xianjian0320 ÓÚ 2009-10-05 17:54:16·¢±í:

    ºÃÌû£¬Ç¿@@@@£¡£¡£¡

  4. xianjian0320 ÓÚ 2009-10-05 17:47:53·¢±í:

    ѧϰÁËÒ»ÏÂ@£¡

  5. yiyepianzhou ÓÚ 2009-09-27 21:51:53·¢±í:

    ´«ËµÖеÄlfs£¬ÓпÕÊÔÒ»ÊÔ£¬Ð»Ð»LZ

  6. 414716676 ÓÚ 2009-09-26 13:03:39·¢±í:

    ²Å¿´Í꣬ÆäʵֻҪ»áһЩ°²×°ÃüÁ»áһЩ³£ÓõÄÃüÁ¿´Õâ¸öÒ²ÇáËɵģ¬Ö»ÒªÓÐÐÅÐÄ£¡

  7. tusy0123456 ÓÚ 2009-09-19 11:55:13·¢±í:

    ºÃ¸´ÔÓ°¡~

  8. wangyu ÓÚ 2009-09-15 17:58:00·¢±í:

    ÓÐLFSµÄÎĵµ

  9. csodv ÓÚ 2009-09-15 15:59:57·¢±í:

    ºÜÇ¿