LinuxϵÄÓ²¼þÇý¶¯——USBÉ豸£¨×ª£©
from£ºhttp://www.ibm.com/developerworks/cn/linux/l-usb/index1.html
¼¶±ð£º ³õ¼¶
ÕÔÃ÷ (carl__zhao@163.com), ÁªÏëÈí¼þÉè¼ÆÖÐÐÄǶÈëʽÑз¢´¦ÏµÍ³Éè¼Æ¹¤³Ìʦ
2003 Äê 7 ÔÂ 01 ÈÕ
USBÉ豸ԽÀ´Ô½¶à£¬¶øLinuxÔÚÓ²¼þÅäÖÃÉÏÈÔȻûÓÐ×öµ½ÍêÈ«¼´²å¼´Ó㬶ÔÓÚLinuxÔõÑùÅäÖúÍʹÓÃËûÃÇ£¬Ò²Ô½À´Ô½³ÉΪÀ§ÈÅÎÒÃǵÄÒ»´óÎÊÌâ¡£±¾ÎÄ×ÅÁ¦´ÓLinuxϵͳÏÂÉ豸Çý¶¯µÄ¼Ü¹¹£¬È¥²ûÊöÔõÑùȥʹÓúÍÅäÖÃÒÔ¼°ÔõÑù±àÖÆUSBÉ豸Çý¶¯¡£¶ÔÓÚÒ»°ãÓû§£¬¿ÉÒÔʹÎÒÃÇÃ÷ÎúLinuxÉ豸Çý¶¯·½Ê½£¬Îª¸üºÃµØÅäÖúÍʹÓÃUSBÉ豸ÌṩÁË·½±ã£»¶ø¶ÔÓÚÏ£Íû¿ª·¢LinuxϵͳÏÂUSBÉ豸Çý¶¯µÄ³ÌÐòÔ±£¬ÌṩÁ˳õ²½Ñ§Ï°USBÇý¶¯¼Ü¹¹µÄ»ú»á¡£
Ç°ÑÔ
USBÊÇÓ¢ÎÄ"Universal Serial Bus"µÄËõд£¬ÒâΪ"ͨÓô®ÐÐ×ÜÏß"¡£ÊÇÓÉCompaq(¿µ°Ø)¡¢DEC¡¢IBM¡¢Intel¡¢NEC¡¢Î¢ÈíÒÔ¼°Northern Telecom£¨±±·½µçѶ£©µÈ¹«Ë¾ÓÚ1994Äê11Ô¹²Í¬Ìá³öµÄ£¬Ö÷ҪĿµÄ¾ÍÊÇΪÁ˽â¾ö½Ó¿Ú±ê׼̫¶àµÄ±×¶Ë¡£USBʹÓÃÒ»¸ö4Õë²åÍ·×÷Ϊ±ê×¼²åÍ·£¬²¢Í¨¹ýÕâ¸ö±ê×¼½ÓÍ·£¬²ÉÓþջ¨°êÐÎʽ°ÑËùÓÐÍâÉèÁ¬½ÓÆðÀ´£¬Ëü²ÉÓô®Ðз½Ê½´«ÊäÊý¾Ý£¬Ä¿Ç°×î´óÊý¾Ý´«ÊäÂÊΪ12Mbps, Ö§³Ö¶àÊý¾ÝÁ÷ºÍ¶à¸öÉ豸²¢ÐвÙ×÷£¬ÔÊÐíÍâÉèÈȲå°Î¡£
Ä¿Ç°USB½Ó¿ÚËäȻֻ·¢Õ¹ÁË2´ú£¨USB1.0/1.1£¬USB2.0£©£¬µ«ÊÇUSB×ÛºÏÁËÒ»¸ö¶àƽ̨±ê×¼µÄËùÓÐÓŵã -- °üÀ¨½µµÍ³É±¾£¬Ôö¼Ó¼æÈÝÐÔ£¬¿ÉÁ¬½Ó´óÁ¿µÄÍⲿÉ豸£¬ÈÚºÏÏȽøµÄ¹¦ÄܺÍÆ·ÖÊ¡£Ê¹ÆäÖð²½³ÉΪPC½Ó¿Ú±ê×¼£¬½øÈëÁ˸ßËÙ·¢Õ¹ÆÚ¡£
ÄÇô¶ÔÓÚʹÓÃLinuxϵͳ£¬ÕýÈ·Ö§³ÖºÍÅäÖó£¼ûµÄUSBÉ豸£¬¾ÍÊÇÆäʹÓñز»¿ÉÉٵĹؼüÒ»²½¡£
»ØÒ³Ê×
Ïà¹Ø¼¼Êõ»ù´¡
Ä£¿é£¨Çý¶¯³ÌÐò£©
Ä£¿é£¨module£©ÊÇÔÚÄں˿ռäÔËÐеijÌÐò£¬Êµ¼ÊÉÏÊÇÒ»ÖÖÄ¿±ê¶ÔÏóÎļþ£¬Ã»ÓÐÁ´½Ó£¬²»ÄܶÀÁ¢ÔËÐУ¬µ«ÊÇ¿ÉÒÔ×°Ôص½ÏµÍ³ÖÐ×÷ΪÄں˵ÄÒ»²¿·ÖÔËÐУ¬´Ó¶ø¿ÉÒÔ¶¯Ì¬À©³äÄں˵ŦÄÜ¡£Ä£¿é×îÖ÷ÒªµÄÓô¦¾ÍÊÇÓÃÀ´ÊµÏÖÉ豸Çý¶¯³ÌÐò¡£
Linux϶ÔÓÚÒ»¸öÓ²¼þµÄÇý¶¯£¬¿ÉÒÔÓÐÁ½ÖÖ·½Ê½£ºÖ±½Ó¼ÓÔص½Äں˴úÂëÖУ¬Æô¶¯ÄÚºËʱ¾Í»áÇý¶¯´ËÓ²¼þÉ豸¡£ÁíÒ»ÖÖ¾ÍÊÇÒÔÄ£¿é·½Ê½£¬±àÒëÉú³ÉÒ»¸ö.oÎļþ¡£µ±Ó¦ÓóÌÐòÐèҪʱÔÙ¼ÓÔؽøÄں˿ռäÔËÐС£ËùÒÔÎÒÃÇËù˵µÄÒ»¸öÓ²¼þµÄÇý¶¯³ÌÐò£¬Í¨³£Ö¸µÄ¾ÍÊÇÒ»¸öÇý¶¯Ä£¿é¡£
É豸Îļþ
¶ÔÓÚÒ»¸öÉ豸£¬Ëü¿ÉÒÔÔÚ/devÏÂÃæ´æÔÚÒ»¸ö¶ÔÓ¦µÄÂß¼É豸½Úµã£¬Õâ¸ö½ÚµãÒÔÎļþµÄÐÎʽ´æÔÚ£¬µ«Ëü²»ÊÇÆÕͨÒâÒåÉϵÄÎļþ£¬ËüÊÇÉ豸Îļþ£¬¸üÈ·ÇеÄ˵£¬ËüÊÇÉ豸½Úµã¡£Õâ¸ö½ÚµãÊÇͨ¹ýmknodÃüÁÁ¢µÄ£¬ÆäÖÐÖ¸¶¨ÁËÖ÷É豸ºÅºÍ´ÎÉ豸ºÅ¡£Ö÷É豸ºÅ±íÃ÷ÁËijһÀàÉ豸£¬Ò»°ã¶ÔÓ¦×ÅÈ·¶¨µÄÇý¶¯³ÌÐò£»´ÎÉ豸ºÅÒ»°ãÊÇÇø
Ïà¹ØÎĵµ£º
ʲôÊÇ LVM
LVM ÊÇÂß¼Å̾í¹ÜÀí£¨Logical Volume Manager£©µÄ¼ò³Æ£¬ËüÊÇ Linux »·¾³Ï¶ԴÅÅÌ·ÖÇø½øÐйÜÀíµÄÒ»ÖÖ»úÖÆ£¬LVM
Êǽ¨Á¢ÔÚÓ²Å̺ͷÖÇøÖ®ÉϵÄÒ»¸öÂß¼²ã£¬À´ÎªÎļþϵͳÆÁ±Îϲã´ÅÅÌ·ÖÇø²¼¾Ö£¬´Ó¶øÌá¸ß´ÅÅÌ·ÖÇø¹ÜÀíµÄÁé»îÐÔ¡£Í¨¹ý LVM
ϵͳ¹ÜÀíÔ±¿ÉÒÔÇáËɹÜÀí´ÅÅÌ·ÖÇø£¬È磺½«Èô¸É¸ö´ÅÅÌ·ÖÇøÁ¬½ÓΪһ¸öÕû¿éµÄ¾í×é ......
Ä¿Ç°£¬Linux×÷ΪǶÈëʽϵͳµÄÖ÷Á¦¾ü£¬¹ã·ºÓ¦ÓÃÓÚÏû·ÑÀàµç×Ó¡¢¹¤Òµ¿ØÖÆ¡¢¾ü¹¤µç×Ó¡¢µçÐÅ/ÍøÂç/ͨѶ¡¢º½¿Õº½Ìì¡¢Æû³µµç×Ó¡¢Ò½ÁÆÉ豸¡¢ÒÇÆ÷ÒDZíµÈÏà¹ØÐÐÒµ¡£Ëæ×ÅǶÈëʽÐÐÒµµÄѸÃÍ·¢Õ¹£¬Ç¶ÈëʽLinuxƾ½èÆäϵͳ·¢Õ¹µÄ³ÉÊì¶È¡¢Êг¡Ó¦Óõĸ߷ݶîÒ²Êܵ½¸ü¶à¹¤³ÌʦÅóÓѵÄÇàíù£¬Ô½À´Ô½¶àµÄÆóÒµºÍÑз¢»ú¹¹¶¼×ªÏòǶÈëʽLinuxµÄ¿ª·¢ºÍÑо ......
1.Linux“Ï߳̔
½ø³ÌÓëÏß³ÌÖ®¼äÊÇÓÐÇø±ðµÄ£¬²»¹ýLinuxÄÚºËÖ»ÌṩÁËÇáÁ¿½ø³ÌµÄÖ§³Ö£¬Î´ÊµÏÖÏß³ÌÄ£ÐÍ¡£LinuxÊÇÒ»ÖÖ“¶à½ø³Ìµ¥Ï߳̔µÄ²Ù×÷ϵͳ¡£Linux±¾ÉíÖ»Óнø³ÌµÄ¸ÅÄ¶øÆäËùνµÄ“Ï߳̔±¾ÖÊÉÏÔÚÄÚºËÀïÈÔÈ»Êǽø³Ì¡£
´ó¼Ò ......
¼òÊö
Ò» ÁÐÎļþÇåµ¥
¶þ£ºÖ´ÐгÌÐò
Èý£ºÏÔʾÊý¾Ý
ËÄ£º¶Ïµã(breakpoint)
Î壮¶ÏµãµÄ¹ÜÀí
Áù£®±äÁ¿µÄ¼ì²éºÍ¸³Öµ
Æß. µ¥²½Ö´ÐÐ
°Ë£®º¯ÊýµÄµ÷ÓÃ
&nb ......
Ò»¡¢Óû§¹ÜÀí»ù´¡
ÔÚLinux»·¾³Ï¶ÔÓû§µÄ¹ÜÀíÓжàÖÖ·½Ê½£¬°üÀ¨Óñ༹¤¾ßVi¡¢emacsµÈ¶Ô/etc/passwd½øÐвÙ×÷»òÖ±½ÓʹÓÃ
addusr¡¢deleusrµÈÓû§¹ÜÀíÃüÁîÒÔ¼°Ê¹ÓÃpwconvÃüÁîʹ/etc/passwdÓëshadowÎļþ±£³ÖÒ»Ö¡£ÎÒÃÇÏÈÀ´¿´¿´LinuxÏÂÓÃ
»§¹ÜÀíµÄ³£ÓòÙ×÷¶¼×öÁËЩʲô°É¡£
1¡¢Ôö¼ÓÓû§
Ôö¼ÓÓû§ÓÐÈý¸ö¹ý³Ì:
(1) ÔÚ/etc ......