Linux KerneL CompiLe Guide À±ºÀȯ, el@kldp.org v.0.15, 9 Mar 2001 ÀÌ ¹®¼­¿¡¼­´Â Ä¿³Î°ú Ä¿³Î ÄÄÆÄÀÏ¿¡ ´ëÇØ ´Ù·ì´Ï´Ù. Ä¿³Î ¼Ò½ºÀÇ ¼³Ä¡¿Í ¼¼ºÎ ȯ°æ¼³Á¤, ÄÄÆÄÀÏ°ú »õ Ä¿³Î ¼³Ä¡¿¡ ´ëÇØ À̾߱âÇÒ °ÍÀÔ´Ï´Ù. ______________________________________________________________________ ¸ñÂ÷ 1. Ä¿³Î 1.1 µÎ °¡Áö Ä¿³Î ¹öÀü 1.1.1 ¹öÀü ¹øÈ£ 1.1.2 ¾Ù·± ÄÛ½ºÀÇ Ä¿³Î¹öÀü 2. ÃֽŠĿ³Î ±¸Çϱâ 2.1 ¹èÆ÷ÆÇ CD-ROM 2.1.1 ·¹µåÇÞ °è¿­ 2.1.2 µ¥ºñ¾È ¹èÆ÷ÆÇ 2.2 FTP Site 2.3 ¸®´ª½º À¯Àú ±×·ì 3. Ä¿³Î ¼Ò½º ¼³Ä¡Çϱâ 3.1 ÄÄÆÄÀÏÀ» À§ÇÑ ±âº» µµ±¸ ¾Ë¾Æº¸±â 3.2 ÄÄÆÄÀÏÀ» À§ÇÑ ±âº» µµ±¸ ¼³Ä¡Çϱâ 3.3 Ä¿³Î ¼Ò½º Ç®±â 3.4 Ä¿³Î ÆÐÄ¡ 3.5 ÇÑ±Û ÆÐÄ¡ 3.6 make mrproper 4. ÄÄÆÄÀÏ È¯°æ ¼³Á¤ ¸í·É 4.1 ¹Ì¸® ¾Ë°í ÀÖÀ¸¸é ÁÁÀº °Íµé 4.2 ȯ°æ¼³Á¤ ÀÎÅÍÆäÀ̽º 4.2.1 make config ¶Ç´Â make oldconfig 4.2.2 make menuconfig 4.2.3 make xconfig 5. ȯ°æ ¼³Á¤ ±ÔÄ¢: "³» Ä¿³ÎÀº ³»°¡ ¸¸µç´Ù" 6. Code maturity LeveL optionS 7. LoadabLe moduLe SupporT 8. ProceSSor type and featureS 9. GeneraL SetuP 9.1 APM 9.2 »ç¶óÁø °Íµé.. 10. Memory Technology Devices (MTD) 11. Parallel port support 12. PLug and PLay SupporT 13. BLock deviceS 14. Multi-device support (RAID and LVM) 15. Networking optionS 15.1 Netfilter 15.2 QoS and /or fair queueing 15.3 »ç¶óÁø °Íµé.. 16. Telephony Support 17. ATA/IDE/MFM/RLL support 18. IDE, ATA and ATAPI Block devices 18.1 »ç¶óÁø °Íµé 19. SCSI SupporT 19.1 SCSI Low-LeveL driverS 19.2 PCMCIA SCSI adapter support 20. IEEE 1394 (FireWire) support 21. I2O device support 22. Network device SupporT 22.1 Ethernet (10 of 100Mbit) 22.2 Wan interfaces : 22.3 PCMCIA network device support : 23. Amateur Radio SupporT 24. IrDA (infrared) SupporT 24.1 Infrared-port device driverS 25. ISDN SubSySteM 26. OLd CD-ROM driverS (not SCSI, not IDE) 27. Input core support 28. Character deviceS 28.1 I2C support ---> 28.2 Mice ---> 28.3 Joysticks ---> 28.4 Watchdog Cards ---> 28.5 Ftape, the floppy tape device driver ---> 28.6 PCMCIA character device support ---> 29. Multimedia devices 30. FiLe SyStemS 30.1 Native Language Support ---> 30.2 Network FiLe SyStemS 30.3 Partition TypeS 31. ConSoLe driverS 31.1 Frame-buffer support ---> 32. SounD 32.1 AdditionaL Low LeveL Sound driverS 33. USB support 34. KerneL hackinG 35. Ä¿³Î ÄÄÆÄÀÏ 35.1 û¼Ò 35.2 Ä¿³Î ÄÄÆÄÀÏ ¸í·É 35.3 ¸ðµâ ÄÄÆÄÀÏ 36. »õ Ä¿³Î ¼³Ä¡ 36.1 ºÎÆ® À̹ÌÁö ¼³Ä¡ 36.2 /etc/lilo.conf 37. ¹®Á¦ ÇØ°á 37.1 »õ Ä¿³Î·Îµµ ÀÌÀü Ä¿³Î·Îµµ ºÎÆ®ÇÒ ¼ö ¾ø´Ù¸é? 37.2 ³ª´Â CD-ROMÀ¸·Î ºÎÆ®ÇÒ ¼ö ¾ø´Âµ¥: LoadLin 38. Notebook computer »ç¿ëÀÚ 39. ¹®¼­¿¡ ´ëÇØ 39.1 ÀÌÀü ¹®¼­¿Í ´Þ¶óÁø °Íµé ______________________________________________________________________ 1. Ä¿³Î Ä¿³ÎÀº ¿î¿µÃ¼Á¦ÀÇ ÇÙ½ÉÀÔ´Ï´Ù. ¸Þ¸ð¸®¿¡ »óÁÖÇÏ¿© ½Ã½ºÅÛ µð¹ÙÀ̽º¿Í ¸Þ¸ð¸®, ÇÁ·Î¼¼½º¸¦ °ü¸®ÇÏ°í, ÀÔÃâ·ÂÀ» ó¸®ÇÏ´Â µî À¯ÀúÀÇ ´Ù¾çÇÑ ¿ä±¸¿¡ ¹Ù·Î ¹ÝÀÀÇÕ´Ï´Ù. Áö±ÝÀº ´Ù¾çÇÑ ÇÁ·Î±×·¥µéÀ» Æ÷ÇÔÇÏ´Â ¿î¿µÃ¼Á¦¸¦ °¡¸®Å°±âµµ ÇÏ´Â Linux¶ó´Â À̸§µµ Ä¿³Î¿¡ ºÙ¿©Áø °ÍÀÔ´Ï´Ù. ¸®´ª½ºÀÇ ´Ù¸¥ ÇÁ·Î±×·¥Ã³·³ Ä¿³Îµµ ¼Ò½º ÇüÅÂÀ¸·Î ¹èÆ÷µË´Ï´Ù. Ä¿³Î ¼Ò½º´Â ¸ðµç ¹èÆ÷ÆÇ¿¡ µé¾îÀÖÀ¸¸ç ftp³ª BBSÀ¯Àú±×·ìÀ» ÅëÇØ ´Ù¿î¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. ÄÄÆÄÀÏÀ» À§ÇÑ È¯°æÀº Àß ¸¸µé¾îÁø ¸î °¡Áö ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇÏ¿© ½±°Ô ¼³Á¤ÇÒ ¼ö ÀÖ°í Ä¿³Î ÇØÅ·À» À§ÇÑ ¹®¼­ ¶ÇÇÑ ½±°Ô ±¸ÇÒ ¼ö ÀÖ½À´Ï´Ù. ´Ù¸¥ ºÎºÐ°ú ¸¶Âù°¡Áö·Î ¸®´ª½ºÀÇ ¿­¸° Á¤½ÅÀÌ Ä¿³ÎÀ» ºü¸£°í °­ÇÏ°Ô ¸¸µì´Ï´Ù. Ä¿³Î ÄÄÆÄÀÏÀº Ç×»ó ½É°¢ÇÏ°Ô ´Ù·ç¾îÁö´Â ÁÖÁ¦ÀÌÁö¸¸ ¿Ö ÄÄÆÄÀÏÀ» ±»ÀÌ ÇÏ´À³Ä°í ¹¯´Â À̵鵵 ¸¹½À´Ï´Ù. ´ë°³ÀÇ ¸®´ª¼­µéÀÌ µÎ ¼¼ °¡Áö Á¤µµ ÀÌÀ¯¸¦ ¸»Çϴµ¥, ÀϹÝÀûÀ¸·Î Ä¿³Î ÄÄÆÄÀÏÀº ½Ã½ºÅÛ ÃÖÀûÈ­ÀÇ ÇÑ ¼ö´ÜÀ¸·Î ¾²ÀÔ´Ï´Ù. ¹èÆ÷ÆÇ¿¡ Æ÷ÇԵǾî ÀÖ´Â ±âº» Ä¿³Î¿¡´Â Ȥ½Ã ¾²ÀÏÁöµµ ¸ð¸£´Â ´Ù¾çÇÑ ±â´ÉµéÀÌ µé¾î ÀÖ¾î ½ÇÁ¦·Î ¿©·¯ºÐ¿¡°Ô ÇÊ¿äÇÑ Ä¿³Îº¸´Ù Å©±âµµ Å©°í, ¶§·Î´Â ¾à°£ ¼º´ÉÀÌ ¶³¾îÁú ¼öµµ ÀÖ½À´Ï´Ù. ±×·¡¼­ ¸¹Àº ¸®´ª¼­µéÀÌ ½Ã½ºÅÛ¿¡ °¡Àå ÀûÇÕÇÑ ÀÛÀº Ä¿³ÎÀ» »õ·Î ¸¸µé¾î ¸®´ª½º ¹Ú½ºÀÇ ¼º´ÉÀ» ÃÖ´ë·Î ²ø¾î¿Ã¸®´Â °ÍÀÔ´Ï´Ù. ¶Ç ÇÑ°¡Áö ÀÌÀ¯´Â »õ Ä¿³ÎÀ» »ý¼ºÇØ ºü¸£°Ô µîÀåÇÏ´Â Áøº¸µÈ ±â´ÉÀ» »ç¿ëÇϰųª »õ·Î¿î ÀåÄ¡¸¦ Áö¿øÇÏ´Â °ÍÀÔ´Ï´Ù. ±×¸®°í ¸®´ª¼­´Â ±â»ÝÀ» ¾ò½À´Ï´Ù. ±×·¡¼­ ¾î¶² Ä¿³Î ¸Å´Ï¾ÆµéÀº Ä¿³Î ÄÄÆÄÀÏ ÀÚü¿¡ ´õ Å« Èï¹Ì¸¦ °¡Áø µí º¸À̱⵵ ÇÕ´Ï´Ù. 1.1. µÎ °¡Áö Ä¿³Î ¹öÀü ¸®´©½º(LinuS TorvaLdS)¿Í ¸¹Àº ÇØÄ¿µéÀÇ ³ë·ÂÀ¸·Î Ä¿³ÎÀº ¸Å¿ì ºü¸£°Ô Áøº¸ÇÏ°í ÀÖ½À´Ï´Ù. ±×·¯³ª ±â´É Çâ»óÀ» À§ÇØ ºü¸£°Ô ¼ºÀåÇÏ´Â µ¿¾È ¹®Á¦°¡ ¹ß»ýÇϱ⵵ ÇÕ´Ï´Ù. ´ëºÎºÐ ÀÏ¹Ý »ç¿ëÀÚµéÀÌ ÇØ°áÇÒ ¼ö ÀÖ´Â ¹üÀ§¸¦ ³Ñ¾î¼­´Â °ÍµéÀ̾, °³¹ßÀÚµéÀº ¾ÈÁ¤¼º°ú ¹ßÀüÀ» À§ÇØ ¸®´ª½º Ä¿³ÎÀ» µÎ °¡Áö ¹öÀüÀ¸·Î ºÎ¸¨´Ï´Ù. »õ·Î¿î ±â´ÉµéÀÌ ½ÇÇèµÇ´Â °³¹ß°úÁ¤ÀÇ Ä¿³ÎÀ» °³¹ß¹öÀü(DeveLopmentaLverSio N)À̶ó ºÎ¸£¸ç, »õ·Î¿î °Í¿¡ ¿­±¤ÀûÀÎ ¸®´ª¼­¿Í Å×½ºÅÍ, °³¹ßÀÚ¸¦ À§ÇÑ ¹öÀüÀÔ´Ï´Ù. °³¹ß¹öÀüÀº ¸¹Àº Å×½ºÆ®¿Í ÆÐÄ¡°úÁ¤À» °ÅÃÄ ¾ÈÁ¤¹öÀü(StabLe verSion or productioN)À¸·Î ÀÏ¹Ý »ç¿ëÀڵ鿡 ¹èÆ÷µË´Ï´Ù. 1.1.1. ¹öÀü ¹øÈ£ Ä¿³ÎÀÇ ¹öÀü¹øÈ£´Â 2.0.36¶Ç´Â 2.1.35¿Í °°ÀÌ ¼¼ ºÎºÐÀ¸·Î ±¸¼ºµÇ¾î ÀÖ½À´Ï´Ù. óÀ½ÀÇ ¼ýÀÚ´Â Ä¿´Ù¶õ º¯È­°¡ ÀÖÀ» ¶§ ¹Ù²î´Â ÁÖ ¹öÀü ¹øÈ£ÀÔ´Ï´Ù. ¸®´ª½º Ä¿³ÎÀÇ 2°¡ µµ½ºÀÇ 7º¸´Ù ÇÏÂú°Ô ´À²¸Áý´Ï±î? ¹öÀü ¹øÈ£¸¦ ¿Ã¸®´Â °ÍÀº °³¹ßÀÚ ¸¶À½ÀÌÁö¸¸ ¹öÀü¹øÈ£°¡ ¸ðµç ¼º´ÉÀ» ³ªÅ¸³»´Â °ÍÀº Àý´ë ¾Æ´Õ´Ï´Ù. °¡¿îµ¥ ¼ýÀڴ ¦¼öÀÏ ¶§ ¾ÈÁ¤¹öÀüÀ» ¶æÇÏ°í Ȧ¼öÀÏ ¶§ °³¹ß¹öÀüÀÓÀ» ¾Ë·Á ÁÝ´Ï´Ù. ¸¶Áö¸· ¼ýÀÚ´Â ÆÐÄ¡ ·¹º§À» ³ªÅ¸³»´Â ¼­ºê ³Ñ¹öÀÔ´Ï´Ù. 1.1.2. ¾Ù·± ÄÛ½ºÀÇ Ä¿³Î¹öÀü ac¶ó´Â ²¿¸®¸¦ ºÙ¿© ¸®´©½ºº¸´Ù ¸ÕÀú Ä¿³ÎÀ» ³» ³õ´Â ÀÌ°¡ ¾Ù·± ÄÛ½ºÀÔ´Ï´Ù. ¸®´©½º°¡ »õ Ä¿³Î ¹öÀüÀ» ¹ßÇ¥Çϱâ Àü¿¡ ±×º¸´Ù ¸éÀú, ´õ ´Ù¾çÇÑ Å×½ºÆ®Çؼ­ °ø°³ÇϹǷÎ, ac Ä¿³ÎÀÌ ´õ »õ·Î¿î ±â´ÉµéÀ» Æ÷ÇÔÇÒ ¶§°¡ ¸¹½À´Ï´Ù. 2. ÃֽŠĿ³Î ±¸Çϱâ ÀÌ ±ÛÀ» ¾²´Â µ¿¾È ÃÖ±Ù Ä¿³ÎÀº 2.4.2 ¹öÀüÀÔ´Ï´Ù. (ÀÌ ±ÛÀº 2.4.2 Ä¿³ÎÀ» ±âÃÊ·Î ÀÛ¼ºµÇ¾ú½À´Ï´Ù.) ÃÖ½ÅÀÇ Ä¿³Î ¼Ò½º¸¦ ±¸ÇÑ´Ù¸é FTP»çÀÌÆ®³ª À¥»çÀÌÆ®¸¦ ÅëÇØ ´Ù¿î¹Þ½À´Ï´Ù. ºñ±³Àû ÃÖ±Ù ¹èÆ÷ÆÇ CD-ROMÀ» °¡Áö°í ÀÖ´Ù¸é ±× ¾È¿¡¼­µµ ãÀ» ¼ö ÀÖ½À´Ï´Ù. 2.1. ¹èÆ÷ÆÇ CD-ROM ¸®´ª½º ¾ÈÁ¤¹öÀüÀÇ Ä¿³ÎÀº ¹èÆ÷ÆÇ CD¿¡ Æ÷ÇԵǾî ÀÖÁö¸¸ ¾Æ¸¶ °¡Àå ÃÖ½ÅÀÇ Ä¿³ÎÀº ¾Æ´Ò °ÍÀÔ´Ï´Ù. 2.1.1. ·¹µåÇÞ °è¿­ ±¹³»¿¡ °¡Àå ¸¹Àº »ç¿ëÀÚ¸¦ °¡Áø ·¹µåÇÞ °è¿­ÀÇ ¹èÆ÷ÆÇ¿¡¼­ Ä¿³Î ¼Ò½º´Â CD-ROMÀÇ RedHat/RPMS µð·ºÅ丮¾È¿¡ Çì´õ(¿¹¸¦ µé¾î kerneL- header-2.0.36-2.i386.rpm)¿Í ¼Ò½º(¿¹¸¦ µé¾î kerneL- Source-2.0.36-2.i386.rpm) µî Å©°Ô µÎ ºÎºÐÀ¸·Î ³ª´µ¾î ½Ç·Á ÀÖ½À´Ï´Ù. Ä¿³Î ÄÄÆÄÀÏÀ» À§Çؼ­´Â µÎ ÆÐÅ°Áö¸¦ ¸ðµÎ ¼³Ä¡ÇØ¾ß ÇÕ´Ï´Ù. # rpm -q kerneL-source # rpm -Uvh kernel-header-2.2.14.i386.rpm # rpm -Uvh kerneL-source-2.2.14.i386.rpm ±× ¹Û¿¡µµ ¿©·¯°¡Áö ÆÐÅ°ÁöµéÀÌ Àִµ¥ Ä¿³Î ÄÄÆÄÀÏÀ» À§ÇØ ¸ðµÎ ÇÊ¿äÇÑ °ÍÀº ¾Æ´Õ´Ï´Ù. kernel-source... Ä¿³Î ¼Ò½º rpm kernel-headers... Ä¿³Î Çì´õ rpm kernel-doc... Ä¿³Î ¹®¼ rpm kernel-BOOT... ºÎÆðú ¸ðµâ °ü·Ã rpm kernel-smp... ¸ÖƼ ÇÁ·Î¼¼¼ÀÏ ¶§ ÇÊ¿äÇÑ rpm kernel-pcmcia... ³ëÆ®ºÏ pcmcia¿¡ ÇÊ¿äÇÑ rpm kernel-ibcs... Intel Binary Compatibility Specification °ü·Ã rpm 2.1.2. µ¥ºñ¾È ¹èÆ÷ÆÇ µ¥ºñ¾È ¹èÆ÷ÆÇ(ÃÖ±Ù ¾ÈÁ¤¹öÀüÀÎ 2.2 potato ¹öÀüÀ» ¹ÙÅÁÀ¸·Î ±ÛÀ» ½è½À´Ï´Ù)Àº ²¿¸®¿¡ .deb¶ó´Â È®ÀåÀ̸§ÀÌ ºÙÀº ÆÐÅ°Áö ÆÄÀϵéÀÌ ÀÖ´Ù. KLDP¿¡¼­ ÇÑ±Û ¼³Á¤À» ´õÇؼ­ ¹èÆ÷ÇÏ´Â Æ÷Å×ÀÌÅä´Â ¸ðµÎ ¼¼ ÀåÀε¥ ±× Áß Ä¿³Î ¼Ò½º´Â ù ¹ø° µð½ºÅ© /cdrom/dists/potato/main/binary-i386/ ¾Æ·¡ devel/ µð·ºÅ丮 ¾È¿¡ µé¾î ÀÖ½À´Ï´Ù. Ä¿³Î Çì´õ´Â ¼¼¹ø° µð½ºÅ© /cdrom/dists/potato/main/binary-i386/devel µð·ºÅ丮¿¡ µé¾î ÀÖ½À´Ï´Ù: 1: devel/kernel-source-2.2.17_2.2.17pre6-1.deb 1: misc/kernel-package_7.04.potato.3.deb 3: devel/kernel-headers-2.2.17_2.2.17pre6-1.deb 3: doc/kernel-doc-2.2.17_2.2.17pre6-1.deb µ¥ºñ¾È ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÒ ¶§¿¡´Â "dpkg -i" ¸í·ÉÀ» »ç¿ëÇÕ´Ï´Ù: ù ¹ø° ½Ãµð·ÒÀ» ³Ö°í: # mount /cdrom # dpkg -i /cdrom/dists/potato/main/binary-i386/devel/kernel-source-2.2.17_2.2.17pre6-1.deb # eject µÎ ¹ø° ½Ãµð·Ò: # dpkg -i /cdrom/dists/potato/main/binary-i386/devel/kernel-headers-2.2.17_2.2.17pre6-1.deb ¼¼ ¹ø° ½Ãµð·Ò: # dpkg -i /cdrom/dists/potato/main/binary-i386/doc/kernel-doc-2.2.17_2.2.17pre6-1.deb 2.2. FTP Site ftp.kernel.org¿¡ anonymous·Î Á¢¼ÓÇÏ¿© /pub/linux/kernelµð·ºÅ丮¿¡¼­ ¸®´©½º°¡ »õ·Î ¹ßÇ¥ÇÑ Ä¿³Î ¼Ò½º¸¦ ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. ±× ¹ÛÀÇ ¹Ì·¯ »çÀÌÆ®: o o o o o o o Ä¿³Î ¼Ò½º¿Í ÇÔ²² ÆÐÄ¡ÆÄÀÏÀ» ¹Þ´Â °ÍÀ» ÀØÁö ¸»¾Æ¾ß ÇÕ´Ï´Ù. 2.3. ¸®´ª½º À¯Àú ±×·ì õ¸®¾È, ÇÏÀÌÅÚ, ³ª¿ì´©¸® µî PCÅë½Å¸ÁÀÇ ¸®´ª½º À¯Àú±×·ì(µ¿¿ìȸ?µ¿È£È¸)ÀÇ ÀÚ·á½Ç¿¡¼­ ´Ù¿î ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. ÀÏ¹Ý Àüȭȸ¼±À» ÀÌ¿ëÇÑ ¸ðµ© »ç¿ëÀÚ¶ó¸é ÀÎÅͳÝÀ» ÅëÇÑ ´Ù¿î·Îµåº¸´Ù ¿ÀÈ÷·Á ºü¸£°Ô Àü¼Û¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. Ä¿³Î 2.4.2´Â 25MByteS Á¤µµ Å©±âÀÔ´Ï´Ù. 3. Ä¿³Î ¼Ò½º ¼³Ä¡Çϱâ ÀÌ Àý¿¡¼­´Â Tar-Ball(tar·Î ¹­Àº ´ÙÀ½ gzipÀ¸·Î ¾ÐÃàÇÑ ÆÐÅ°Áö) ÇüÅÂÀÇ ¼Ò½º¸¦ ´Ù¿î¹Þ¾Æ ÀûÀýÇÑ °÷¿¡ Ç®¾î ³õ°í, ±âÃÊ È¯°æÀ» ±¸¼ºÇÏ´Â ¹æ¹ýÀ» ¼³¸íÇÕ´Ï´Ù. 3.1. ÄÄÆÄÀÏÀ» À§ÇÑ ±âº» µµ±¸ ¾Ë¾Æº¸±â »õ Ä¿³ÎÀ» ÄÄÆÄÀÏÇϱâ À§ÇØ ¾÷µ¥ÀÌÆ®°¡ ÇÊ¿äÇÑ ¶óÀ̺귯¸®³ª ÇÁ·Î±×·¥ÀÌ ÀÖ´ÂÁö È®ÀÎÇÏ¿© ÇÊ¿äÇÏ´Ù¸é »õ·Î ¼³Ä¡ÇÕ´Ï´Ù. ±×·¯³ª ¸ðµç µµ±¸µéÀÌ ¹Ýµå½Ã ÇÊ¿äÇÑ °ÍÀº ¾Æ´Õ´Ï´Ù. ¿¹¸¦ µé¾î pcmcia-cs´Â pcmciaÀåºñ°¡ ¾ø´Â ½Ã½ºÅÛ¿¡¼­´Â ¼³Ä¡ÇÏÁö ¾Ê¾Æµµ µË´Ï´Ù. ¿©·¯ºÐÀÌ »õ Ä¿³Î ¼Ò½º¸¦ /usr/src¾Æ·¡ ¼³Ä¡ÇÏ°í linux¶ó´Â À̸§À¸·Î ¸µÅ©ÇØ µÎ¾ú´Ù¸é, °ü·ÃµÈ ¹®¼­´Â /usr/src/linux/Documentation/ChangesÀÔ´Ï´Ù. ¾Æ·¡´Â °¢ µµ±¸¸¶´Ù ÃÖ¼ÒÇÑÀÇ ¹öÀü(2.4.2 Ä¿³ÎÀ» À§ÇÑ)°ú È®ÀÎÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù. ¿¹¸¦ µé¾î Gnu CÀÇ ¹öÀüÀ» È®ÀÎÇÒ ¶§¿¡´Â "gcc --version"À̶ó´Â ¸í·ÉÀ» »ç¿ëÇÕ´Ï´Ù. ---------------+---------------+-------------------------------------- ÆÐÅ°Áö | ÃÖ¼Ò¹öÀü | È®ÀÎÇÏ´Â ¹æ¹ý ---------------+---------------+-------------------------------------- Gnu C | 2.91.66 | # gcc --version Gnu make | 3.77 | # make --version binutils | 2.9.1.0.25 | # ld -v util-linux | 2.10o | # fdformat --version modutils | 2.4.2 | # insmod -V e2fsprogs | 1.19 | # tune2fs reiserfsprogs | 3.x.0b | # reiserfsck 2>&1|grep reiserfsprogs pcmcia-cs | 3.1.21 | # cardmgr -V PPP | 2.4.0 | # pppd --version isdn4k-utils | 3.1pre1 | # isdnctrl 2>&1|grep version ---------------+---------------+-------------------------------------- ¾Æ·¡´Â µµ±¸µéÀ» ±¸ÇÏ´Â ÀÎÅÍ³Ý À§Ä¡ÀÔ´Ï´Ù. ÆÄÀÏ À̸§À̳ª ¹öÀü ¹øÈ£´Â Á¶±Ý¾¿ ´Þ¶óÁú ¼öµµ ÀÖ½À´Ï´Ù: modutils : À§Ä¡ - ÆÄÀÏ - modutils-2.4.2.tar.gz util-linux : À§Ä¡ - ÆÄÀÏ - util-linux-2.10s.tar.gz E2fsprogs : À§Ä¡ - ÆÄÀÏ - e2fsprogs-1.19.tar.gz ȤÀº 1.19-0.i386.rpm ÁÖÀÇ! sourceforge¿¡¼­ ls ¸í·ÉÀ» »ç¿ëÇÏÁö ¸» °Í..^^ ÆÄÀÏ°ú µð·ºÅ丮°¡ ³Ê¹« ¸¹¾Æ ¸¶Ä¡ ´Ù¿îµÈ µí º¸ÀÏ ¼öµµ.. Reiserfsprog : À§Ä¡ - ÆÄÀÏ - reiserfs_utils-3.6.25-fsck-3.x.0b.tar.gz, reiserfsprogs-3.x.0d.tar.gz Pcmcia-cs : À§Ä¡ - ÆÄÀÏ - pcmcia-cs-3.1.24.tar.gz PPP : À§Ä¡ - ÆÄÀÏ - ppp-2.4.0b4.tar.gz Isdn4k-utils : À§Ä¡ - ÆÄÀÏ - isdn4k-utils.v3.1pre1.tar.gz 3.2. ÄÄÆÄÀÏÀ» À§ÇÑ ±âº» µµ±¸ ¼³Ä¡Çϱ⠻õ Ä¿³Î ÄÄÆÄÀÏ°ú ¸ðµâ ¼³Á¤¿¡ ¾²ÀÌ´Â µµ±¸µéÀ» ÀÎÅͳÝÀ¸·ÎºÎÅÍ °¡Á®¿Ô´Ù¸é ´ÙÀ½°ú °°Àº °úÁ¤À» °ÅÃÄ ÀÚ½ÅÀÇ ¸Ó½Å¿¡ ¼³Ä¡ÇÕ´Ï´Ù. ¿¹¸¦ µé¾î /usr/local/src/kernel-2.4/util-linux-2.10s.tar.gz¸¦ ¼³Ä¡ÇÑ´Ù¸é: 1. ¸ÕÀú Àû´çÇÑ À§Ä¡¿¡ ¾ÐÃàÀ» Ç®¾î³õ½À´Ï´Ù. # cd /usr/local # tar xvzf /usr/local/src/kernel-2.4/util-linux-2.10s.tar.gz 2. ¾Æ¸¶ util-linux-2.10s¶ó´Â À̸§À¸·Î »õ·Î¿î µð·ºÅ丮°¡ ¸¸µé¾îÁö°í ±× ¾È¿¡ ¼Ò½º ÆÄÀϵéÀÌ ³õÀÏ °ÍÀÔ´Ï´Ù. # cd util-linux-2.10s 3. ½Ã½ºÅÛ Á¤º¸¸¦ ¼öÁýÇؼ­ ÄÄÆÄÀÏÀ» À§ÇÑ ±âÃÊȯ°æÀ» ±¸¼ºÇÕ´Ï´Ù. # ./configure 4. 3¿¡¼­ »ý¼ºÇÑ Makefileµî ¼³Á¤ÆÄÀÏÀ» ÀÌ¿ëÇØ ÄÄÆÄÀÏÇÏ°í ¼³Ä¡ÇÕ´Ï´Ù. # make;make install 3.3. Ä¿³Î ¼Ò½º Ç®±â ÀϹÝÀûÀ¸·Î Ä¿³Î ¼Ò½º´Â /usr/src µð·ºÅ丮 ¾Æ·¡ ¼³Ä¡ÇÕ´Ï´Ù. /usr/src ¾Æ·¡¿¡´Â ½ÇÁ¦ Çì´õ, Ä¿³ÎÀÌ ¼³Ä¡µÈ µð·ºÅ丮¿Í ±× ¸µÅ©°¡ ÀÖ½À´Ï´Ù. ÀÌÀü Ä¿³ÎÀÌ µé¾îÀÖ´Â µð·ºÅ丮¿¡ ´ëÇÑ ¸µÅ©¸¦ »èÁ¦ÇÏ°í(¿ì¼±Àº ¸µÅ©¸¸ Áö¿ó´Ï´Ù) »õ Ä¿³Î ¼Ò½º°¡ ¼³Ä¡µÈ µð·ºÅ丮¸¦ Linux¶ó´Â À̸§À¸·Î ´Ù½Ã ¸µÅ©ÇÕ´Ï´Ù. # cd /usr/src # rm -f linux # mkdir linux-2.4.2 # tar xvzf linux-2.4.2.tar.gz linux-2.4.2 # ln -s linux-2.4.2 linux RPM(´Ù¸¥ ¸Ó½Å¿¡¼­ ¹Ì¸® ÄÄÆÄÀÏµÈ ¹ÙÀ̳ʸ® ÆÐÅ°Áö)À̳ª dpkg, ȤÀº Tar- Ball ÇüÅÂÀÇ ¹ÙÀ̳ʸ®¸¦ ¼³Ä¡ÇÏÁö ¾Ê°í, ¼Ò½ºÄڵ带 ÄÄÆÄÀÏÇØ¾ß ÇÑ´Ù¸é /usr/src/linux¾Æ·¡ ÄÚµåµéÀ» Âü°íÇÕ´Ï´Ù. »õ·Î ¼³Ä¡ÇÑ Ä¿³Î ¼Ò½º°¡ °³¹ß¹öÀüÀ̶ó¸é ÄÄÆÄÀÏ ÈÄ Á¤»óÀûÀ¸·Î ÀÛµ¿µÇ´õ¶óµµ ÀÌÀüÀÇ ¾ÈÁ¤¹öÀüÀ» »èÁ¦ÇÏÁö ¾Êµµ·Ï ÇÕ´Ï´Ù. 3.4. Ä¿³Î ÆÐÄ¡ ÆÐÄ¡ÆÄÀÏÀº diff À¯Æ¿¸®Æ¼¸¦ ÀÌ¿ëÇÏ¿© Ä¿³ÎÀÇ ÀϺκÐÀ» ¼öÁ¤ÇÕ´Ï´Ù. ÆÐÄ¡ÆÄÀÏÀº ºü¸£°Ô °»½ÅµÇ¸ç »õ·Î¿î ÆÐÄ¡ÆÄÀÏÀº ÀÌÀü ÆÐÄ¡¿¡ ´ëÇÑ Á¤º¸¸¦ Æ÷ÇÔÇÏÁö ¾Ê½À´Ï´Ù. ±×·¯¹Ç·Î ÆÐÄ¡·¹º§Àº ¼ø¼­´ë·Î ¸ðµÎ Àû¿ëÇؾ߸¸ ÇÕ´Ï´Ù. ÆÐÄ¡°¡ ¸¹ÀÌ ÀÌ·ç¾îÁø ÈĶó¸é Ä¿³Î ¼Ò½º Àüü¸¦ ´Ù½Ã ¹Þ´Â °ÍÀÌ À¯¸®ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. Ä¿³Î 2.2.9¿¡¼­ Ä¿³Î 2.4.2·Î ¾÷±×·¹À̵åÇϱâ À§Çؼ­ patch-2.2.10.gz, patch-2.2.11.gz ¸ðµÎ¸¦ ¼ø¼­´ë·Î Àû¿ëÇØ¾ß ÇÕ´Ï´Ù. ¾Æ·¡¿¡ ¿¹°¡ ÀÖ½À´Ï´Ù. ¿É¼Ç °¡¿îµ¥ p0´Â ÆÐÄ¡ÆÄÀÏ¿¡ µé¾îÀÖ´Â °æ·Î¿¡ ´ëÇÑ »ó´ëÀûÀÎ À§Ä¡¸¦ ¶æÇÕ´Ï´Ù. ¿¹¸¦ µé¾î ÆÐÄ¡ÆÄÀÏ ¾È¿¡ ÆÐÄ¡ÇÒ ´ë»óÀÌ µé¾î ÀÖ´Â µð·ºÅ丮¿Í ´ë»ó ÆÄÀÏÀ» "/u/howard/src/blurfl/blurfl.c"À̶ó°í ¼³Á¤Çß´Ù¸é -p0´Â "/u/howard/src/blurfl/blurfl.c", -p1Àº "u/howard/src/blurfl/blurfl.c", -p4´Â "blurfl/blurfl.c"°¡ µË´Ï´Ù. # cd /usr/src # ls linux linux-2.2.9 patch-2.2.10.gz patch-2.2.11.gzpatch-2.4.2.gz # gzip -cd patch-2.2.10.gz | patch -p0 # gzip -cd patch-2.2.11.gz | patch -p0 # gzip -cd patch-2.4.2.gz | patch -p0 ¸¹Àº ÆÐÄ¡ ÀÛ¾÷Àº ¼ÐÀÇ for ¸í·ÉÀ» ÀÌ¿ëÇØ ÀÚµ¿È­ÇÒ ¼ö ÀÖ½À´Ï´Ù. # for LeveL in 10 11 12 ; do > gzip -cd patch-2.2.$[LeveL].gz | patch -p0 > done # /usr/src/linux/scripts µð·ºÅ丮¿¡´Â ¿©·¯ ´Ü°èÀÇ ÆÐÄ¡ ÀÛ¾÷À» ÀÚµ¿À¸·Î ½ÇÇàÇÏ´Â ½ºÅ©¸³Æ® patch-kerneLÀÌ ÀÖ½À´Ï´Ù.patch-kerneLÀº /usr/src ¾Æ·¡¿¡ ÀÖ´Â Ä¿³Î ÆÐÄ¡ÆÄÀϵé°ú Ä¿³Î ¼Ò½ºÀÇ ¹öÀü°ú ºñ±³ÇÏ¿© ¼ø¼­¿¡ µû¶ó ÆÐÄ¡¸¦ Àû¿ëÇÕ´Ï´Ù. # cd /usr/src # ls linux linux-2.2.9 patch-2.2.10.gz patch-2.2.11.gzpatch-2.4.2.gz # linux/scripts/patch-kernel ÆÐÄ¡°¡ ¼º°øÇß´Ù¸é ÆÐÄ¡ ´ë»óÀÌ µÈ ÆÄÀÏÀÇ ¿øº»Àº À̸§³¡¿¡ .orig¸¦ ºÙ¿© ¹é¾÷µË´Ï´Ù. ÆÐÄ¡ °úÁ¤¿¡¼­ ¹®Á¦°¡ »ý°Ü ½ÇÆÐÇß´Ù¸é ½ÇÆÐÇÑ ÆÄÀÏ À̸§ µÚ¿¡ .rej¸¦ ºÙÀÎ ÆÄÀÏÀ» ¸¸µì´Ï´Ù. *.rejÆÄÀÏÀ» »ìÆ캸°í ÆÐÄ¡ ÀÛ¾÷À» ´Ù½Ã ¼öÇàÇÕ´Ï´Ù. # find /usr/src/linux/ -name "*.rej" *.rej ÆÄÀÏÀ» ãÀ» ¼ö ¾ø°í ÆÐÄ¡°¡ ¼º°øÇß´Ù¸é *.origÆÄÀÏÀ» »èÁ¦ÇÕ´Ï´Ù. # find /usr/src/linux/ -name "*.orig" -exec rm -f {} \; ÆÐÄ¡µÈ Ä¿³Î ¼Ò½º µð·ºÅ丮 À̸§À» ÆÐÄ¡·¹º§ ¹øÈ£·Î ¹Ù²Ù°í ¸µÅ©¸¦ ´Ù½Ã ¼³Á¤ÇÕ´Ï´Ù. # cd /usr/src # rm -f linux # mv linux-2.2.9 linux-2.4.2 # ln -s 3.5. ÇÑ±Û ÆÐÄ¡ ÃÖ±Ù ¹öÀü Ä¿³Î¿¡¼­´Â ÇÑ±Û ÄÚµåÆäÀÌÁö¿Í ·ÎÄÉÀÏÀÌ µé¾î ÀÖ¾î µû·Î ÆÐÄ¡ÇÏÁö ¾Ê¾Æµµ Çѱ۷ΠµÈ ÆÄÀÏ À̸§ µîÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. 3.6. make mrproper ÀÌÀü¿¡ ¼³Á¤ÇÑ Á¤º¸¸¦ Áö¿ì°Å³ª »õ·Î¿î Ä¿³Î ¼Ò½º¸¦ °¡Á®´Ù ÄÄÆÄÀÏ ÇÒ ¶§¿¡´Â ÀÌ ¸í·ÉÀ» ¸ÕÀú »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. ÀÌÀü Ä¿³ÎÀ» ÄÄÆÄÀÏÇÒ ¶§ ¸¸µé¾îÁø ¿ÀºêÁ§Æ® ÆÄÀÏ(*.o)°ú ÀÇÁ¸¼º ¼³Á¤, ÄÄÆÄÀÏ È¯°æ ¼³Á¤°ª, ¹öÀü Á¤º¸ µî »õ·Î ½ÃÀÛÇÏ´Â ÄÄÆÄÀÏ¿¡ ¿µÇâÀ» ÁÖ´Â ÀÌÀü Á¤º¸µéÀ» »èÁ¦ÇÕ´Ï´Ù. ÀÌÀü¿¡ ¼³Á¤µÈ ÄÄÆÄÀÏȯ°æÀ» Àç»ç¿ëÇÑ´Ù¸é ÀÌ °úÁ¤À» °Ç³Ê¶Ý´Ï´Ù. # cd /usr/src/linux # make mrproper 4. ÄÄÆÄÀÏ È¯°æ ¼³Á¤ ¸í·É ÀÌ ¹®¼­´Â IBM PC ½ºÅ¸ÀÏÀÇ ½Ã½ºÅÛÀ» °¡Áø ÀÏ¹Ý »ç¿ëÀÚ¸¦ À§ÇÑ ÄÄÆÄÀÏ È¯°æÀ» Á¶¾ðÇÕ´Ï´Ù. ¾ËÆÄ ½Ã½ºÅÛÀ̳ª ¼± ¸Ó½ÅÀ» °¡Áö°í ÀÖ´Ù¸é ÇÑ±Û ¸®´ª½º ¹®¼­ ÇÁ·ÎÁ§Æ® ÆÀÀÇ È¨ÆäÀÌÁö¸¦ ã¾Æ°¡ º¾´Ï´Ù. 4.1. ¹Ì¸® ¾Ë°í ÀÖÀ¸¸é ÁÁÀº °Íµé ÄÄÆÄÀÏ È¯°æ ¼³Á¤À» À§ÇØ Çϵå¿þ¾î ±¸¼º Á¤º¸¸¦ ±â·ÏÇصӴϴÙ. »ç¿îµå Ä«µå, ³×Æ®¿öÅ© µð¹ÙÀ̽º µîÀÇ IRQ, I/O port, DMA addreSS, ±×¸®°í ºñµð¿À Ä«µå µî ÀåÄ¡ÀÇ Æ¯¼ºÀ» ¾Ë°í ÀÖ¾î¾ß ÇÕ´Ï´Ù. ¿©·¯ºÐÀÇ ½Ã½ºÅÛ¿¡ ¾î¶² ÀåÄ¡¿Í Ĩ¼ÂÀÌ µé¾îÀÖ´ÂÁö ¾Ë¾Æº¸·Á¸é /proc/pci, /proc/sound, /proc/scsi/scsi µî ÆÄÀÏÀ» ¿­¾îº¾´Ï´Ù. ´ÙÀ½Àº ÀÌ ±ÛÀ» ¾²°íÀÖ´Â ¸®´ª½º ¹Ú½ºÀÔ´Ï´Ù. PCI ¹ö½º¸¦ Áö¿øÇϴ Ĩ¼Â°ú ÀåÄ¡ ¸î °¡Áö¸¦ È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù: # cat /proc/pci PCI devices found: Bus 0, device 0, function 0: Host bridge: VIA Technologies VT 82C598 Apollo MVP3 (rev 4). Medium devsel. Fast back-to-back capable. Master Capable. Latency=16. Prefetchable 32 bit memory at 0xe0000000 [0xe0000008]. Bus 0, device 1, function 0: PCI bridge: VIA Technologies VT 82C598 Apollo MVP3 AGP (rev 0). Medium devsel. Master Capable. No bursts. Min Gnt=12. Bus 0, device 7, function 0: ISA bridge: VIA Technologies VT 82C586 Apollo ISA (rev 71). Medium devsel. Master Capable. No bursts. Bus 0, device 7, function 1: IDE interface: VIA Technologies VT 82C586 Apollo IDE (rev 6). Medium devsel. Fast back-to-back capable. Master Capable. Latency=32. I/O at 0x6400 [0x6401]. Bus 0, device 7, function 2: USB Controller: VIA Technologies VT 82C586 Apollo USB (rev 2). Medium devsel. IRQ 9. Master Capable. Latency=32. I/O at 0x6800 [0x6801]. Bus 0, device 7, function 3: Host bridge: VIA Technologies VT 82C586B Apollo ACPI (rev 16). Medium devsel. Fast back-to-back capable. Bus 0, device 11, function 0: Ethernet controller: AMD Unknown device (rev 82). Vendor id=1022. Device id=2001. Medium devsel. Fast back-to-back capable. IRQ 11. Master Capable. Latency=32. Min Gnt=24.Max Lat=24. I/O at 0x6c00 [0x6c01]. Non-prefetchable 32 bit memory at 0xed001000 [0xed001000]. Bus 0, device 12, function 0: Ethernet controller: DEC DC21140 (rev 34). Medium devsel. Fast back-to-back capable. IRQ 10. Master Capable. Latency=32. Min Gnt=20.Max Lat=40. I/O at 0x7000 [0x7001]. Non-prefetchable 32 bit memory at 0xed000000 [0xed000000]. Bus 1, device 0, function 0: VGA compatible controller: NVidia Unknown device (rev 21). Vendor id=10de. Device id=2c. Medium devsel. Fast back-to-back capable. IRQ 10. Master Capable. Latency=32. Min Gnt=5.Max Lat=1. Non-prefetchable 32 bit memory at 0xe8000000 [0xe8000000]. Prefetchable 32 bit memory at 0xea000000 [0xea000008]. 4.2. ȯ°æ¼³Á¤ ÀÎÅÍÆäÀ̽º ȯ°æ ¼³Á¤À» À§ÇÑ ÀÎÅÍÆäÀ̽º´Â make config, make menuconfig, make xconfig ¼¼ °¡Áö°¡ ÀÖ½À´Ï´Ù(ÀÌÀü ¼³Á¤ Á¤º¸´Â ±×´ë·Î µÐ ä »õ·Î¿î ¿É¼Çµé¿¡ ´ëÇؼ­¸¸ ¹°¾îº¸´Â make oldconfigµµ ÀÖ½À´Ï´Ù). make´Â "makefile"¿¡ ¼­¼úµÈ±ÔÄ¢À» ÀÌ¿ëÇÏ¿© ¼Ò½ºÄÚµå ÆÄÀϵéÀ» °ü¸®ÇÕ´Ï´Ù. ÃÖ±Ù º¯°æÀ» Àû¿ëÇÏ¿© ¼Ò½ºÄڵ带 ¿ÀºêÁ§Æ® ÆÄÀÏ·Î ÄÄÆÄÀÏÇÏ°í ¶óÀ̺귯¸® ÆÄÀÏ°ú ¸µÅ©ÇÏ¿© ½ÇÇà °¡´ÉÇÑ ÆÄÀÏ·Î ÄÄÆÄÀÏ ÇÏ´Â °úÁ¤µéÀ» ÀÚµ¿À¸·Î ó¸®ÇÕ´Ï´Ù. 4.2.1. make config ¶Ç´Â make oldconfig Çà ´ÜÀ§·Î ȯ°æ ¼³Á¤À» ÇÏ´Â make config´Â bash³ª csh¿¡¼­ ½ÇÇàµË´Ï´Ù. ¼¼ºÎÀûÀÎ ¼³Á¤À» ÇÒ ¼ö ÀÖÁö¸¸ °¡Àå ºÒÆíÇÑ ÀÎÅÍÆäÀ̽º·Î Àß ¾²ÀÌÁö ¾Ê½À´Ï´Ù. ±×·¯³ª make oldconfig´Â ²Ï ¾µ¸¸ÇÕ´Ï´Ù. 4.2.2. make menuconfig ¾Æ·¡´Â ¸Þ´º½Ä ¼³Á¤È­¸éÀÇ ÇÑ ¿¹ÀÔ´Ï´Ù. Linux Kernel v2.4.2 Configuration ---------------------------------------------------------------------------- +---------------------------- Console drivers ----------------------------+ | Arrow keys navigate the menu. selects submenus --->. | | Highlighted letters are hotkeys. Pressing includes, excludes, | | modularizes features. Press to exit, for Help. | | Legend: [*] built-in [ ] excluded module < > module capable | | +---------------------------------------------------------------------+ | | | [*] VGA text console | | | | [ ] Video mode selection support | | | | MDA text console (dual-headed) (EXPERIMENTAL) | | | | Frame-buffer support ---> | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------------------------------------------------------------------+ | +-------------------------------------------------------------------------+ |