\documentclass[letterpaper]{article}
\nonstopmode
\bkai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{Linux PCMCIA HOWTO ÖÐÎÄ°æ}
\author{×÷Õß: David Hinds, {\ttfamily dhinds@hyper.stanford.edu}\\ 
ÒëÕß: Ð»À¥ÖÐ HSIEH Kun-Chung, Ì¨Íå ÖÐ»ªÃñ¹ú Taiwan, Republic of China (NOT People's Republic of China)
{\ttfamily (\onlynameurl{linuxer.bbs@cis.nctu.edu.tw} )}}
\date{1998Äê2ÔÂ19ÈÕ v2.5°æ}
\abstract{±¾ÎÄ¼þÖ÷ÒªÃèÊöÈçºÎÔÚ  Linux ÏÂ°²×°¼°Ê¹ÓÃ PCMCIA ¿¨·þÎñ³ÌÊ½²¢»Ø´ð´ó¼Ò³£ÎÊµ½µÄÎÊÌâ¡£Õâ·ÝÎÄ¼þ×îÐÂµÄ°æ±¾»á·ÅÔÚ \nameurl{ftp://hyper.stanford.edu/pub/pcmcia/doc}{}
¡£ÁíÍâ HTML °æ±¾»á±»·ÅÔÚ \nameurl{http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html}{}¡£}


\begin{document}
\maketitle
\tableofcontents

\section{Ò»°ã×ÊÑ¶¼°Ó²ÌåÒªÇó}


\subsection{¼ò½é}

¸ø Linux Ê¹ÓÃµÄ¿¨Æ¬·þÎñ³ÌÊ½ÊÇ¸öÍêÕûÖ§Ô® \idx{PCMCIA} µÄÌ×¼þ¡£
Ëü°üº¬ÁË×é³É PCMCIA ¿¨·þÎñ³ÌÊ½Ó¦ÓÃ³ÌÊ½½éÃæµÄÒ»Ì×¿ÉÔØÈëÄ£×é¡¢Ò»Ì×¸ø
ÌØ±ð¿¨Æ¬Ê¹ÓÃµÄ¿Í»§Çý¶¯³ÌÊ½Ê½¡¢Ò»¸ö¿É·´Ó¦³ö¿¨Æ¬²åÈë¡¢³é³ö²¢ÒÀÐèÒªÀ´
ÔØÈë»òÐ¶ÏÂÇý¶¯³ÌÊ½µÄ¿¨Æ¬¹ÜÀí¾«Áé¡£ ËüÖ§Ô® `` ÈÈ»ú½»»» '' PCMCIA ¿¨
Æ¬£¬Òò´ËÄØ£¬¿¨Æ¬¾Í¿ÉÒÔÔÚÈÎºÎÊ±¼ä²åÈë»ò³é³öÁË¡£

±¾ÈíÌåÈÔÔÚ·¢Õ¹ÖÐ£¬ËùÒÔ¿ÉÄÜÔÚ³ÌÊ½¡õÓÐÐ¡³æ£¬ÇëÄúÐ¡ÐÄÊ¹ÓÃ¡£ÎÒ½«¾¡Á¦°Ñ
ÎÒËùÖªµÀµÄÎÊÌâÐÞÕý£¬¿ÉÊÇÈç¹ûÄú²»¸æËßÎÒÄúÔÚÊ¹ÓÃÉÏËù·¢ÉúµÄ³ÌÊ½ÎÊÌâ£¬
Ò²ÐíÎÒ¾ÍÎÞ·¨ÖªµÀÎÊÌâËùÔÚ¡£Òò´Ë£¬Èç¹ûÄúÊ¹ÓÃÕâ¸ö³ÌÊ½£¬ÇëÀ´ÐÅ¸æËßÎÒÄú
Ê¹ÓÃ¾­Ñé£¬²»ÂÛÊÇºÃÊÇ»µ¡£

Èç¹ûÄúÓÐÈÎºÎÔõÑù¸Ä½øÕâ·ÝÎÄ¼þµÄ±¦¹óÒâ¼û£¬Ò²ÇëÈÃÎÒÖªµÀ ({\ttfamily dhinds@hyper.stanford.edu})¡£




\subsection{Öø×÷È¨Ðû¸æÓë½â³ýÐÞ¿î}

Öø×÷È¨Êôì¶ Copyright (c) 1998 David A. Hinds

±¾ÎÄ¼þ²»ÐèÔÚÎÒµÄÊÂÏÈÔÊÐíÏÂ¼´¿ÉÈÎºÎÐÎÊ½µØ±»¸´ÖÆ»òÉ¢²¼¡£±¾ÎÄ¼þµÄÈÎºÎ
ÐÞ¸Ä¹ýµÄ°æ±¾ (Õâ°üº¬·­Òë³ÉÆäËûÓïÑÔµÄ°æ±¾ ) Ò²¿ÉÒÔÃâ·ÑµØ±»É¢²¼£¬ Ö»
ÒªËûÃÇÖªµÀÕâµã²¢ÇÒÔÚ²»Ëðº¦±¾ÎÄÕÂµÄ°æÈ¨µÄÇ°ÌáÏÂ¡£

±¾ÎÄ¼þ²»ÐèÔÚÎÒµÄÊÂÏÈÔÊÅµÏÂÓÃÔÚÉÌÒµÐÔµÄÉ¢²¼ÉÏ£¬ËäÈ»Õâ²»ÊÇ±ØÒªµÄ£¬µ«
ÎÒºÜÏ£ÍûÄúÄÜ¸æËßÎÒÓÐ¹ØÄúµÄÊ¹ÓÃ¡£Èç¹ûÄúÏë½«±¾ÎÄ¼þ³ö°æµ½Êé¼®ÉÏ£¬ÇëÄú
ÓëÎÒÁ¬ÂçÒ»ÏÂ£¬ÒÔÈ·¶¨ÄúÓÐ×îÐÂµÄ°æ±¾¡£

±¾ÎÄ¼þÖ»ÊÇ `` ³ÊÏÖ '' µÄ±íÏÖ¶øÒÑ£¬²¢Ã»ÓÐÈÎºÎÃ÷ÏÔ»ò°µÊ¾ÈÎºÎµÄ±£Ö¤¡£
Äú×ÔÒÑ±ØÐë³Ðµ£Ê¹ÓÃ±¾ÎÄ¼þ¡õÃæµÄ×ÊÑ¶Ö®·çÏÕ¡£




\subsection{×îÐÂ°æ±¾ÊÇÄÄ¸ö£¿ÎÒ¿É´ÓÄÄ¶ùÄÃµ½£¿\label{where}}

Ä¿Ç°×îÐÂµÄ¿¨Æ¬·þÎñ³ÌÊ½Îª 3.0 °æ£¬ Ð¡·ùÐÞ¸Ä»ò³ý³æ¹ýµÄ°æ±¾Îª 3.0.1¡¢
3.0.2 µÈµÈÈç´ËÀàÍÆ¡£

×îÐÂµÄÔ­Ê¼³ÌÊ½Âë¿É´Ó         {\ttfamily hyper.stanford.edu}          ÄÚµÄ
{\ttfamily /pub/pcmcia} Ä¿Â¼ÕÒµ½£¬ ½Ð×ö {\ttfamily pcmcia-cs-3.0.?.tar.gz}¡£
ÔÚÄÇ¶ùÍ¨³£»áÓÐÊý¸ö°æ±¾ÔÚ¡£Í¨³£ÎÒÖ»»á°Ñ×îÐÂµÄ¼¸¸öÐÞ¸Ä°æ·ÅÔÚ´Ë´¦¡£ÐÂ
°æ±¾Í¨³£¶¼°üº¬ÁËÎ´²âÊ½Íê³ÉµÄ³ÌÊ½Âë£¬Òò´ËÎÒÒ²»á°ÑÉÏÒ»¸öÎÈ¶¨µÄÐÞÕý°æ
·ÅÔÚÄÇ¶ùÒÔ±¸²»Ê±Ö®Ðè¡£ÏÖÔÚµÄÎÈ¶¨°æÎª 2.9.12 °æ£¬ÒªÊ¹ÓÃÄÄ¸ö°æ±¾½ÏºÃ
ÄØ£¿ËæÄúµÄÒâË¼À²¡£ÔÚ {\ttfamily CHANGES} µµ°¸ÄÚ»á×ö¼òµ¥µÄ°æ±¾²îÒì±È½Ï¡£

{\ttfamily hyper.stanford.edu}  »á±»¶ÔÓ³µ½ {\ttfamily sunsite.unc.edu} (ÒÔ¼°ËùÓÐ
µÄ sunsite ¶ÔÓ³ÍøÕ¾ÉÏ ) µÄ {\ttfamily /pub/Linux/kernel/pcmcia} ÄÚ¡£

¼ÙÊ¹Äú²»Ïë×Ô¼º±àÒë  PCMCIA  ³ÌÊ½µÄ»°£¬ ÊÐÃæÉÏÖ÷ÒªµÄ Linux ¹©Ó¦ÉÌÈç
Slackware¡¢ Red Hat¡¢Caldera¡¢Yggdrasil µÈµÈ¶¼ÓÐÒÑ±àÒëºÃµÄ³ÌÊ½¿ÉÊ¹
ÓÃ¡£




\subsection{ÄÄÐ©ÏµÍ³±»Ö§Ô®ÄØ£¿}

ÕâÐ©³ÌÊ½Ó¦¸Ã¿ÉÒÔÔÚ Linux ÏàÈÝµÄ±Ê¼ÇÐÍµçÄÔÉÏÕý³£¹¤×÷¡£³£¼ûµÄ PCMCIA
¿ØÖÆÆ÷¶¼ÓÐÖ§Ô®£¬ ÕâÐ©°üÀ¨ÒÔÏÂ³§ÉÌ£º Intel¡¢ Cirrus¡¢ Vadem¡¢VLSI¡¢
Ricoh ¼° Databook chips¡£ ÒàÖ§Ô® IBM ¼° Toshiba µÄ±Ê¼ÇÐÍµçÄÔ¡£Ö»Òª
ÊÇÖ±½Ó²åÉÏ ISA ½éÃæ²Û (SCSI-to-PCMCIA  »ò IDE-to-PCMCIA ) ²»¹ÜÊÇµÄ
×ÀÉÏÐÍµçÄÔÖ® PCMCIA ²å²Û×°ÖÃÒàÊÜÖ§Ô®¡£

\idx{CardBus}  ÇÅ½Ó¿ØÖÆÆ÷×ñÑ­Öø ``Yenta'' ÔÝ´æÆ÷¹æ¸ñ (°üÀ¨ TI
¡¢Cirrus¡¢SMC¡¢O2Micro¡¢Omega Micro ºÍ Ricoh µÄ¾§Æ¬ ) ¶¼±»Ö§Ô®£¬µ«
¶Ôì¶ 32 Î»ÔªµÄ CardBus ¿¨Æ¬ÈÔÖ»Êôì¶ÊµÑéÐÔÖÊ¡£Çý¶¯³ÌÊ½°æ±¾±È 3.0 °æ
»¹ÔçµÄÔÚ CardBus ²å²ÛÖÐÒ²Ö»ÄÜÖ§Ô®µ½ 16 Î»ÔªµÄ¿¨¡£ ÓÉì¶±Ê¼ÇÐÍµçÄÔÓ²
Ìå¿Æ¼¼µÄ¿ìËÙ½ø²½£¬ÐÂÐÍ¿ØÖÆÆ÷Ê±³£³öÏÖ£¬Òò´Ë£¬ÐÂµÄ²úÆ·³öÏÖÔÚÊÐ³¡ÉÏÓë
¶ÔÓ³µÄÇý¶¯³ÌÊ½Ö§Ô®µÄÉÏÊÐ¿ÉÄÜ»áÓÐÐ©Ê±¼äÉÏµÄ³öÈë¡£

ÔÚ Hyundai ±Ê¼ÇÐÍµçÄÔÉÏÊ¹ÓÃµÄ Motorola 6AHC05GA ¿ØÖÆÆ÷²¢²»±»Ö§Ô®¡£
ÔÚ HP Omnibook 600 ÉÏµÄ PCMCIA ¿ØÖÆÆ÷Òà²»±»Ö§Ô®¡£




\subsection{ÄÄÐ©PCMCIA¿¨±»Ö§Ô®ÄØ£¿}

Ä¿Ç°µÄ°æ±¾ÓÐÍøÂ·¿¨¡¢ Êý¾Ý¿¨¡¢´®ÁÐ²º¿¨¡¢SCSI ½éÃæ¿¨¡¢ATA/IDE Ó²µú¿¨
ÒÔ¼°Ö§Ô® SRAM ºÍ¿ìÉÁ¼ÇÒäÌå¿¨µÄ¼ÇÒä¿¨Çý¶¯³ÌÊ½£¬{\ttfamily SUPPORTED.CARDS}
µµ°¸ÄÚ°üº¬ÁË¸÷°æ±¾ÖÐÓÐÖ§Ô®µÄ PC ¿¨Ãû³Æ£¨ÖÁÉÙÔÚÒ»¸öÏµÍ³ÉÏ¿ÉÊ¹ÓÃ½ÔÁÐ
Èë£©¡£

µ«²»ÔÚÁÐ±íÄÚµÄ PC ¿¨Ò²ÓÐ¿ÉÄÜ¿ÉÒÔÊ¹ÓÃ¡£»ù±¾ÉÏ£¬ËùÓÐµÄÊý¾Ý¿¨¶¼¿ÉÒÔÊ¹
ÓÃ¡£ ÓÐÐ©Î´ÁÐÈëµÄÍøÂ·¿¨ÈôËûÃÇÊÇ±»Ö§Ô®µÄ¿¨Ö® OEM °æ±¾Òà¿ÉÊ¹ÓÃ¡£ÆäËû
IO ¿¨£¨Èç»º³å¼ÇÒäÌå¿¨¡¢ÒôÐ§¿¨µÈµÈ£©´ó²¿·ÝÄ¿Ç°¶¼²»Ö§Ô®£¬ ³ý·ÇÓÐÈËÎª
ËüÃÇÐ´Çý¶¯³ÌÊ½¡£




\subsection{Ê²÷áÊ±ºòÎÒµÄÐÂ¿¨Æ¬²Å»á±»Ö§Ô®ÄØ£¿}

ÒÅº³µÄÊÇ£¬ÕâÐ©³§ÉÌ²¢Ã»ÓÐ¸¶¸øÎÒÈÎºÎ³êÀÍÀ´Ð´Éè±¸Çý¶¯³ÌÊ½¡£Òò´Ë£¬Èç¹û
ÄúÏëÈÃÄúµÄ¿¨±»Ö§Ô®£¬ÄúÖÁÉÙÒª×öµãÊÂ¡£ ÀíÏëÉÏ£¬ÎÒ½ÏÏ²»¶Ïñ×ö Linux ºË
ÐÄÄÇÑùµÄÄ£Ê½Òà¼´ÎÒÖ÷Òª¸ºÔð PCMCIA µÄºËÐÄ³ÌÊ½Âë£¬ÆäËûµÄÅóÓÑÔò¹±Ï×ÔÚ
ÌØÊâµÄ PC ¿¨µÄÇý¶¯³ÌÊ½ÉÏ¡£ÔÚ {\ttfamily SUPPORTED.CARDS} µµ°¸ÖÐÌáµ½ÓÐÐ©¿¨
ËùÓÃÇý¶¯³ÌÊ½ÕýÔÚ½ø²½ÖÐ¡£ ÔÚÎÒÄÜÁ¦Ëù¼°µÄµØ·½ÎÒ»á¾¡Á¿°ïÃ¦£¬ ²»¹ýÍ¸¹ý
Email À´×ö³ý´íºËÐÄÉè±¸Çý¶¯³ÌÊ½²¢²»ÊÇºÜÓÐÐ§ÂÊµÄ¡£

ÖÆÔìÉÌÈôÓÐÐËÈ¤ÈÃ×Ô¼º¹«Ë¾µÄ²úÆ·±»  Linux ËùÖ§Ô®¿ÉÓëÎÒÁ¬Âç×ö½øÒ»²½µÄ
Ç¢Ñ¯Óë°²ÅÅ¡£




\subsection{ÓÊ¼ÄÃû²á¼°ÆäËû×ÊÑ¶À´Ô´}

ÎÒÔø¾­Î¬»¤Ò»¸ö Linux PCMCIA µÄÊ¹ÓÃÕßÓÊ¼ÄÃû²á¡£¶øÏÖÔÚÎÒÒÑ½«ÎÒµÄÍøÒ³
µ÷Õû³É¡å³¬Ã½ÌåÐÂÎÅ¡åÍøÕ¾£¬ÀïÍ·ÓÐÒ»ÏµÁÐÓÐ¹Ø Linux PCMCIA µÄ×ÊÑ¶ÏîÄ¿
£º ÓÐÕë¶Ô²»Í¬ÐÍÊ½µÄ¿¨Æ¬Ö®°²×°ÓëÉè¶¨¡¢PCMCIA ¿¨Ö®Ïà¹Ø³ÌÊ½Éè¼ÆÓë³ý´í
¡£Õâ¸ö Linux PCMCIA ×ÊÑ¶ÍøÒ³ÔÚ {\ttfamily http: //hyper.stanford.edu/HyperNews/get/pcmcia/home.html}
ÉÏ¡£Ê¹ÓÃÕß¿ÉÒÔÉêÇë¾­ÓÉµç×ÓÓÊ¼þµÄ·½Ê½À´Í¨ÖªÄú½Ï¸ÐÐËÈ¤µÄÐÂÑ¶Ï¢¡£ÎÒÆÚ
ÍûÕâÑù×Ó¿ÉÒÔ½«ÕâÐ©³¬¹ý  HOWTO (¡åÔõ÷á×ö¡å ) ¡õÎ§µÄÎÊÌâÌÖÂÛ±äÎªÒ»¸ö
ÊµÓÃµÄ×ÊÑ¶±¦¿â¡£

ÓÐ¸öÕë¶Ô±Ê¼ÇÐÍµçÄÔÊ¹ÓÃ Linux µÄÓÊ¼ÄÃû²á½Ð×ö ``linux-laptop''  ÓÊ¼Ä
Ãû²á¡£ ÈôÒª¸ü½øÒ»²½µÄ×ÊÑ¶£¬ Çë¼ÄÒ»·âº¬ÓÐ ``help'' Ò»×ÖµÄµç×ÓÓÊ¼þµ½
{\ttfamily majordomo@vger.rutgers.edu}¡£ ÈôÄúÒª¶©ÔÄÕâ·Ý×ÊÑ¶£¬Çë¼ÄÒ»·âº¬ÓÐ
``subscribe linux-laptop'' µÄµç×ÓÓÊ¼þµ½ÉÏÃæÏàÍ¬µÄ Email µØÖ·¡£Õâ·Ý
ÓÊ¼ÄÃû²áÊÇÒ»·ÝÓÐ¹Øì¶ Linux PCMCIA µÄ²»´íÂÛÌ³Å¶¡£

Linux Laptop ÍøÒ³ÔÚ {\ttfamily http://www.cs.utexas.edu/users/kharker/linux-laptop}
ÉÏ£¬ ¡õÃæÓÐÁ¬½áÖÁÌØ¶¨µÄ±Ê¼ÇÐÍµçÄÔÔÚ°²×° Linux £¨¼° PCMCIA £©Ê±µÄ×Ê
Ñ¶¡£»¹ÓÐÒ»·Ý¿ÉÑ°ÕÒÏµÍ³½¨¹¹×ÊÑ¶µÄ×ÊÁÏ¿â¡£




\subsection{Ôõ÷á²»Ìá¹© PCMCIA µÄ¶þ½øÎ»ÂëÄØ£¿}

¶ÔÎÒ¶øÑÔ£¬Ìá¹©¶þ½øÎ»Âë»áÀ§ÄÓÎÒ¡£ÕâÓÐµã¸´ÔÓ£¬ÒòÎªÓÐÐ©¹¦ÄÜÖ»ÄÜÔÚ±àÒë
Ê±±»Ñ¡Ôñ£¬¶øÇÒ PCMCIA Ä£×éÓÖÄÇ÷áÒÀÀµºÏÊÊµÄºËÐÄ½¨¹¹¡£ËùÒÔ£¬ÎÒÖ»ÄÜÌá
¹©°éËæÖøºÏÊÊµÄºËÐÄÖ®Î´±àÒëµÄÄ£×é¡£¿öÇÒ£¬µ±Òª°²×°µ½Ò»¸öÇ¬¾»µÄÏµÍ³ÉÏ
Ê±ÊÇ×îÐèÒªÎ´±àÒëµÄÄ£×éµÄ¡£ Ò»°ãÀ´Ëµ£¬Ã¿¸ö Linux ¹©Ó¦ÉÌ»áÐèÒªÔÚ°²×°
¹ý³ÌÖÐÉè¶¨ PCMCIA À´Ê¹ÓÃËüµÄ¹¦ÄÜ¡£Ã¿¸ö¹©Ó¦ÉÌ¶¼ÓÐ×Ô¼ºµÄ³ÌÐò£¬ËùÒÔÓÉ
ÎÒÀ´¹©Ó¦¿ª»ú¼°¸ù´Åµú¸øËûÃÇºÃÏñÓÐµã²»Ì«ÊÊºÏ¡£

PCMCIA ÏÖÔÚÒÑÊÇÐí¶àÖ÷Òª  Linux ¹©Ó¦ÉÌµÄÒ»²¿·ÝÁË£¬ Õâ°üº¬ Red Hat¡¢
Caldera¡¢ Slackware¡¢Yggdrasil¡¢Craftworks ¼° Nascent Technology¡£




\subsection{ÎªÊ²÷á PCMCIA Ì×¼þÕâ÷á´óÄØ£¿}

àÞ! Ê×ÏÈÎÒÒªËµµÄÊÇ£¬ËüÕæµÄ²»´ó¡£ËùÓÐµÄÇý¶¯³ÌÊ½Ä£×é¼ÓÆðÀ´Ö»ÐèÔ¼ 200
K µÄ´Åµú¿Õ¼ä¶øÒÑ¡£ ¹«ÓÃ³ÌÊ½²¿·Ý¼ÓÆðÀ´Ô¼ 70K£¬·ÅÔÚ /etc/pcmcia ¡õµÄ
×ÊÁÏÔ¼ 30K¡£µ±Ö´ÐÐÊ±£¬PCMCIA µÄºËÐÄÄ£×éÕ¼ÓÃÔ¼ 48K µÄÏµÍ³¼ÇÒäÌå¡£Í¨
³£ cardmgr ¾«Áé³ýÁËÔÚ¿¨Æ¬±»²åÈë»òÒÆ³öÊ±Íâ¶¼»á±»ÒÆ³ö¼ÇÒäÌåµÄ¡£ ËùÓÐ
Ì×¼þµÄ´óÐ¡²¢²»»á¸ú DOS µÄ¿¨Æ¬·þÎñ³ÌÊ½Ö´ÐÐÊ±ÓÐ¶à´óµÄ²î±ð¡£

ÕâÓë DOS µÄµ¥µãÆôÓÃÆ÷Ïà±ÈËÆºõ»¹±ÈËüÃÇµÄºÃ¡£ ÌØ±ðÊÇÓÐÈË²¢²»»áÊ¹ÓÃµ½
PCMCIA µÄËùÓÐ¹¦ÄÜ£º±ÈÈçËµÄÜÔ´¹ÜÀí»òÈÈ»ú½»»»¹¦ÄÜ¡£ ÒòÎªµ¥µãÆôÓÃÆ÷´ó
²¿·ÝÖ»ÐèÖ§Ô®Ò»ÖÖ»òÉÙÐíµÄ¿¨Æ¬ÒÔ¼°Ö§Ô®ÉÙÐíµÄ PCMCIA ¿ØÖÆÆ÷£¬ËùÒÔ¿ÉÒÔ
×öµÃÐ¡Ò»Ð©¡£Èç¹ûÓÐÈËÒªÐ´¸öÌì²ÅÐÍµÄÊý¾Ý»ú¿ªÆôÆ÷£¬µ½ááÍ·¿ÉÄÜ»á°ÑÐí¶à
¿¨Æ¬·þÎñµÄ¹¦ÄÜ¶¼¼Ó½øÈ¥²ÅÄÜÓ¦¸¶²»Í¬µÄ¿¨Æ¬³§ÉÌÒÔ¼°¿ØÖÆÆ÷ÁË¡£




\section{±àÒëÓë°²×°}


\subsection{×¼±¸¹¤×÷ÓëºËÐÄÉè¶¨\label{prereq}}

ÔÚ¿ªÊ¼Ç°£¬ ÄúÓ¦¸ÃÏëÏëÊÇ·ñÐèÒª×Ô¼ºÀ´±àÒë PCMCIA Ì×¼þ¡£ ÒòÎª´ó²¿·ÝµÄ
Linux ¹©Ó¦ÉÌ°æ±¾ÒÑº¬ÓÐÒÑ±àÒë¹ýµÄ PCMCIA Çý¶¯³ÌÊ½Ì×¼þ¡£Ò»°ãÉÏÀ´Ëµ£¬
Èç¹ûÄúÐèÒª×îÐÂµÄÇý¶¯³ÌÊ½»òÄú¸ü¶¯µÄ  Linux ¹©Ó¦ÉÌ°æ±¾ÄÚµÄºËÐÄºÍÄúÔ­
±¾µÄ PCMCIA Çý¶¯³ÌÊ½ÎÞ·¨ÏàÈÝÊ±²Å»áÐèÒª×Ô¼º¶¯ÊÖ×ö¡£ ËäÈ»±àÒë PCMCIA
Ì×¼þÔÚ¼¼ÊõÉÏ²¢²»ÄÑ£¬µ«»¹ÊÇÐèÒªÄú¶Ô Linux ÒÑÓÐÒ»¶¨µÄÊìÏ¤µÄ¡£

ÏÂÁÐµÄ¶«Î÷±ØÐëÔÚÄú¿ªÊ¼°²×°PCMCIA³ÌÊ½Ö®Ç°ÏÈÐÐ°²×°Í×µ±£º
\begin{itemize}
\item Ò»¸ö°æ±¾ 2.0.*  »ò 2.1.* ÏµÁÐµÄºËÐÄÔ­Ê¼³ÌÊ½Ê÷¡£
\item   Ò»Ì×ºÏÊÊµÄÄ£×é¹«ÓÃ³ÌÊ½¡£
\item  (Ñ¡ÔñÐÔ ) ``XForms'' X11 Ê¹ÓÃÕß½çÃæ¹¤¾ß×é
\end{itemize}


Ä¿Ç°µÄÇý¶¯³ÌÊ½Ì×¼þÊÂÊµÉÏ¿ÉÔÚºËÐÄ°æ±¾  1.2.8 ¿ªÊ¼µÄºËÐÄ°æ±¾ÉÏÕý³£¹¤
×÷¡£¶øÓÃ¾ÉÒ»µãµÄºËÐÄ°æ±¾¾Í±³µÀ¶ø³ÛÁËÐ©£¬×îºÃ²»ÒªÕâÑù¡£

Äú»¹ÐèÒªÍêÕûµÄ Linux Ô­Ê¼³ÌÊ½Ê÷£¬ ²»ÊÇÖ»ÓÐ×îÐÂ°æµÄºËÐÄÓ³Ïñµµ¾Í¿ÉÓÃ
À´±àÒë PCMCIA Ì×¼þµÄ¡£ PCMCIA Ä£×éº¬ÓÐÒ»Ð©¶ÔºËÐÄÔ­Ê¼³ÌÊ½µµ°¸µÄ²Î¿¼
Ö¸Áî£¬   Ò²ÐíÄú»áÏë×ö¸ö²»º¬ÄÇÐ©²»±ØÒªµÄÇý¶¯³ÌÊ½µÄºËÐÄ£¬   µ«ÊÇ°²×°
PCMCIA ²¢²»ÐèÒªÄúÕâ÷á×ö¡£

Ä¿Ç°ÎÈ¶¨µÄµÄºËÐÄ³ÌÊ½µÄÔ­Ê¼µµ¼°ÐÞ²¹µµ¿ÉÒÔÔÚ \nameurl{ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0}{}
»ò \nameurl{ftp://tsx-11.mit.edu/pub/linux/sources/system/v2.0}{}
ÄÚÕÒµ½¡£ ·¢Õ¹ÖÐµÄºËÐÄ³ÌÊ½¿ÉÔÚ {\ttfamily v2.1} Ä¿Â¼ÄÚÕÒµ½£¬Ä¿Ç°µÄÄ£×é¹«ÓÃ
³ÌÊ½Ò²¿ÉÔÚÍ¬ÑùµÄµØ·½ÕÒµ½¡£

ÔÚºËÐÄ 2.0 ¼° 2.1 °æËùÓÃµÄ Linux Ô­Ê¼³ÌÊ½Ê÷ÄÚµÄ {\ttfamily Documentation/Changes}
µµ°¸ÖÐÃèÊöÁËºËÐÄ³ÌÊ½ËùÐèÒªµÄ¸÷ÖÖÀà±ðµÄÏµÍ³Ôª¼þ¡£Äú¿É¼ìÊÓËü²¢ºË¶ÔÄú
µÄÏµÍ³ÊÇ·ñÎª×îÐÂ°æ±¾£¬ÓÈÆäµ±ÄúÒÑ¸üÐÂÁËºËÐÄ³ÌÊ½¡£ Èç¹ûÄúÊ¹ÓÃ 2.1 °æ
ºËÐÄ£¬ÇëÈ·ÈÏÄúÓÃÁËÕýÈ·µÄ³ÌÊ½¿âºÍÄ£×é¹¤¾ßµÄ×éºÏ¡£

µ±Äú½¨¹¹ºËÐÄÊ±£¬Èç¹ûÄú¼Æ»­ÒªÓÃ PCMCIA ÍøÂ·¿¨£¬ÄúÓ¦¸Ã´ò¿ªÍøÂ·Ö§Ô®²¢
¹ØÉÏÕý³£µÄ   Linux  ÍøÂ·¿¨Çý¶¯³ÌÊ½£¬  Õâ°üÀ¨¿Ú´üÐÍ¿ÉÐ¯Ê½ÐÍ½éÃæ¿¨¡£
PCMCIA ÍøÂ·¿¨Çý¶¯³ÌÊ½¶¼Éè¼Æ³É¿ÉÔØÈëÊ½Ä£×é£¬ ËùÒÔ½«Çý¶¯³ÌÊ½±àÒëµ½ºË
ÐÄ³ÌÊ½ÄÚÖ»»áÀË·Ñ¿Õ¼ä¶øÒÑ¡£

Èç¹ûÄúÒªÊ¹ÓÃ SLIP¡¢PPP »ò PLIP£¬¿ÉÔÚ½¨Á¢ºËÐÄÊ±½«ÕâÐ©¹¦ÄÜ´ò¿ª£¬»òÕß
Ê¹ÓÃÕâÐ©¹¦ÄÜµÄ¿ÉÔØÈëÄ£×é°æ±¾¡£ µ«ÊÇÔÚºËÐÄ 1.2.X °æ±¾ÏÂ½¨¹¹×÷ÒµÊ±ÓÐ
Ð¡È±º³£¬¾ÍÊÇ²»ÄÜÎªÔØÈëÊ½Ä£×éÉè¶¨½¨¹¹Ñ¡Ïî (ÀýÈç SLIP Ñ¹Ëõ )£¬ËùÒÔÈç
¹ûÄúÐèÒªÕâ¸ö¹¦ÄÜ£¬Ö»ºÃ½« SLIP Á¬½áµ½ºËÐÄ³ÌÐÄ¡õÁË¡£

ÎªÁËÒªÊ¹ÓÃ PCMCIA ÍØ¡õÁ´ÍøÂ·¿¨£¬ ÄúµÄºËÐÄ³ÌÊ½Ó¦¸Ã½«  ``Token  Ring
driver support'' ({\ttfamily CONFIG\_TR}) ÕâÏîÄ¿¿ªÆô£¬²¢½« {\ttfamily CONFIG\_IBMTR}
ÕâÏî¹Ø±Õ¡£

Èç¹ûÄúÒªÊ¹ÓÃ PCMCIA IDE ¿¨£¬Õë¶ÔºËÐÄ 1.3.72 ÖÁ 2.1.7 °æ£¬ ºËÐÄ½¨¹¹
Ê±Ó¦¸ÃÒª½« {\ttfamily CONFIG\_BLK\_DEV\_IDE\_PCMCIA} ¹¦ÄÜ´ò¿ª£¬¾É°æµÄºËÐÄ²¢²»
Ö§Ô®¿ÉÒÆÊ½ IDE Éè±¸£¬¶ø½ÏÐÂµÄºËÐÄ¾Í²»ÐèÕâ÷áÌØ±ðÉè¶¨ÁË¡£

Èç¹ûÄúÒªÊ¹ÓÃ PCMCIA SCSI ¿¨£¬ ÔÚ½¨¹¹ºËÐÄÊ±Ó¦½« {\ttfamily CONFIG\_SCSI} ¹¦
ÄÜ´ò¿ª¡£ ²¢ÇÒ£¬½«ÄúÒªÊ¹ÓÃµÄ SCSI Éè±¸ÏîÄ¿Ö®Çý¶¯³ÌÊ½´ò¿ª (SCSI ´Åµú
»ú¡¢´Å´ø»ú¡¢Î¨¶Á¹âµú»úµÈµÈ )¡£ËùÓÐ¸øÌØ¶¨½éÃæ¿¨µÄµÍ²ã´ÎÇý¶¯³ÌÊ½Ó¦¸Ã
Òª¹Øµô£¬ÒòÎªËüÃÇÖ»»áÕ¼ÓÃ¿Õ¼ä¶øÒÑ¡£

Èç¹ûÄúÏë°Ñ¸ø PCMCIA Éè±¸Ê¹ÓÃµÄÇý¶¯³ÌÊ½Ä£×é»¯£¬ÇëÐÞ¸Ä {\ttfamily /etc/pcmcia/config}
À´Ö¸¶¨ÄÄÐ©Ä£×éÔÚÄÄÖÖ¿¨Æ¬Ê¹ÓÃÏÂÐè±»ÔØÈë¡£ÀýÈç£¬Èç¹û´®ÁÐ²ºÇý¶¯³ÌÊ½±»
Ä£×é»¯ÁË£¬ÄÇ÷á´®ÁÐ²ºÉè±¸µÄ¶¨ÒåÓ¦¸ÃÈçÏÂ£º

\begin{tscreen}
\begin{verbatim}
device "serial_cs"
  class "serial" module "misc/serial", "serial_cs"
\end{verbatim}
\end{tscreen}


ÔÚÌ×¼þ¡õ»¹ÓÐ¸ö X »·¾³Ê¹ÓÃµÄ¿¨Æ¬×´Ì¬¹«ÓÃ³ÌÊ½ {\ttfamily cardinfo}¡£ ´Ë³ÌÊ½
ÊÇµì¶¨ÔÚÒ»¸öÃâ·Ñ¹©Ó¦µÄÊ¹ÓÃÕß½éÃæ¹¤¾ßÌ×¼þ XForms ³ÌÊ½¿â¡£Í¨³£±»¸½ÔÚ
´ó²¿·ÝµÄ Linux ¹©Ó¦ÉÌµÄ²úÆ·ÄÚ¡£ Èç¹ûÄúÏë½¨Ôì {\ttfamily cardinfo}£¬ÄúµÃÔÚ
½¨¹¹ PCMCIA Ì×¼þÇ°°²×°ºÃ XForms ºÍËùÓÐµÄÒ»°ã  X ³ÌÊ½Í·µµ¼°³ÌÊ½¿â¡£




\subsection{°²×°}

ÒÔÏÂÊÇ°²×°¹ý³ÌµÄ¼òÒª²½Öè£º

\begin{itemize}
\item ½â¿ª pcmcia-cs-3.0.?.tar.gz µ½ /usr/srcÄ¿Â¼ÄÚ
\item ÔÚÐÂµÄ  {\ttfamily pcmcia-cs-3.0.?} Ä¿Â¼ÄÚÖ´ÐÐ  ``{\ttfamily make  config}''
\item Ö´ÐÐ ``{\ttfamily make   all}''£¬ÔÙÖ´ÐÐ ``{\ttfamily make install}''¡£
\item ÎªÄúµÄÏµÍ³ÔÚ {\ttfamily /etc/pcmcia} ÄÚ×Ô¶© PCMCIA Æô¶¯ÊÖ¸åºÍÑ¡Ôñµµ°¸
¡£
\end{itemize}


Èç¹ûÄúÏë°²×°ÆäËû·ÇÖ÷Òª PCMCIA ·ÖÏíÌ×¼þ³ÌÊ½Ëù°üº¬µÄ¿Í»§¶ËÇý¶¯³ÌÊ½£¬
½«ËüÃÇ½â¿ªµ½ PCMCIA Ô­Ê¼³ÌÊ½Ê÷µÄ¶¥²ã£¬ÔÙÒÀÕý³£µÄ½¨ÔìÖ¸Áî£¬¼´¿É½«Õâ
Ôö¼ÓµÄÇý¶¯³ÌÊ½±àÒë¼°°²×°ÆðÀ´¡£

Ö´ÐÐ ``{\ttfamily make config}'' »áÁÐ³öÒ»Ð©½¨¹¹Ñ¡Ïî£¬Çë¼ì²éÄúµÄÏµÍ³²¢±È¶Ô
ÕâÐ©Ñ¡ÏîÊÇ·ñ·ûºÏ°²×° PCMCIA Ö§Ô®µÄÌõ¼þ¡£ÇëÐ¡ÐÄ¼ì²é´ËÃüÁîµÄÊä³öÑ¶Ï¢
£¬ÓÈÆäÄÄ±ßÓÐÎÊÌâÊ±¡£

Èç¹ûÄúÏë±àÒë¸ö PCMCIA Ì×¼þ¸øÆäËû»úÆ÷Ê¹ÓÃ£¬ÔÚ½¨¹¹ÊÖ¸åÖ´ÐÐµ½³öÏÖÖ¸¶¨
Ä¿±êÄ¿Â¼Ê±ÇëÖ¸¶¨¸öÌæ´úµÄÄ¿Â¼£¬ËüÓ¦¸ÃÊÇ¸ö¾ø¶ÔÂ·¾¶£¬ËùÓÐµÄ PCMCIA ¹¤
¾ß½«±»°²×°ÔÚÕâÄ¿Â¼µÄÏà¶ÔÎ»ÖÃ¡õ¡£È»áá£¬Äú¾Í¿ÉÒÔ {\ttfamily tar} Õâ¸öÄ¿Â¼Æð
À´£¬ÔÙ°ÑËü¿½±´µ½ÆäËû»úÆ÷ÉÏ£¬½âÑ¹Ëõµ½Ïà¶ÔÄ¿Â¼ÉÏááÔÙ°²×°ËüÃÇµ½ÊÊµ±µÄ
µØ·½¡£

Èç¹ûÄúÏë±àÒë¸ö PCMCIA Ì×¼þ¸øÆäËû»úÆ÷Ê¹ÓÃ£¬ÔÚ½¨¹¹ÊÖ¸åÖ´ÐÐµ½ÒªÇóÄúÖ¸
¶¨Ä¿±êÄ¿Â¼Ê±ÇëÖ¸¶¨¸öÌæ´úµÄÄ¿Â¼£¬ ËüÓ¦¸ÃÊÇ¸ö¾ø¶ÔÂ·¾¶£¬ËùÓÐµÄ PCMCIA
¹¤¾ß½«±»°²×°ÔÚÕâÄ¿Â¼µÄÏà¶ÔÎ»ÖÃ¡õ¡£È»áá£¬Äú¾Í¿ÉÒÔ {\ttfamily tar} Õâ¸öÄ¿Â¼
ÆðÀ´£¬ÔÙ°ÑËü¿½±´µ½ÆäËû»úÆ÷ÉÏ£¬½âÑ¹Ëõµ½Ïà¶ÔÄ¿Â¼ÉÏááÔÙ°²×°ËüÃÇµ½ÊÊµ±
µÄµØ·½¡£

Èç¹ûÄúÔÚÆäËûµçÄÔÉÏ×ö½»²æ±àÒë£¬Äú¿ÉÒÔÖ¸¶¨Ìæ´úµµÃû¸ø±àÒëÆ÷¼°Á¬½áÆ÷¡£
Õâ¶Ô»ìºÏÖø a.out ¼° ELF ÏµÍ³Ê±ºÜÓÐÖúÒæ¡£´ËÊÖ¸å»áÒªÇóÊäÈë×öÎª³ý´íÊ±
Ê¹ÓÃµÄ±àÒëÆì±ê¡£

Ä³Ð©Ö§Ô®¹«ÓÃ³ÌÊ½ ({\ttfamily cardctl}  ºÍ {\ttfamily cardinfo}) ¿ÉÒÔÔÚ°²È«»ò¿ÉÐÅ
µÄÐÎÊ½ÏÂ±àÒë¡£ÔÚ°²È«ÐÎÊ½ÏÂ¿ÉÒÔ·ÀÖ¹·Ç root µÄÊ¹ÓÃÕß¸ü¸Ä¿¨Æ¬µÄ½¨¹¹¡£
¿ÉÐÅµÄÐÎÊ½ÏÂÔÊÐíÒ»°ãÊ¹ÓÃÕßÖ´ÐÐÔÝÍ£¡¢¼ÌÐø¡¢ÖØÖÃ¿¨Æ¬µÄÃüÁî¼°¸Ä±äÄ¿Ç°
µÄ½¨¹¹¡£½¨¹¹ÊÖ¸å»áÎÊÄãÒª½«¹«ÓÃ³ÌÊ½±àÒë³É°²È«»ò¿ÉÐÅµÄÐÎÊ½£¬ÄÚ¶¨Îª°²
È«ÐÎÊ½¡£

ÓÐÐ©ºËÐÄ³ÌÊ½½¨¹¹Ñ¡Ïî»áÓ°Ïìµ½ PCMCIA µÄ¹¤¾ß¡£½¨¹¹ÊÖ¸å£¨Ò»°ã×´¿öÏÂ£©
»áÔÚÖ´ÐÐºËÐÄ³ÌÊ½Ê±ÍÆ¶Ï³öÕâÐ©Ó°Ïì¡£ÁíÍâ£¬Èç¹ûÄúÊÇ±àÒëÀ´°²×°µ½ÆäËû»ú
Æ÷ÉÏµÄ£¬ËüÄÜ´ÓºËÐÄÔ­Ê¼³ÌÊ½Ê÷¡õ¶Áµ½ÕâÐ©½¨¹¹£¬»òÊÇ»¥¶¯µØÉè¶¨Ã¿¸öÑ¡Ïî
¡£

Ö´ÐÐ ``{\ttfamily make all}'' áá£¬½ÓÖø ``{\ttfamily make install}'' ½«½¨Á¢²¢°²×°
ºËÐÄ³ÌÊ½Ä£×é¼°¹«ÓÃ³ÌÊ½¡£ ºËÐÄÄ£×é»á±»°²×°ÔÚ  {\ttfamily /lib/modules/$<$
°æ±¾ $>$/pcmcia} ÄÚ¡£ {\ttfamily cardmgr} ºÍ {\ttfamily cardctl} Á½³ÌÊ½±»°²
×°ÔÚ {\ttfamily /sbin} Ä¿Â¼ÄÚ¡£ Èç¹û {\ttfamily cardinfo} ÓÐ±»½¨Á¢µÄ»°£¬Ëü»á
±»°²×°ÔÚ {\ttfamily /usr/bin/X11} ¡õ¡£

½¨¹¹µµ»á±»°²×°ÔÚ {\ttfamily /etc/pcmcia} Ä¿Â¼ÄÚ¡£Èç¹ûÄú°²×°ÔÚÒ»¸ö¾É°æ
±¾Ö®ÉÏ£¬ÄúµÄ¾É°æ½¨¹¹ÊÖ¸å»á±»±¸·ÝÆðÀ´²»»á±»¸Çµô£¬±»±£´æÏÂÀ´µÄµµ°¸Ãû
³Æ»á±»¼Ó¸ö {\ttfamily *.\~{}1\~{}}¡¢{\ttfamily *.\~{}2\~{}} Ö®ÀàµÄµµÃû¡£

Èç¹ûÄú²»ÖªµÀÄúµÄ    PCMCIA    ¿ØÖÆ¾§Æ¬ÊÇÊ²÷á³§ÅÆµÄ£¬    Äú¿ÉÒÔÊ¹ÓÃ
{\ttfamily cardmgr/} Ä¿Â¼ÏÂµÄ {\ttfamily probe} ¹«ÓÃ³ÌÊ½À´Ì½²âËü¡£Ä¿Ç°×îÖ÷Òª
µÄ¾§Æ¬ÓÐ£ºDatabook TCIC-2 ¾§Æ¬¼° Intel i82365SL ÏàÈÝ¾§Æ¬¡£

ÔÚÉÙÊýÇé¿öÏÂ£¬{\ttfamily probe} ÃüÁî½«ÎÞ·¨×Ô¶¯µØÅÐ¶ÏÄúµÄ¿ØÖÆÆ÷Ö®Àà±ð¡£ Èç
¹ûÄúÓÐ¸ö Halikan NBD 486 ÏµÍ³£¬ ËüÓÐ¸ö·ÅÔÚ²»Í¬µØ·½µÄ TCIC-2 ¿ØÖÆÆ÷
£º ´ËÊ±Äú¾ÍÐèÒªÐÞ¸Ä {\ttfamily rc.pcmcia}  À´ÔØÈë {\ttfamily tcic} Ä£×é£¬ ²¢ÇÒ½«
{\ttfamily PCIC\_OPTS} ²ÎÊýÉè¶¨³É ``{\ttfamily tcic\_base=0x02c0}''¡£

ÓÐÐ©Ê¹ÓÃ Cirrus ¿ØÖÆÆ÷µÄÏµÍ³£¬ °üÀ¨ NEC Versa M ÏµÍ³µÄ BIOS »áÔÚÏµ
Í³Æô¶¯Ê±½«¿ØÖÆÆ÷ÖÃì¶Ò»¸öÌØ±ðµÄÐüÖÃ×´Ì¬ÏÂ¡£ÔÚÕâÀàÏµÍ³ÉÏ£¬{\ttfamily probe}
ÃüÁî²¢ÎÞ·¨ÕÒµ½ÈÎºÎÒÑÖªµÄ  PCMCIA  ¿ØÖÆÆ÷¡£ Èç¹û·¢ÉúÕâÖÖÊÂ£¬ ÇëÐÞ¸Ä
{\ttfamily rc.pcmcia}  ½« {\ttfamily PCIC} ÉèÎª {\ttfamily i82365}£¬ {\ttfamily PCIC\_OPTS}  Îª
``{\ttfamily wakeup=1}''¡£




\subsection{°²×°Íêáá£¨Ê¹ÓÃBSD Æô¶¯ÊÖ¸åµÄÏµÍ³£©}

ÓÐÐ© Linux ¹©Ó¦ÉÌ£¬°üÀ¨ Slackware£¬Ê¹ÓÃ BSD µÄ°²ÅÅ·½Ê½×öÎªÏµÍ³Æô¶¯
ÊÖ¸åµÄ·½ÅÅ¡£ Èç¹ûÓÐ {\ttfamily /etc/rc.d/rc.M} Õâ¸öµµµÄÏµÍ³¾ÍÊôÕâÀàÐÍ
µÄ¡£°²×°ÔÚ {\ttfamily /etc/rc.d} ÄÚµÄ {\ttfamily rc.pcmcia} ÊÖ¸å»á¿ØÖÆÆô¶¯ºÍ
¹Ø±Õ PCMCIA ÏµÍ³¡£ ÔÚ ``{\ttfamily make install}'' Ê±»áÓÃ {\ttfamily probe} ÃüÁî
À´¾ö¶¨ÄúµÄ¿ØÖÆÆ÷ÖÖÀà²¢ÊÊµ±ÐÞ¸Ä {\ttfamily rc.pcmcia} µÄÄÚÈÝ¡£Äú¿ÉÔÚÏµÍ³Æô
¶¯µµ {\ttfamily /etc/rc.d/rc.M}  ÄÚ¼ÓÉÏÒ»ÐÐÈçÏÂÃæµÄÖ¸ÁîÀ´Ö´ÐÐ  PCMCIA
Æô¶¯ÊÖ¸å¡£

\begin{tscreen}
\begin{verbatim}
/etc/rc.d/rc.pcmcia start
\end{verbatim}
\end{tscreen}


½«ÕâÐÐ²åÅÅÔÚÄÄÐÐÇ°Ãæ¶¼¿ÉÒÔ£¬Ö»Òª PCMCIA Çý¶¯³ÌÊ½ÔÚ {\ttfamily syslogd} áá
Æô¶¯¼´¿É¡£




\subsection{°²×°Íêáá£¨Ê¹ÓÃSystem V Æô¶¯ÊÖ¸åµÄÏµÍ³£©}




\subsection{°²×°Íêáá£¨Ê¹ÓÃ  System  V ÆðÊ¼ÊÖ¸åµÄÏµÍ³£©  }

 Red Hat¡¢
Caldera  ¼° Debian µÈ¹©Ó¦ÉÌµÄ Linux Ê¹ÓÃ System V ÐÍµÄ°²ÅÅÏµÍ³Æô¶¯
µµ°¸¡£ Èç¹ûÓÐ¸ö {\ttfamily /etc/init.d}  »ò {\ttfamily /etc/rc.d/init.d}
Ä¿Â¼µÄÏµÍ³¾ÍÊÇÕâÀàÐÍ¡£        {\ttfamily rc.pcmcia}        ÊÖ¸å»á±»°²×°µ½
{\ttfamily /etc/rc.d/init.d/pcmcia}  »òÊÇ {\ttfamily /etc/init.d/pcmcia}
ÏÂ¡£Ëü»á×Ô¶¯Æô¶¯ PCMCIA ¹¦ÄÜ£¬²»±ØÈ¥ÐÞ¸ÄÈÎºÎµÄÆô¶¯ÊÖ¸åÁË¡£

Èç¹û  {\ttfamily /etc/sysconfig}   Ä¿Â¼ÔÚÏµÍ³ÄÚ£¬  ÄÇ÷áÓÐÁíÒ»¸ö½¨¹¹µµ
{\ttfamily /etc/sysconfig/pcmcia} »á±»½¨Á¢ÆðÀ´×öÎªÆô¶¯Ñ¡Ïî¡£ Èç¹ûÄúÐè
Òª¸ü¸ÄÈÎºÎµÄÄ£×éÑ¡Ïî (Èç {\ttfamily PCIC=} »ò {\ttfamily PCIC\_OPTS=} Éè¶¨ )£¬ Ö»
Ðè±à¼­Õâ¸ö½¨¹¹µµ¶ø²»±ØÐÞ¸ÄÕæÕýµÄ PCMCIA Æô¶¯ÊÖ¸å¡£´Ëµµ°¸Ò²²»»á±»Íù
ááµÄ°²×°¶ø¸²¸Çµô¡£

ÓÐÐ©ÒÔÇ°µÄ°æ±¾Ê¹ÓÃ {\ttfamily /etc/sysconfig/pcmcia-scripts} Ä¿Â¼¶ø²»
ÊÇÏÖÔÚµÄ {\ttfamily /etc/pcmcia} Ä¿Â¼¡£ÏÖÔÚËùÓÐµÄÏµÍ³µÄ°æ±¾¶¼ÒÑ»ò½«¸Ä
ÓÃ {\ttfamily /etc/pcmcia} Ä¿Â¼ÁË£¬¡£




\subsection{²å²ÛÇý¶¯³ÌÊ½Ñ¡Ïî \label{timing}}

ÓÐÐ© PCMCIA ¿ØÖÆÆ÷ÓµÓÐÆäËûµÄ¹¦ÄÜ¿ÉÄÜ»áÒ²¿ÉÄÜ²»»á±»ÌØ±ðµÄÏµÍ³Ëù²ÉÓÃ
¡£¶ø²å²ÛÇý¶¯³ÌÊ½Ò²Ã»ÓÐ°ì·¨Õì²âµ½ÊÇ·ñÕâÐ©¹¦ÄÜ±»²ÉÓÃÓë·ñ¡£Çë¼ì²éÄúµÄ
²å²ÛÇý¶¯³ÌÊ½µÄ man ËµÃ÷Ò³¿´¿´ÄúµÄ¿ØÖÆÆ÷ÓÐÄÄÐ©ÆäËûµÄ¹¦ÄÜ¡£

µÍ½×µÄ²å²ÛÇý¶¯³ÌÊ½ {\ttfamily tcic} ¼° {\ttfamily i82365} ÓÐÐí¶à»ãÁ÷ÅÅ·ÖÊ±²ÎÊýÌØ
±ðÊÇÔÚ²ÉÓÃ¸ßËÙ´¦ÀíÆ÷µÄÏµÍ³ÉÏÊ±Ðè×öÐ©ÐÞ¸Ä¡£·ÖÊ±·¢ÉúÎÊÌâµÄÖ¢×´Ïñ¿¨Æ¬
±æÈÏÎÊÌâ¡¢ÔÚÖØ¸ºÔØÏÂµÄ±ÕËø¡¢´íÎó±ÈÂÊ¸ß£¬»òÊÇÔì³ÉÉè±¸ÐÔÄÜ±ä²î¡£ÏêÇé
Çë²ÎÔÄÏà¹ØµÄ man Ò³»áÓÐ¸ü¶àµÄÏ¸½Ú£¬ÔÚ´Ë¼òÊöÈçÏÂ£º

\begin{itemize}
\item Cirrus ¿ØÖÆÆ÷ÓÐÐí¶à¿É½¨¹¹µÄ·ÖÊ±²ÎÊý¡£ ×îÖØÒªµÄÓ¦¸ÃÊÇ {\ttfamily cmd\_time}
Æì±ê£¬ ËüÓÃÀ´¾ö¶¨ PCMCIA  »ãÁ÷ÅÅÖÜÆÚµÄ³¤¶È¡£ ËÙ¶È¿ìµÄ 486 ÏµÍ³£¨Èç
DX4-100 £©ÏÂ½«Ëü´Ó 6 (ÄÚ¶¨Öµ ) ¼Ó´ó³ÉÎª 12 »ò 16 Ê±¿É¿´µ½ËüÐ§¹û¡£
\item Cirrus PD6729 PCI ¿ØÖÆÆ÷ÓÐ {\ttfamily fast\_pci} Æì±ê£¬Èç¹û PCI »ãÁ÷ÅÅµÄËÙ
¶È±È 25 MHz ¿ìÊ±Ó¦¸ÃÉè¶¨Ëü¡£
\item Vadem VG-468 ¿ØÖÆÆ÷¼° Databook  TCIC-2 ¿ØÖÆÆ÷ÄÚµÄ {\ttfamily async\_clock}
Æì±ê±ØÐë¸ü¸ÄÎªÓë PCMCIA »ãÁ÷ÅÅºÍÖ÷»ãÁ÷ÅÅÏà¶ÔµÄÖÜÆÚËÙ¶È¡£¸ü¸ÄÕâ¸öÆì
±ê»áÊ¹Ä³Ð©²Ù×÷ÉÏÔö¼ÓµÈ´ýµÄÊ±¼ä¡£È»¶ø£¬ÎÒºÃÏñ»¹Ã»ÌýËµÓÐÄÄ¸ö±Ê¼ÇÐÍµç
ÄÔÐèÒªÕâ÷á×öµÄ¡£
\item {\ttfamily pcmcia\_core} Ä£×éÓÐ¸ö {\ttfamily cis\_speed} ²ÎÊý£¬ ËüÊÇÓÃÀ´¸ü¸ÄÈ¡´æ¿¨
Æ¬µÄ¿¨Æ¬×ÊÑ¶½á¹¹ Card Information Structure (CIS) Ö®¼ÇÒäÌåËÙ¶È¡£ÓÐ
Ð©ËÙ¶È¿ìµÄ»ãÁ÷ÅÅÊ±ÐòµÄÏµÍ³ÉÏ£¬Ôö¼ÓÕâ¸ö²ÎÊý£¨ÀýÈç£¬¼õÂý¿¨Æ¬µÄ´æÈ¡£©
¿ÉÒÔ½â¾ö¿¨Æ¬±æÊ¶µÄÎÊÌâ¡£
\item Õâ¡õÎÒÃÇ²¢·ÇÌÖÂÛ·ÖÊ±µÄÒéÌâ£¬µ«Èç¹ûÄúµÄÏµÍ³ÉÏÓÐÒ»¸öÒÔÉÏµÄ
ISA-to-PCMCIA ¿ØÖÆÆ÷»òÔÚÀ©³äÎëÉÏÓÐÆäËûµÄ²å²ÛÊ±£¬{\ttfamily i82365} Ä£×éÓ¦
¸ÃºÍ²ÎÊýÉèÎª   1   µÄ   {\ttfamily extra\_sockets}   Ò»Æð±»ÔØÈë£¬   µ«¶Ôì¶
PCI-to-PCMCIA »ò PCI-to-CardBus ÇÅ½ÓÆ÷Õß¾Í²»±ØÕâ÷á×ö¡£
\end{itemize}


ËùÓÐµÄÕâÐ©Ñ¡ÏîÓ¦ÐÞ¸Ä {\ttfamily /etc/rc.d/rc.pcmcia}À´½¨¹¹£¬ÀýÈç£º

\begin{tscreen}
\begin{verbatim}
# Should be either i82365 or tcic
PCIC=i82365
# Put socket driver timing parameters here
PCIC_OPTS="cmd_time=12"
# Put pcmcia_core options here
CORE_OPTS="cis_speed=500"
\end{verbatim}
\end{tscreen}


Õâ¡õÓÐÒ»Ð©ÌØÊâÏµÍ³µÄ·ÖÊ±Éè¶¨£º

\begin{itemize}
\item  ÔÚ ARM Pentium-90 »ò Midwest Micro Soundbook Plus ÉÏ£¬ Ê¹ÓÃ
``{\ttfamily freq\_bypass=1 cmd\_time=8}''¡£
\item  ÔÚ Midwest Micro Soundbook Elite£¬Ê¹ÓÃ ``{\ttfamily cmd\_time=12}''
¡£
\item  ÔÚ Gateway Liberty ÉÏ£¬ÊÔÊÔ ``{\ttfamily cmd\_time=16}''¡£
\end{itemize}





\subsection{ÏµÍ³×ÊÔ´Éè¶¨}

 ¿¨Æ¬·þÎñÏµÍ³Ó¦¸Ã×Ô¶¯µØÈ¥±ÜÃâ·ÖÅäµ½ÒÑ±»ÆäËû±ê×¼Éè±¸Ê¹ÓÃÁËµÄ  IO
²ººÍ²å¶Ï¡£ËüÒ²»áÊÔÖøÕì²â±¾ÉíÓë²»ÖªÃûÉè±¸¼äµÄ³åÍ»£¬Ö»²»¹ý»¹²»ÊÇºÜÍê
È«¿É¿¿¡£                Èç¹ûÓöµ½ÕâÖÖÇéÐÎ£¬                ÄúÐèÒª½«
{\ttfamily /etc/pcmcia/config.opts} ÄÚµÄ×ÊÔ´¸øÅÅ³ýµô¡£

ÒÔÏÂÊÇÄ³Ð©ÌØ¶¨µÄ±Ê¼ÇÐÍµçÄÔÖ®×ÊÔ´Éè¶¨£º

\begin{itemize}
\item ÔÚ AMS SoundPro, ÅÅ³ý irq 10.
\item ÔÚÓÐÐ© AMS TravelPro 5300 models, use memory 0xc8000-0xcffff.
\item ÔÚ BMX 486DX2-66, ÅÅ³ý irq 5, irq 9.
\item ÔÚ Chicony NB5, use memory 0xda000-0xdffff.
\item ÔÚ Compaq Presario 1020, ÅÅ³ý port 0x2f8-0x2ff, irq 3, irq 5.
\item ÔÚ HP Omnibook 4000C, ÅÅ³ý port 0x300-0x30f.
\item ÔÚ Micron Millenia Transport, ÅÅ³ý irq 5, irq 9.
\item ÔÚ  NEC Versa M, ÅÅ³ý irq 9, port 0x2e0-2ff.
\item ÔÚ  NEC Versa P/75, ÅÅ³ý irq 5, irq 9.
\item ÔÚ  NEC Versa S, ÅÅ³ý irq 9, irq 12.
\item ÔÚ  NEC Versa 6000 ÏµÁÐ, ÅÅ³ý port 0x300-0x33f, irq 9, irq 10.
\item ÔÚ ProStar 9200, Altima Virage, ¼° Acquiline Hurricane DX4-100, ÅÅ
³ý irq 5, port 0x330-0x35f. ¿ÉÒÔÊ¹ÓÃ memory 0xd8000-0xdffff.
\item ÔÚ  Siemens Nixdorf SIMATIC PG 720C, Ê¹ÓÃmemory 0xc0000-0xcffff,
port 0x300-0x3bf.
\item ÔÚ  TI TravelMate 5000,Ê¹ÓÃ memory 0xd4000-0xdffff.
\item ÔÚ  Toshiba   T4900   CT,  ÅÅ³ý  irq  5,  port  0x2e0-0x2e8,  port
0x330-0x338.
\item ÔÚ Twinhead  5100, HP 4000, Sharp PC-8700 ºÍ PC-8900, ÅÅ³ý irq 9 (
ÒôÐ§ ), irq 12.
\item ÔÚ MPC 800 ÏµÁÐ£¬ÅÅ³ý irq 5, port 0x300-0x30f ÊÇ¸ø CD-ROM ÓÃµÄ¡£
\end{itemize}





\section{½â¾ö°²×°Óë½¨¹¹µÄÎÊÌâ}

 ÔÚ±¾ÕÂ½Ú¡õ»áÖ¸³öÒ»Ð©³£¼ûµÄ PCMCIA ×ÓÏµÍ³µÄÊ§°ÜÄ£Ê½¡£ÇëÄúÊÔÖøÔÚ
ÕâÐ©Àý×ÓÖÐÕÒ³öÄúËùÓöµ½µÄÎÊÌâÖ®Ö¢×´¡£±¾ÕÂÖ»ÃèÊö¡±Ò»°ãµÄ´íÎó¡±ÎÊÌâ£¬
Òò´Ë²¢²»Õë¶ÔÌØ¶¨µÄ¿¨Æ¬»òÇý¶¯³ÌÊ½¡£

ÏëÒª³ý´íÔÚÎÒÃÇÊÔÖø¾­ÓÉ  PCMCIA ×°ÖÃÀ´°²×° Linux Ê±Óöµ½µÄ PCMCIA Çý
¶¯³ÌÊ½ÎÊÌâ¼¸½üºõ²»¿ÉÄÜ¡£ÉõÖÁÄúÄÜ´ÓÖ¢×´ÖÐÖªµÀÊÇÄÄ·½ÃæµÄÎÊÌâ£¬ÏëÒªÐÞ
¸Ä°²×°´ÅÆ¬ÓÖºÜÄÑ£¬ÓÈÆäÊÇÎÞ·¨ÔÚ Linux ÏµÍ³ÏÂ´æÈ¡Ê±¡£ Òª×Ô¶©°²×°´ÅÆ¬
ÍêÈ«ÒªÑöÀµ Linux ¹©Ó¦ÕßµÄµÄÑ¡ÔñÁË£¬ÕâÒ²²»ÔÚ±¾ÎÄ¼þµÄ¡õÎ§ÄÚ¡£ µ«Ò»°ã
À´Ëµ£¬ ×î¼ÑµÄ²½ÖèÊÇÏÈÊ¹ÓÃÆäËûµÄ·½·¨À´°²×°ºÃ Linux£¬ È»ááÄÃµ½×îÐÂµÄ
PCMCIA Çý¶¯³ÌÊ½áá£¬ÔÙÀ´³ý´íÄÇÐ©ÈÔ´æÔÚµÄÎÊÌâ¡£




\subsection{»ù±¾ PCMCIA ºËÐÄÄ£×é²¢Ã»ÔØÈë}

 Ö¢×´:
\begin{itemize}
\item  ¡±ºËÐÄ°æ±¾²»·ûºÏ¡±Ö®´íÎóÑ¶Ï¢ÔÚ PCMCIA Æô¶¯ÊÖ¸åÖ´ÐÐÊ±³öÏÖ¡£
\item ÔÚÆô¶¯áá£¬ {\ttfamily lsmod} ²¢Ã»Ðã³öÈÎºÎµÄ PCMCIA Ä£×é¡£
\item {\ttfamily cardmgr}  Ö´ÐÐ±¨¸æ ``no pcmcia driver in /proc/devices''
ÔÚÏµÍ³ÈÕÖ¾ÖÐ¡£
\end{itemize}


ºËÐÄÄ£×éÖÐ°üÀ¨ËüµÄ°æ±¾×ÊÑ¶»áÔÚÄ£×é±»ÔØÈëÊ±ÓëÏÖÔÚµÄºËÐÄÏàºË¶Ô¡£¼ì²é
µÄ·½Ê½ÊÓ {\ttfamily CONFIG\_MODVERSIONS} ÕâÏîºËÐÄÑ¡ÏîÀ´¿´¡£ Èç¹ûÕâÏîÄ¿ÊÇ·ñ
¶¨µÄ£¬ ºËÐÄ°æ±¾ºÅÂë¾Í»á±»±àÒëµ½Ã¿Ò»¸öÄ£×éÄÚ£¬¶ø {\ttfamily insmod} »á¼ì²é
ÕâÏîÊÇ·ñÓëÖ´ÐÐÖÐµÄºËÐÄÊÇÏà·ûºÏµÄ¡£ Èç¹û {\ttfamily CONFIG\_MODVERSIONS} ÊÇ
yes£¬ºËÐÄËùÌá±¨µÄÃ¿¸ö·ûºÅ»á±»×ö³ÉÒ»·Ý¼ì²é×ÜÀÀ (Checksum)¡£ÕâÐ©³ÌÊ½
Âë¶¼»á±»ÓëÏà¶ÔÓ¦µÄ³ÌÊ½ÂëÏà±È¶Ôáá±àÒë³ÉÄ£×é¡£Õâ÷á×öÖ¼ÔÚÈÃÄ£×éÃÇ¼õÉÙ
°æ±¾ÒÀÀµ¶È£¬ ÒòÎª¼ì²é×ÜÀÀÖ»»áÔÚºËÐÄ½éÃæ¸ü¶¯Ê±²Å»á¸úÖø±ä¶¯£¬ ÇÒ¶Ôì¶
Ð¡Ð¡µÄºËÐÄ¸üÐÂÉý¼¶¼¸ºõÎ¬³ÖÓëÔ­À´ÏàÍ¬¡£ÔÚÊµÎñÉÏ£¬¼ì²é×ÜÀÀÒÑ±ä³É¸ü¼Ó
µÄÑÏ¸ñ£¬ÒòÎªÓÐÐí¶àµÄºËÐÄ½éÃæ¶¼ÒÀÀµÊÇÔÚ±àÒëÊ±ÆÚÊ±ºËÐÄÑ¡ÏîµÄÉè¶¨¡£¶ø
ÇÒ£¬¼ì²é×ÜÀÀ¼º±ä³ÉÒ»¸öÅÐ¶ÏÏàÈÝ¶ÈµÄ¼«¶Ë±¯¹ÛµÄ¹¤¾ßÁË¡£

ÓÐÐ© PCMCIA Ä£×éÐèÒªºËÐÄ·þÎñ³ÌÊ½£¬µ«ÕâÐ©·þÎñ³ÌÊ½¿ÉÄÜ´æÔÚ»ò²»´æÔÚ£¬
ÕâÍêÈ«Òª¿´ºËÐÄµÄ½¨¹¹¡£ ÀýÈç£¬SCSI ¿ØÖÆ¿¨Çý¶¯³ÌÊ½¾ÍÐèÒªºËÐÄÒÑ±»½¨¹¹
Ö§Ô®ÁË SCSI ÁË¡£ÍøÂ·Çý¶¯³ÌÊ½¾ÍÐèÒªÖ§Ô®ÍøÂ·µÄºËÐÄ¡£Èç¹ûºËÐÄÈ±ÉÙÁËÒ»
ÐèÒªµÄ¹¦ÄÜ£¬{\ttfamily insmod} ¿ÉÄÜ»á±¨¸æ³öÓÐÎ´¶¨ÒåµÄ·ûºÅ¶ø²»È¥ÔØÈë¸ÃÄ£×é
¡£

ÕâÑù¼ÌÐøµÄ½á¹ûÊÇ£¬ºËÐÄÄ£×é½ôÃÜµØÓëºËÐÄ°æ±¾ÒÔ¼°Ðí¶àµÄºËÐÄ½¨¹¹Ñ¡ÏîµÄ
Éè¶¨Ïà½áºÏ¡£Ò»°ãÀ´Ëµ£¬½áºËÐÄ 2.0.31 °æµÄÒ»×é±»±àÒëºÃµÄÄ£×é²¢ÎÞ·¨±»
ÆäËûµÄºËÐÄ 2.0.31 °æ±¾ÉÏÊ¹ÓÃ¡£³ý·ÇÓÐÌØ±ðµØ×¢Òâµ½½«Á½¸ö½¨¹¹³ÉÏàÍ¬µÄ
Éè¶¨¡£Õâ¸öÎÊÌâ£¬¾ÍÈÃÄÇÐ©¹©Ó¦ÒÑ±àÒëºÃµÄºËÐÄÄ£×éµÄ¹¤×÷±äµÃÓÐµãÆæ¹ÖÁË
¡£

ÄúÓÐ¼¸ÖÖÑ¡Ïî£º

\begin{itemize}
\item Èç¹ûÄúÓµÓÐµÄÊÇ Linux ¹©Ó¦°æÄÚÖ®Î´¾­±àÒëµÄÇý¶¯³ÌÊ½£¬ Çë¼ì²éÄúËùÊ¹ÓÃ
µÄºËÐÄÊÇºÍ¸Ã¹©Ó¦°æÒ»ÆðµÄÎ´¾­±àÒëµÄºËÐÄ¡£Èç¹ûÄúÏëÊ¹ÓÃÎ´¾­±àÒëµÄÄ£×é
£¬Ò»°ãÀ´ËµÄãµÃÊ¹ÓÃÓëËüÏë°éµÄºËÐÄ¡£
\item Èç¹ûÄãÖØÐÂ½¨¹¹»òÉý¼¶ÄãµÄºËÐÄÁË£¬Äã¿ÉÄÜÐèÒª±àÒëºÍ°²×°ÐÂµÄ PCMCIA Ì×
¼þ¡£ Èç¹ûÄãÒÑ¾­ÓÐ°²×°ÁËºËÐÄÔ­Ê¼Ê÷µÄ»°£¬×öÕâ¼þÊÂ¾ÍµÃÈÝÒ×ÁË¡£ Çë²Î¿¼
PCMCIA-HOWTO ÓÐ¸üÏêÏ¸µÄÖ¸Ê¾¡£
\item ÔÚÄ³Ð©ÇéÐÎÏÂ£¬ÓëÆäËûÏµÍ³Ôª¼þµÄ²»ÏàÈÝ¿ÉÄÜ»áµ¼ÖÂÎÞ·¨ÕýÈ·ÔØÈëºËÐÄÄ£×é
Ôª¼þ¡£      Èç¹ûÄú×Ô¼ºÉý¼¶ºËÐÄ£¬      Çë×¢ÒâÏêÁÐÄ£×éÔ­Ê¼µµ°¸Ê÷ÄÚÖ®
{\ttfamily Documentation/Changes}  µµ°¸ÄÚÕë¶ÔÄ£×é¹«ÓÃ³ÌÊ½¼°¶þ½øÎ»¹«¾ß
³ÌÊ½ÖÐÁÐÃ÷µÄ×îÐ¡ÐèÇó (``minimal requirements'')¡£
\end{itemize}





\subsection{²å¶ÏÉ¨ÃèÊ§°Ü}



Ö¢×´:
\begin{itemize}
\item µ± PCMCIA Çý¶¯³ÌÊ½±»ÔØÈëÊ±ÏµÍ³È´¶¯Ò²²»¶¯£¬¾ÍËã²¢Ã»ÓÐ¿¨Æ¬²åÖøÊ±Ò²Ò»
Ñù¡£
\item ÏµÍ³ÈÕÖ¾ÔÚÏµÍ³µ±»úËøËÀÇ°ÏÔÊ¾³É¹¦µØÕì²âµ½ PCMCIA ¿ØÖÆÆ÷£¬µ«»¹Ã»ÏÔÊ¾
²å¶ÏÕì²âµÄ½á¹ûÊ±¡£
\end{itemize}


ÔÚ±æÊÓ PCMCIA ¿ØÖÆÆ÷Ö®áá£¬²å²ÛÇý¶¯³ÌÊ½»áÕì²â¿ÕÖøµÄ²å¶ÏºÅÂë¡£Õâ¸ö¶¯
×÷»áÎªÃ¿¸öÏÔÈ»ÊÇ¿ÕÖøµÄ²å¶Ï×ö³ÌÊ½»¯, È»áá²úÉúÒ»¸ö `` ÈíµÄ '' ²å¶Ï£¬
À´¿´¿´ÊÇ·ñÕâ¸ö²å¶Ï¿ÉÒÔ±»ÕýÈ·µØ±»Õì²âµ½¡£ÓÐÐ©Ê±ºò£¬Õì²âµ½Ò»Ð©ÌØÊâµÄ
²å¶ÏÊ±»áÓ°Ïìµ½ÆäËûµÄÏµÍ³Éè±¸¡£

Õâ÷áÕì²âµÄÀíÓÉÊÇ£¬ÎÒÃÇÒª±æÊÓ³öÕæÕý¿ÕÖø¿ÉÓÃµÄ²å¶Ï¡£ (ÀýÈç£¬ÄÇÐ©²»ÊÇ
±»ÈÎºÎÆäËû   Linux  Éè±¸Çý¶¯³ÌÊ½ËùÔ¤ÁôÖøµÄ£¬  Ò²²¢·ÇÊµÌåÉÏÒÑÁ¬½ÓÖø
PCMCIA ¿ØÖÆÆ÷µÄ£¬»òÊÇÒÑÁ¬½ÓÖøÆäËûµÄÉè±¸µ«²¢Ã»ÓÐÇý¶¯³ÌÊ½µÄ¡£)

ÓÐ¶þÖÖ¼ÌÐøµÄ·½·¨:
\begin{itemize}
\item ²å¶ÏÌ½²â¹¤×÷¿ÉÒÔÊ¹ÓÃ²å²ÛÇý¶¯³ÌÊ½ÄÚµÄ  {\ttfamily irq\_list} ²ÎÊýÉè¶¨À´ÏÞÖÆ
Ö»¶ÔÄ³Ð©²å²ÛÊµÊ©¶øÒÑ¡£ÀýÈç ``{\ttfamily irq\_list=5, 9, 10}'' »áÏÞÖÆÖ»¶ÔÕâ
Èý¸ö²å¶Ï×öÉ¨ÃèÌ½²â¶øÒÑ¡£ËùÓÐµÄ PCMCIA Éè±¸»á±»ÏÞÖÆÖ»ÄÜÊ¹ÓÃÕâ¼¸¸ö²å
¶Ï¶øÒÑ (¼ÙÈçËüÃÇÂÔ¹ýÁËÕì²â¶¯×÷ )¡£Äã¿ÉÄÜÐèÒª¡õÊÔ¼¸´ÎÊ§°Ü²¢ÔÙ½ÓÔÙÀ÷
µØ²ÅÄÜÕÒµ½ÄÄÐ©²å¶Ï¿ÉÒÔ±»°²È«µØÕì²âÊ¹ÓÃµÄ¡£
\item ²å¶ÏÌ½²â¹¤×÷¿ÉÒÔ±»ÍêÈ«µØ¹Ø±Õµô£¬ÔÚÔØÈë²å²ÛÇý¶¯³ÌÊ½Ê±Ê¹ÓÃÁË ``do\_scan=0''
Ñ¡Ïî¡£Õâ÷á×ö£¬»áÈÃÔ­¶¨µÄ²å¶ÏÇåµ¥±»Ê¹ÓÃÖø£¬ËüÃÇÒÑ¾­±ÜÃâÊ¹ÓÃÄÇÐ©ÒÑ¾­
±»ÆäËûÉè±¸ËùÕ¼ÓÃÁËµÄ²å¶Ï¡£
\end{itemize}


ÁíÒ»¸ö·½·¨£¬ÎÒÃÇ¿ÉÒÔÊ¹ÓÃÔÚ PCMCIA Æô¶¯ÊÖ¸åÖÐÖ¸¶¨ {\ttfamily PCIC\_OPTS} µÄ
Éè¶¨£¬ÀýÈç:

\begin{tscreen}
\begin{verbatim}
PCIC_OPTS="irq_list=5,9,10"
\end{verbatim}
\end{tscreen}





\subsection{¼ÇÒäÌåÕì²âÊ§°Ü}



Ö¢×´:
\begin{itemize}
\item Ö÷Çý¶¯³ÌÊ½ÔÚ¿¨Æ¬²¢²»´æÖøÊ±±»ÕýÈ·µØÔØÈë£¬¶øÇÒÔÚÏµÍ³ÈÕÖ¾ÄÚÒ²Ã»ÓÐÈÎºÎ
´íÎó¡£
\item ÏµÍ³µ±»ú¶¯²»ÁËºÍ£¯»òÈÎºÎ¿¨Æ¬²åÈëµ«ÔÚÈÎºÎßÙÉùÏìÆðÇ°¾ÍÖØÐÂ¿ª»ú¡£
\end{itemize}


»òÊÇ£º
\begin{itemize}
\item ÈÎºÎ¿¨Æ¬²åÈëÊ±»á²úÉúÒ»¸ö¸ßÒôµÄßÙÉù£¬½ÓÖøµÍÉòµÄßÙÉù¡£
\item ÈÎºÎ¿¨Æ¬¶¼±»ÎóÈÏ ``anonymous memory cards''¡£
\item ÏµÍ³ÈÕÖ¾±¨¸æËµÓÐºÜ¶àµÄ¼ÇÒäÌå¡õÎ§ÒÑ±»ÅÅ³ýÔÚÍâÁË¡£
\end{itemize}


Ö÷Ä£×é³ÌÊ½ÔÚµÚÒ»´Î²åÈë¿¨Æ¬Ê¹×öÒ»¶¨¼ÇÒäÌåÉ¨Ãè¡£Õâ¸ö¶¯×÷ÓÐÇ±ÔÚ¿ÉÄÜµØ
¸ÉÉæµ½ÆäËû¼ÇÒäÌåÓ³ÉäµÄÉè±¸¡£ÁíÍâ£¬pre-3.0.0 °æ±¾Ç°µÄÇý¶¯³ÌÊ½Ì×¼þ»¹
»á×ö±ÈÏÖ½ñµÄÇý¶¯³ÌÊ½°æ±¾¸ü½øÒ»²½µÄÉ¨Ãè¡£¼ÇÒäÌå´°ÊÇ±»¶¨ÒåÔÚ
{\ttfamily /etc/pcmcia/config.opts} ÄÚ¡£ Ô¤ÉèµÄ´°¿ÚºÜ´ó£¬ËùÒÔËü¿ÉÄÜ»á
°ïÖúÀ´ÏÞÖÆÉ¨Ãèµ½½ÏÕ­µÄ¡õÎ§¡£±È½ÏºÏÀíµÄ¡õÎ§¿ÉÊÔ¿´¿´°üº¬½øÒÔÏÂµÄÎ»Ö·
£º0xd0000-0xdffff, 0xc0000-0xcffff, 0xc8000-0xcffff, »ò
0xd8000-0xdffff¡£

Èç¹ûÄãÓÐ DOS »ò Windows °æµÄ PCMCIA Çý¶¯³ÌÊ½£¬ Äã¾Í¿ÉÒÔ you may be
able to deduce what memory region those drivers use. Çë¼ÇµÃ DOS µÄ
¼ÇÒäÌåÎ»Ö·Í¨³£¶¼Ê¹ÓÃ `` ¶Î '' Î»Ö·ÐÎÊ½£¬Ò²¾ÍÊÇËü»á½«Î²°ÍµÄÊ®ÁùÎ»Ôª
Êý×ÖÊ¡ÂÔµô£¨ËùÒÔ   0xd0000  µÄ¾ø¶ÔÎ»Ö·¾ÍÊÇ  0xd000  £©¡£  ¼ÇµÃÔÚ¸Ä
{\ttfamily /etc/pcmcia/config.opts} Ê±ÒªÈ·ÈÏÕâÏî¡£




\subsection{´íÎóµØÕì²â¿¨Æ¬µÄ²åÈëÓë³é³ö}

Ö¢×´£º
\begin{itemize}
\item ÔÚ¿ª»úÊ¹¿¨Æ¬ÓÐ²åÖø²¢±»Õì²âµ½ÇÒÕýÈ·µØ±»½¨¹¹ÁË¡£
\item Çý¶¯³ÌÊ½²»»á·´Ó¦³ö¿¨°æ±»²åÈë»òÒÆ³ö£¬»òÊÇ¼ÇÂ¼ÔÚÏµÍ³ÈÕÖ¾¡¢»òÊ±ßÙÉùÏì
¡£
\end{itemize}


Ò»°ãÀ´Ëµ£¬¿¨²ÛÇý¶¯³ÌÊ½ ({\ttfamily i82365} »ò {\ttfamily tcic}) »á×Ô¶¯µØÕì²â²¢Ñ¡
ÔñÒ»¸öÊÊºÏµÄ²å¶ÏÀ´´«ËÍ¿¨Æ¬×´Ì¬µÄ¸ü¶¯¡£ Ä³Ð© Intel ÏàÈÝ¿ØÖÆÆ÷µÄ×Ô¶¯
²å¶ÏÕì²â²»ÄÜ¹¤×÷¡£ °üº¬ Cirrus ¾§Æ¬ºÍ×°ÔÚ IBM ThinkPads ÉÏµÄ¾§Æ¬¡£
Èç¹ûÔÚÕì²âÊ±Éè±¸ÎÞ·¨Æð¶¯£¬ËüµÄ²å¶ÏÒ²»áÊÇ¡õÖÃµÄ¡£ÕâÖÖ×´Ì¬ÏÂ£¬¿¨²ÛÇý
¶¯³ÌÊ½Ò²Ðí»áÌôµ½Ò»¸öÒÑ±»ÆäËû×°ÖÃÊ¹ÓÃÖÐµÄ²å¶ÏÀ´Ê¹ÓÃ¡£

ÔÚ {\ttfamily i82365} ºÍ {\ttfamily tcic} µÄÇý¶¯³ÌÊ½¡õµÄ {\ttfamily irq\_list}  Ñ¡Ïî¿ÉÒÔ
ÓÃÀ´ÏÞÖÆÄÄÐ©²å¶Ï¿ÉÒÔ±»²âÊÔµÄ¡£Õâ¸ö²å¶ÏÁÐ±í¿É±»ÏÞÖÆ³ÉÖ»±» PCMCIA ¿¨
ËùÊ¹ÓÃ»òÓÃÀ´¼à¿Ø¿¨Æ¬×´Ì¬µÄ¸Ä±ä¡£ ÁíÍâ {\ttfamily cs\_irq} Ñ¡Ïî¿ÉÃ÷°×µØÉè¶¨
ÄÄ¸ö²å¶ÏÒª±»ÓÃÀ´¼à¿Ø¿¨Æ¬×´Ì¬µÄ¸Ä±äµÄ¡£

Èç¹ûÄúÎÞ·¨ÕÒµ½¿ÉÕý³£¹¤×÷µÄ²å¶ÏºÅÂë£¬»¹ÓÐÒ»¸öÆ±Ñ¡×´Ì¬Ä£Ê½¿ÉÓÃ£º²»ÂÛ
ÊÇ {\ttfamily i82365} »ò {\ttfamily tcic} ¶¼½ÓÊÜ {\ttfamily poll\_interval=100} ÕâÑ¡Ïî£¬
ÓÃÀ´Æ±Ñ¡¿¨Æ¬µÄÃ¿ÃëµÄ¸Ä±ä×´Ì¬¡£Èç¹ûÄúµÄÏµÍ³ÒÑ¶ÌÈ±¿É±» PCMCIA ¿¨Ê¹ÓÃ
µÄ²å¶ÏÊ±Õâ¸öÑ¡ÏîÒ²¿ÉÒÔ±»Ê¹ÓÃ¡£ÌØ±ðÊÇÔÚÏµÍ³ÄÚÓÐÒ»ÖÖÒÔÉÏµÄ PCMCIA ¿Ø
ÖÆÆ÷Ê±¾Í±ØÐë×¢ÒâÕâµãÁË¡£

ËùÓÐµÄÕâÐ©Ñ¡Ïî±ØÐëÔÚ {\ttfamily PCIC\_OPTS=} ÕâÐÐÀ´Éè¶¨£¬ ¿´ÄúµÄÏµÍ³ÊÇÉèÔÚ
{\ttfamily /etc/rc.d/rc.pcmcia} ¡õ»òÊÇ {\ttfamily /etc/sysconfig/pcmcia}
¡£




\subsection{Á½ÕÅ¿¨Ö®¼äµÄ×ÊÔ´Ïà³åÍ»}



Symptoms:
\begin{itemize}
\item Á½ÕÅ¿¨Æ¬ÔÚ¸÷×Ô¶À×ÔÊ¹ÓÃÊ±¿ÉÒÔ¹¤×÷£¬
\item µ«µ±Á½ÕÅ¿¨Ò»Æð±»²åÖøÊ±£¬È´Ö»ÓÐÒ»¸ö¿ÉÒÔÕý³£¹¤×÷¡£
\end{itemize}


Í¨³£Õâ¾Í±íÊ¾ÒÑ¾­ºÍÄ³¸ö Linux ²»ÖªµÀµÄÏµÍ³Éè±¸Ïà³åÍ»ÁË¡£PCMCIA Éè±¸
ÊÇ±»¶¯Ì¬½¨¹¹µÄ£¬ËùÒÔ£¬ÀýÈç£¬²å¶ÏÊÇÔÚ±»ÐèÒªÊ±±»·ÖÅäµÄ£¬¶ø²»ÊÇÌØ±ð±»
Ö¸¶¨µ½ÌØ±ðµÄ¿¨Æ¬»òÊÇ²å²ÛµÄ¡£ÏÖÔÚÓÐÒ»¸ö¿ÉÓÃ×ÊÔ´µÄÇåµ¥£¬¿¨Æ¬»áÔÚËûÃÇ
±»½¨¹¹Ê±ÒÀÐòµØ±»Ö¸ÅÉ¸ø×ÊÔ´µÄ¡£ÔÚÕâÖÖ×´¿öÏÂ£¬×îáá±»½¨¹¹µÄ¿¨Æ¬»á±»Ö¸
ÅÉµ½Ò»¸ö²¢·ÇÊÇ¿Õ¡õÖøµÄ×ÊÔ´ÉÏÁË¡£

Äú¿É¼ì²éÏµÍ³ÈÕÖ¾ÓÐÄÄÐ©×ÊÔ´±»·ÇÕýÔÚ¹¤×÷µÄ¿¨Æ¬ËùÕ¼ÓÃÖø¡£ÔÚ
{\ttfamily /etc/pcmcia/config.opts}   ¡õ°ÑÕâÐ©ÅÅ³ýÔÚÍâ£¬   ÔÙÖØÐÂÆô¶¯
{\ttfamily cardmgr} ¾«ÁéÀ´ÔÙÔØÈë×ÊÔ´×ÊÁÏ¿â¡£




\subsection{Éè±¸½¨¹¹²¢Ã»ÓÐÍê³É}

Ö¢×´£º
\begin{itemize}
\item µ±Ò»¸ö¿¨Æ¬±»²åÈëÊ±£¬È·Êµ¿ÉÌýµ½Ò»¸ö¸ßÒôµÄßÙÉùÏì¡£
\item ½ÓÏÂÀ´µÄ¿¨Æ¬²»¹ÜÊÇ²åÈë»òÒÆ³ö¶¼²»±»Àí²Ç¡£
\end{itemize}


Õâ±íÊ¾¿¨Æ¬ÒÑ±»³É¹¦µØ±æÊÓÁË¡£µ«ÊÇ {\ttfamily cardmgr} ÒòÄ³Ð©Ô­ÒòÒÑÎÞ·¨Íê³É
½¨¹¹³ÌÐò¡£×îÓÐ¿ÉÄÜµÄÔ­ÒòÊÇÔÚ¿¨Æ¬Éè¶¨ÊÖ¸åµÄÄ³Ò»²½Öè±»À§×¡ÁË¡£µ±Ò»¸ö
ÍøÂ·¿¨±»²åÈëÊ±²¢Ã»ÓÐ½ÓÉÏÒ»¸öÕý»î¶¯ÖÐµÄÍøÂ·ÉÏÊ±£¬ÍøÂ·ÊÖ¸å±»À§×¡ÁË£¬
Õâ¾ÍÊÇ×îºÃµÄÀý×Ó¡£

ÒªÕÒ³öÎÊÌâ³öÔÚÄÄ¡õ£¬Äã¿ÉÒÔÊÖ¶¯Ö´ÐÐÒ»¸öÉè¶¨ÊÖ¸åÀ´¿´¿´ËüÊÇ±»À§ÔÚÄÄ¶ù
µÄ¡£Õâ¸öÊÖ¸å¾Í·ÅÔÚ {\ttfamily /etc/pcmcia} Ä¿Â¼ÄÚ¡£ËûÃÇ»áÊ¹ÓÃ¶þ¸ö²ÎÊý
£ºÉè±¸Ãû³Æ¼°¶¯¼þ¡£ {\ttfamily cardmgr} ¾«»á°Ñ¼ÇÂ¼½¨¹¹µÄÃüÁî¼ÇÂ¼ÔÚÏµÍ³ÈÕÖ¾
ÄÚ¡£ ÀýÈç£¬ ÔÚÏµÍ³ÈÕÖ¾ÖÐÏÔÊ¾³ö  `./network  ÃüÁî¿ªÊ¼ÁË eth0'' ÊÇ±»
{\ttfamily cardmgr} ×îááÒ»¸öÖ´ÐÐµÄÃüÁî£¬ÒÔÏÂµÄÃüÁî»á×·×ÙÕâ¸öÊÖ¸å£º

\begin{tscreen}
\begin{verbatim}
cd /etc/pcmcia
sh -x ./network start eth0
\end{verbatim}
\end{tscreen}





\section{Ê¹ÓÃ·½·¨ÒÔ¼°ÌØÉ«}


\subsection{ÓÃÀ´½¨¹¹ÒÔ¼°¼à¿Ø  PCMCIA Éè±¸µÄ¹¤¾ß}

Èç¹ûËùÓÐµÄÄ£×é¶¼±»ÕýÈ·µØÔØÈëÁË£¬ÔÚÃ»ÓÐ¿¨Æ¬±»²åÈëµÄ×´Ì¬ÏÂ£¬ {\ttfamily lsmod}
ÃüÁîµÄÊä³ö»á¿´ÆðÀ´ÏñÒÔÁÐµÄÑù×Ó¡£

\begin{tscreen}
\begin{verbatim}
Module                  Size  Used by
ds                      5640   2 
i82365                 15452   2 
pcmcia_core            30012   3  [ds i82365]
\end{verbatim}
\end{tscreen}


ÏµÍ³ÈÕÖ¾Ò²Ó¦¸Ã°üº¬²å²ÛÇý¶¯³ÌÊ½¶Ôì¶ÄÄÐ©Ö÷¿ØÖÆÆ÷±»·¢ÏÖÁË¡¢ÓÐ¼¸¸ö²å²Û
±»Õì²âµ½ÁËµÄÊä³ö¡£




\subsubsection{cardmgr½¨¹¹¾«Áé}

{\ttfamily \cdx{cardmgr}} ¾«Áé¸ºÔð¼à¿Ø PCMCIA ²å²Û£¬ÓÐÐèÒªÊ±ÔØÈë
ÆäËûµÄÇý¶¯³ÌÊ½£¬²¢ÇÒÖ´ÐÐÊ¹ÓÃÕß½×²ãµÄÊÖ¸åÀ´·´Ó¦¿¨Æ¬µÄ²åÈëÓëÒÆ³ö¡£Ëü
»á°ÑËüµÄ¶¯×÷¼ÇÂ¼ÔÚÏµÍ³ÈÕÖ¾ÄÚ²¢ÓÃßÙÉùÀ´»ØÓ¦¿¨Æ¬×´Ì¬µÄ¸Ä±ä¡£ßÙÉùµÄÒô
µ÷±íÊ¾½¨¹¹²½ÖèÊÇ³É¹¦»¹ÊÇÊ§°Ü¡£Á½¸ö¸ßÒôÉùÏì±íÊ¾²½Æ¬ÒÑ±»³É¹¦µØ±æÊÓÓë
½¨¹¹ÁË¡£Ò»¸ßÒôÒ»µÍÒôÉùÏì±íÊ¾¿¨Æ¬±»±æÊÓ£¬µ«ÒòÄ³Ð©Ô­ÒòÎÞ·¨±»½¨¹¹¡£Ò»
µÍÒôßÙÉù±íÊ¾¿¨Æ¬ÎÞ·¨±»±æÊÓ¡£

{\ttfamily Cardmgr} »á°ÑÃ¿Ò»¸ö²å²ÛµÄÉè±¸×ÊÑ¶¼ÇÂ¼ÔÚ {\ttfamily /var/run/stab}
¡õ¡£ÒÔÏÂÊÇ {\ttfamily /var/run/stab} µÄÁÐ±íÀý×Ó£º

\begin{tscreen}
\begin{verbatim}
Socket 0: Adaptec APA-1460 SlimSCSI
0       scsi    aha152x_cs      0       sda     8       0
0       scsi    aha152x_cs      1       scd0    11      0
Socket 1: Serial or Modem Card
1       serial  serial_cs       0       ttyS1   5       65
\end{verbatim}
\end{tscreen}


ÔÚÕâ¼¸ÐÐËùÃèÊöµÄÉè±¸ÖÐ£¬µÚÒ»¸öÀ¸Î»±íÊ¾²å²Û¡¢µÚ¶þÎªÉè±¸Àà±ð¡¢µÚÈýÎª
Çý¶¯³ÌÊ½Ãû³Æ¡¢µÚËÄ±»ÓÃÀ´Ö¸¶¨ÔÚÍ¬Ò»Çý¶¯³ÌÊ½ÏÂÊ¹ÓÃµÄÃ¿¸öÉè±¸È¡ºÅÂë¡¢
µÚÎå¸öÊÇÉè±¸Ãû³Æ¡¢×îááÁ½¸öÀ¸Î»ÊÇÕâ¸öÉè±¸µÄÖ÷Òª¼°´ÎÒªºÅÂë¡££¨Èç¹û¿É
ÕÒµ½µÄ»°£©

{\ttfamily cardmgr} ¾«ÁéÒÀ¾Ý±»´æÔÚ {\ttfamily /etc/pcmcia/config} ÄÚµÄÒÑÖªÖ®
¿¨Æ¬×ÊÁÏ¿âÀ´½¨¹¹ÕâÐ©¿¨Æ¬¡£Õâ¸öµµ°¸ÃèÊöÁËÐí¶à¸ö±ðµÄÇý¶¯³ÌÊ½£¬ÒÔ¼°Èç
ºÎ±æÊÓÐí¶àµÄ¿¨Æ¬£¬»¹ÓÐÄÄ¸öÇý¶¯³ÌÊ½Êôì¶ÄÄ¸ö¿¨Æ¬µÄ¡£Õâ¸öµµ°¸µÄ¸ñÊ½ÔÚ
{\ttfamily pcmcia(5)} µÄ man Ò³¡õÓÐÏêÏ¸µÄ×ÊÁÏ¡£




\subsubsection{cardctl ¼° cardinfo ¹«ÓÃ³ÌÊ½ }



{\ttfamily cardctl} ÃüÁî¿ÉÒÔÓÃÀ´¼ì²é²å²ÛµÄ×´Ì¬£¬ »ò¿´ËüÃÇÊÇÈçºÎ±»½¨¹¹µÄ¡£
ËüÒ²¿ÉÒÔ±»ÓÃÀ´¾¯Ê¾Ò»¸ö¿¨Æ¬µÄ½¨¹¹×´Ì¬¡£   Õâ¶ùÓÐ¸ö    ``{\ttfamily cardctl
config}'' ÃüÁîµÄÊä³öÀý×Ó£º

\begin{tscreen}
\begin{verbatim}
Socket 0:
Socket 1:
  Vcc = 5.0, Vpp1 = 0.0, Vpp2 = 0.0
  Card type is memory and I/O
  IRQ 3 is dynamic shared, level mode, enabled
  Speaker output is enabled
  Function 0:
    Config register base = 0x0800
      Option = 0x63, status = 0x08
    I/O window 1: 0x0280 to 0x02bf, auto sized
    I/O window 2: 0x02f8 to 0x02ff, 8 bit
\end{verbatim}
\end{tscreen}


``{\ttfamily cardctl suspend}'' ºÍ ``{\ttfamily cardctl resume}'' Á½¸öÃüÁî¿ÉÒÔÓÃ
À´ÔÚ²»ÐèÐ¶ÏÂËüµÄÏà¹ØÇý¶¯³ÌÊ½µÄ×´¿öÏÂ¹Ø±Õ¿¨Æ¬¡£``{\ttfamily cardctl
reset}''  ÃüÁî»áÖØÐÂÉè¶¨¼°½¨¹¹¿¨Æ¬¡£  ``{\ttfamily cardctl  insert}''  ºÍ
``{\ttfamily cardctl  eject}'' ÃþÄâµ±Ò»¸öÊµÌåµÄ¿¨Æ¬²åÈë»ò³é³öÊ±Ëù×öµÄ¶¯×÷
£¬Õâ°üº¬ÔØÈë»òÐ¶ÏÂÇý¶¯³ÌÊ½ÒÔ¼°½¨¹¹»ò¹Ø±ÕÉè±¸¡£

Èç¹ûÄúÕýÖ´ÐÐ X£¬ {\ttfamily \cdx{cardinfo}} ¹«ÓÃ³ÌÊ½»á²úÉúÒ»¸öÍ¼
Ê¾À´ÏÔÊ¾ËùÓÐµÄ   PCMCIA   ²å²ÛµÄÏÖ¿ö£¬  ÄÚÈÝºÍÖ´ÐÐ   ``{\ttfamily cardctl
config}'' ÀàËÆ¡£Ëü»¹Ìá¹©ÆäËû {\ttfamily cardctl} ¹¦ÄÜµÄÍ¼ÐÎ»¯¹¦ÄÜ¡£




\subsubsection{²åÈëÓë³é³ö¿¨Æ¬}

ÔÚÀíÂÛÉÏ£¬Äã¿ÉÒÔÔÚÈÎºÎÊ±¼ä²åÈë»òÒÆ³ö PCMCIA ¿¨Æ¬¡£È»¶ø£¬°ÑÕýÔÚ±»Æä
Ëû³ÌÊ½Ê¹ÓÃÖÐµÄ¿¨Æ¬ÒÆ³öÀ´²¢²»ÊÇ¸öºÃÖ÷Òâ¡£ÔÚºËÐÄ 1.1.77 °æÒÔÇ°µÄÏµÍ³
³£»áÔÚ´®ÁÐ£¯Êý¾Ý»ú¿¨Æ¬±»ÒÆ³öÊ±Ôì³Éµ±»ú£¬µ«ÏÖÔÚÒÑÓÐÐÞÕý·½·¨ÁË¡£




\subsubsection{¿¨Æ¬·þÎñ³ÌÊ½Óë½ø½×ÄÜÔ´¹ÜÀí}

¿¨Æ¬·þÎñ³ÌÊ½¿ÉÒÔ±àÒë³ÉÖ§Ô®   \idx{APM}   (\idx{  ½ø½×ÄÜÔ´¹ÜÀí})  £¬  Èç¹ûÄãÒÑ°²×°ÁËÕâ¸öÌ×¼þµ½ÄãµÄÏµÍ³ÄÚµÄ»°¡£  APM  ÔÚºËÐÄ
1.3.46     £¨º¬£©ÒÔáá¾Í±»ÕûºÏÁË¡£    ÏÖÔÚÕâÌ×¼þ±»    Rick    Faith
(faith@cs.unc.edu)      ËùÎ¬»¤£¬     APM      ¹¤¾ß¿ÉÒÔÓÉ      \nameurl{ftp://ftp.cs.unc.edu/pub/users/faith/linux}{} ÄÃµ½¡£Èç¹ûÄãµÄÏµ
Í³±»Õì²â³öÓÐ¸öÏàÈÝµÄ°æ±¾ÔÚµÄ»°£¬  PCMCIA  Ä£×é»á±»×Ô¶¯µØ½¨¹¹³ÉÖ§Ô®
APMM ¹¦ÄÜ¡£

Èç¹ûÃ»ÓÐ½åÖø  APM£¬  Äã¿ÉÒÔÔÚÐüÖÃÄãµÄ±Ê¼ÇµçÄÔÇ°Ö´ÐÐ  ``{\ttfamily cardctl
suspend}''£¬ÒÔ¼°ÔÚ»Ø¸²ááÖ´ÐÐ ``{\ttfamily cardctl resume}''£¬²ÅÄÜÊÊµ±µØ¹Ø
ÉÏ»òÖØÆôÄãµÄ  PCMCIA  ¿¨¡£ Õâ¶ÔÕýÔÚÊ¹ÓÃÖÐµÄÊý¾Ý»ú²¢²»ÊÊÓÃ£¬ ÌïÒòÐò
ÁÐÇý¶¯³ÌÊ½²¢ÎÞ·¨´¢´æÓë»ØÓ¦Êý¾Ý»úµÄÔË×÷²ÎÊý¡£

APM ÔÚÓÐÐ©ÏµÍ³ÉÏËÆºõÓÐµã²»Ì«ÎÈ¶¨¡£ Èç¹ûÄãÓöµ½ APM ºÍ PCMCIA ¹²ÓÃÊ±
ÓÐÈÎºÎÎÊÌâ£¬ÇëÄúÔÚÌá³ö³ÌÊ½Ð¡³æ±¨¸æÇ°ÏÈÊÔÖø°ÑÎÊÌâ¼ò»¯¡£

ÓÐÐ©Çý¶¯³ÌÊ½£¬ ±ÈÈçËµ PCMCIA SCSI Çý¶¯³ÌÊ½£¬ÎÞ·¨´ÓÐüÖÃ£¯ÖØÐÂ¶¯×÷ÖÜ
ÆÚÏÂ»Ø¸²¹ýÀ´¡£ ÔÚÊ¹ÓÃ  PCMCIA  SCSI  ¿¨Ê±£¬ ÔÚÐüÖÃÏµÍ³Ç°ÏÈÖ´ÐÐ
``{\ttfamily cardctl eject}''¡£




\subsubsection{¹Ø±Õ PCMCIA ÏµÍ³}

ÒªÐ¶ÏÂÕû¸öµÄ PCMCIA Ì×¼þ£¬ invoke {\ttfamily rc.pcmcia} with:

\begin{tscreen}
\begin{verbatim}
/etc/rc.d/rc.pcmcia stop
\end{verbatim}
\end{tscreen}


Õâ¸öÊÖ¸å»á»¨¼¸ÃëÖÓÀ´Ö´ÐÐ£¬¸øÈ«²¿µÄ¿Í»§×Ô¶©Çý¶¯³ÌÊ½À´ÍêÃÀµØ¹Ø±Õ
¡£Èç¹ûÓÐ¸ö PCMCIA Éè±¸Õý±»Ê¹ÓÃÖÐ£¬ÕâÑù¹Ø¿ÉÄÜ²»»áºÜÍêÕûµØ¹Ø±Õ£¬ÓÐÐ©
ºËÐÄÄ£×é¿ÉÄÜ²»»á±»Ð¶ÏÂ¡£       Òª·ÀÖ¹·¢ÉúÕâÖÖ×´¿ö£¬       ÇëÔÚÖ´ÐÐ
{\ttfamily rc.pcmcia}  Ö®Ç°Ê¹ÓÃ ``{\ttfamily cardctl eject}'' À´¹Ø±ÕËùÓÐµÄ²å²Û¡£
{\ttfamily cardctl} ÃüÁîµÄÀë¿ª×´Ì¬»áÏÔÊ¾Èç¹ûÓÐÈÎºÎµÄ²å²Û²»ÄÜ±»¹Ø±ÕµÄ¡£




\subsection{PCMCIA½¨¹¹ÊÖ¸åµÄ¸ÅÒª}

Ã¿Ò»¸ö PCMCIA Éè±¸¶¼»áÓÐ¸öÏà¶ÔÓ¦µÄ `` Àà±ð '' À´ÃèÊöËüÓ¦¸ÃÈçºÎ±»½¨
¹¹Óë¹ÜÀíµÄ¡£ÕâÐ©Àà±ðÓëÉè±¸Çý¶¯³ÌÊ½¶¼±»×éÖ¯ÔÚ
{\ttfamily /etc/pcmcia/config} ÄÚ¡£Ä¿Ç°¹²ÓÐÎåÖÖÊä³öÊäÈëÉè±¸µÄÀà±ð (Íø
Â·¡¢ SCSI¡¢ cdrom¡¢Ó²µúÒÔ¼°´®ÁÐ ) ÒÔ¼°¶þÖÖ¼ÇÒäÌåÉè±¸Àà±ð (¼ÇÒäÌåÓë
FTL)¡£ÔÚÃ¿Ò»¸öÀà±ðÖÐ£¬¶¼ÓÐ¶þ¸öÊÖ¸å·ÅÔÚ {\ttfamily /etc/pcmcia/config}
ÄÚ£ºÒ»¸öÖ÷Òª½¨¹¹ÊÖ¸å (ÀýÈç£¬  {\ttfamily /etc/pcmcia/scsi} ÊÇ SCSI Éè
±¸µÄ )£¬ÒÔ¼°Ò»¸öÑ¡ÏîÊÖ¸å (ÀýÈç£¬ {\ttfamily /etc/pcmcia/scsi.opts})¡£
Ö÷ÊÖ¸åÔÚ¿¨Æ¬±»²åÈëÊ±»á±»ÆôÓÃÀ´½¨¹¹¸ÃÉè±¸£¬µ±¿¨Æ¬±»³é³öÊ±¹Øµô¸ÃÉè±¸
¡£¶Ôì¶Ö§Ô®¶àÖÖÉè±¸µÄ¿¨Æ¬£¬Õë¶Ô¸÷±ð²»Í¬µÄÉè±¸µÄÊÖ¸å¶¼»á±»ÆôÓÃ¡£

Õâ config ÊÖ¸å»á´Ó {\ttfamily /var/run/stab} ¡õ½â³öÒ»Ð©ÓÐ¹Øì¶Éè±¸ÉÏµÄ
×ÊÁÏ¿ªÊ¼¡£ Ã¿Ò»¸öÊÖ¸å»á¹¹¡õÒ»¸ö `` Éè±¸Î»Ö· ''£¬ËüÊÇ¶ÀÒ»ÎÞ¶þµÄÎ»Ö·
ÓÃÀ´ÃèÊö¸ÃÉè±¸ÔÚ {\ttfamily ADDRESS} shell ±äÊýÄÚ±»ÒªÇó±»½¨¹¹µÄ·½Ê½¡£Ëü»á
±»´«µÝµ½ {\ttfamily *.opts} ÊÖ¸åÉÏ£¬ ¸ÃÊÖ¸åÔÙ»ØÓ¦ÓÐ¹Øì¶ÔÚÕâÎ»Ö·ÉÏµÄÉè±¸Ó¦
¸ÃÒªÔõÑùµØ½¨¹¹²Å¿ÉÒÔµÄ×ÊÑ¶¡£ ÓÐÐ©Éè±¸£¬ ËüµÄÉè±¸Î»Ö·¾ÍÊÇ²å²ÛºÅÂë¡£
»¹ÓÐÆäËûµÄÉè±¸£¬Ëü»á°üº¬ÁíÍâµÄÓÐÓÃ×ÊÑ¶¿ÉÒÔÓÃÀ´¾ö¶¨ÈçºÎÀ´½¨¹¹¸ÃÉè±¸
¡£ÀýÈç£¬ÍøÂ·Éè±¸»á´«µÝËûÃÇµÄÓ²µúÒÒÌ«ÍøÂ·Î»Ö·×öÎªÉè±¸Î»Ö·µÄÒ»²¿·Ý£¬
À´ÈÃ {\ttfamily network.opts}  ÊÖ¸åÄÜ¹»Ê¹ÓÃÕâÏî×ÊÑ¶À´´ÓÐí¶à²»Í¬µÄ½¨¹¹ÖÐ×ö
ÕýÈ·µÄÑ¡Ôñ¡£

ËùÓÐµÄÉè±¸Î»Ö·µÄÊ×Òª²¿·ÝÊÇÄ¿Ç°µÄ PCMCIA ``scheme''¡£Õâ¸ö²ÎÊýÊÇ±»ÓÃ
ÔÚÖ»ÓÐÒ»¸öÍâ²¿Ê¹ÓÃÕßÖ¸¶¨±äÊýÊ±ÓÃÀ´¶ÔÉè±¸½¨¹¹Ö®¶àÖÖÉè¶¨µÄ¡£¶Ôì¶ËüµÄ
Ó¦ÓÃ£¬ ÀýÈçÎÒÃÇ¿ÉÒÔÓÐ¸ö ``home'' scheme ÒÔ¼°Ò»¸ö ``work'' scheme£¬
ËüÃÇ°üÀ¨ÁË²»Í¬µÄÍøÂ·½¨¹¹²ÎÊýµÄ×éºÏ¡£   Ä¿Ç°µÄ   scheme    ¿ÉÒÔÊ¹ÓÃ
``{\ttfamily cardctl scheme}'' ÃüÁîÀ´×öÑ¡Ôñ¡£Èç¹ûÃ»ÓÐ scheme ±»Ö¸¶¨µÄ»°¾Í
ÒÔÄÚ¶¨ÖµÀ´Éè¶¨¡£

Ò»°ãÔ­ÔòÉÏ£¬µ±Òª½¨¹¹ Linux ÔÚ±Ê¼ÇÐÍµçÄÔÉÏÊ±£¬PCMCIA µÄÉè±¸Ö»ÄÜ±»¾­
ÓÉ  PCMCIA  Éè±¸ÊÖ¸åÀ´½¨¹¹¡£  Çë²»ÒÔÊÔÖøÒÔ½¨¹¹¹Ì¶¨Éè±¸µÄ·½Ê½À´½¨¹¹
PCMCIA Éè±¸¡£È»¶ø£¬ÓÐÐ© Linux ¹©Ó¦°æÉÌÌá¹©ÒÑ½ÓÔÚËûÃÇ×ÔÒÑµÄÉè±¸½¨¹¹
¹¤¾ßÉÏµÄ PCMCIA Ì×¼þ¡£ÔÚÕâÖÖÇé¿öÏÂ£¬ÒÔÏÂµÄ¼¸¸öÖ÷Ìâ¿ÉÄÜÎÞ·¨Ê¹ÓÃ£¬¶ø
¹©Ó¦°æÉÌÓ¦¸Ã»áÓÐËûÃÇ×Ô¼ºµÄÕâÀàÎÄ¼þ¡£




\subsection{PCMCIA ÍøÂ·¿¨}

Linux µÄÒÒÌ«ÐÍÍøÂ·¿¨½éÃæÍ¨³£±»³Æ×ö {\ttfamily eth0}¡¢{\ttfamily eth1} µÈµÈ¡£»·ÐÎ
¿¨ÒàÍ¬ÑùµØ±»¿´´ý¡£  È»¶øËüÃÇ±»³Æ×ö   {\ttfamily tr0}¡¢  {\ttfamily tr1}   µÈµÈ¡£
{\ttfamily ifconfig} ÃüÁîÊÇ±»ÓÃÀ´¹Û¿´¼°ÐÞ¸ÄÍøÂ·½éÃæ×´Ì¬µÄ¡£Linux µÄÁíÒ»ÌØ
µãÊÇÍøÂ·½éÃæ²¢²»»áÏñÆäËûÉè±¸Ò»ÑùµØ±»¿´³ÉÊÇÒ»¸öÔÚ  {\ttfamily /dev} ¡õ
Í·µÄµµ°¸¡£ËùÒÔÈç¹ûÄúÔÚ /dev ÄÚÕÒ²»µ½ËüÃÇÊ±Çë²»Òª¾õµÃ¾ªÑÈ¡£

µ±Ò»¸ö PCMCIA ÒÒÌ«ÍøÂ·¿¨±»Õì²âµ½Ê±£¬Ëü»á±»Ö¸¶¨ÎªµÚÒ»¸ö¿ÉÓÃµÄ½éÃæ¿¨
Ãû×Ö£¬     Í¨³£Îª     {\ttfamily eth0}¡£     {\ttfamily Cardmgr}      ÃüÁî»áÖ´ÐÐ
{\ttfamily /etc/pcmcia/network} ÊÖ¸åÀ´½¨¹¹ËüµÄ½éÃæ¡£

ÇëÎð½«ÄúµÄ PCMCIA ÒÒÌ«ÍøÂ·¿¨½¨¹¹ÔÚ {\ttfamily /etc/rc.d/rc.inet1}  ÄÚ
£¬ÒòÎªµ±Õâ¸öÊÖ¸å±»Ö´ÐÐÊ±Ò²Ðí¿¨Æ¬²¢²»ÔÚ²å²Û¡õ¡£ ÔÚ {\ttfamily rc.inet1} ÄÚ
³ýÁË»Ø¹éµÄÏîÄ¿Ö®Íâ£¬    ÆäËüµÄÃüÁîÁÐÇë½«ËûÃÇ×¢½âµô¡£    ¶øÁíÍâÐÞ¸Ä
{\ttfamily /etc/pcmcia/network.opts}         À´ÅäºÏÄúµÄ±¾µØÍøÂ·Éè¶¨¡£
{\ttfamily network} ºÍ {\ttfamily network.opts} ÊÖ¸åÖ»ÓÐÔÚÄúµÄÒÒÌ«ÍøÂ·¿¨´æÔÚÊ±²Å
»á±»Ö´ÐÐ¡£    Èç¹ûÄúµÄÏµÍ³ÓÐ×Ô¶¯ÍøÂ·½¨¹¹³ÌÊ½£¬    ËüÒ²ÐíÊÇÒ²Ðí²»ÊÇ
PCMCIA-aware¡£ Çë´ÓÄúµÄ Linux ¹©Ó¦°æ±¾µÄÎÄ¼þÖÐ²é¿´¿´ÊÇ·ñ PCMCIA Íø
Â·Éè±¸ÊÇ·ñÐèÒªÊ¹ÓÃ×Ô¶¯»¯¹¤¾ßÀ´½¨¹¹»òÖ»Ðè±à¼­  {\ttfamily network.opts} ¼´
¿É¡£

´«µ½ {\ttfamily network.opts}  µÄÉè±¸Î»Ö·ÖÐ°üº¬ÁËËÄ¸öÒÔ¶ººÅÀ´·Ö¿ªµÄÀ¸Î»£º
scheme¡¢²å²ÛºÅÂë¡¢Éè±¸ÌáÒé¼°¿¨Æ¬Ó²ÌåµÄÒÒÌ«ÍøÂ·Î»Ö·¡£Éè±¸ÌáÒéÊÇÓÃÀ´
¸øÓÐÐí¶àÍøÂ·½éÃæµÄ¿¨Æ¬È¡ºÅÂëÖ®ÓÃ£¬Í¨³£Îª 0¡£Èç¹ûÄúÓÐÐí¶à²»Í¬Ê¹ÓÃÄ¿
µØµÄ¿¨Æ¬Ê±£¬ÁíÒ»°´ÕÕ²å²ÛÎ»ÖÃ¶ø½¨¹¹µÄÑ¡ÏîÓ¦¸Ã±»Éè¶¨£¬ÈçÍ¬ÔÚ£º

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,0,*,*)
    # definitions for network card in socket 0
    ;;
*,1,*,*)
    # definitions for network card in socket 1
    ;;
esac
\end{verbatim}
\end{tscreen}


»òÊÇ£¬ËüÃÇ¿ÉÄÜ±»ÒÔ×Ô¼ºµÄÓ²ÌåÎ»Ö·±»½¨¹¹£¬ÈçÏÂ£º

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,*,*,00:80:C8:76:00:B1)
    # definitions for a D-Link card
    ;;
*,*,*,08:00:5A:44:80:01)
    # definitions for an IBM card
esac
\end{verbatim}
\end{tscreen}





\subsubsection{ÍøÂ·Éè±¸²ÎÊý}

 ÒÔÏÂµÄ²ÎÊý¿ÉÔÚ {\ttfamily network.opts}ÄÚ±»Ê¹ÓÃ£º

\begin{description}
\item[{\ttfamily IF\_PORT}] \mbox{}

Ö¸¶¨ÒÒÌ«ÍøÂ·ÊÕ·¢Æ÷ÀàÐÍ£¬  ÕâÊÇÕë¶ÔÄÇÐ©ÎÞ·¨×Ô¶¯Õì²âµÄ¿¨Ê¹ÓÃ¡£  Çë¿´
``{\ttfamily man ifport}'' ÄÚÓÐÊÕ·¢Æ÷Ãû³Æ¡£

\item[{\ttfamily BOOTP}] \mbox{}

²¼ÁÖ  (y/n)  Éè¶¨£º ±íÊ¾ÊÇ·ñÖ÷»úµÄ  IP  Î»Ö·ºÍ·ÖÂ·×ÊÑ¶ÊÇ·ñ¿ÉÒÔ¾­ÓÉ
BOOTP Ð­¶¨À´»ñÈ¡¡£

\item[{\ttfamily IPADDR}] \mbox{}

Ö¸¶¨IPÎ»Ö·¡£

\item[{\ttfamily NETMASK}, {\ttfamily BROADCAST}, {\ttfamily NETWORK}] \mbox{}

»ù±¾ÍøÂ·²ÎÊý£º Çë²ÎÔÄ networking HOWTO

\item[{\ttfamily GATEWAY}] \mbox{}

¸øÖ÷»úµÄ×ÓÍøÂ·Ê¹ÓÃµÄÍ¨Ñ¶Õ¢ IP Î»Ö·¡£Ö»ÒªÊÇÔÚÕâ¸ö×ÓÍøÂ·ÒÔÍâµÄ·â°ü¶¼
»á±»×ªµ½Õâ¸öÕ¢µÀ¡£

\item[{\ttfamily DOMAIN}] \mbox{}

¸øÖ÷»úµÄÍøÂ· domain name£¬±»ÓÃÀ´½¨Á¢ {\ttfamily /etc/resolv.conf}¡£

\item[{\ttfamily DNS\_1}, {\ttfamily DNS\_2}, {\ttfamily DNS\_3}] \mbox{}

Ö÷»úÃû³Æ»òÊÇ    IP    Î»Ö·¸øÕâ¸ö½éÃæµÄ     nameservers£¬    ±»¼Óµ½
{\ttfamily /etc/resolv.conf}ÄÚ¡£

\item[{\ttfamily MOUNTS}] \mbox{}

A
¸øÕâ¸ö½éÃæÊ¹ÓÃÀ´×ö  NFS ¹ÒÈëµãµÄÁÐ±í¡£

\item[{\ttfamily IPX\_FRAME}, {\ttfamily IPX\_NETNUM}] \mbox{}

¶Ô IPX ÍøÂ·: frame  type  ¼°ÍøÂ·ºÅÂë½«±»´«Êäµ½  {\ttfamily ipx\_interface}
ÃüÁîÉÏ¡£

\end{description}


ÀýÈç£º

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,*,*,*)
    IF_PORT="10base2"
    BOOTP="n"
    IPADDR="10.0.0.1"
    NETMASK="255.255.255.0"
    NETWORK="10.0.0.0"
    BROADCAST="10.0.0.255"
    GATEWAY="10.0.0.1"
    DOMAIN="domain.org"
    DNS_1="dns1.domain.org"
    ;;
esac
\end{verbatim}
\end{tscreen}


ÈôÏë×Ô¶¯¹ÒÉÏ»òÐ¶ÏÂÍøÂ·µµ°¸ÏµÍ³£¬Ê×ÏÈ½«µµ°¸ÏµÍ³¼Óµ½ {\ttfamily /etc/fstab}
ÄÚ£¬ÔÚ¹ÒÉÏÑ¡ÏîÉÏ¼ÓÉÏ {\ttfamily noauto}¡£ ÔÚ {\ttfamily network.opts} ÄÚ
Ê¹ÓÃ  {\ttfamily MOUNTS}   ±äÊýÁÐÃ÷µµ°¸ÏµÍ³µÄ¹ÒÈëµã¡£  ÕâÌØ±ðÊÇÔÚÊ¹ÓÃ
{\ttfamily cardctl} »ò {\ttfamily cardinfo} ÃüÁîÀ´¹Ø±Õµ±ÍøÂ·µµ°¸ÏµÍ³ÊÇÓÃÕâ¸ö·½·¨
½¨¹¹¶ø¹ÒÉÏµÄÍøÂ·¿¨Ê±¡£Èç¹ûÔÚÃ»Ô¤¾¯ÏÂÍøÂ·¿¨±»ÒÆ³öÊ±£¬ÊÇÎÞ·¨ÍêÈ«µØÐ¶
ÏÂÍøÂ·µµ°¸ÏµÍ³µÄ¡£

³ýÁËÒ»°ãµÄÍøÂ·½¨¹¹²ÎÊýÖ®Íâ£¬{\ttfamily network.opts} ÊÖ¸å¿ÉÓÃÀ´ÔÚ½éÃæÒÑ¾­
±»½¨¹¹Æðáá»ò±»¹Ø±Õáá×öÁíÍâµÄ¶¯×÷Ê±Ê¹ÓÃ¡£ Èç¹û {\ttfamily network.opts} ¶¨
ÒåÁËÒ»¸ö½Ð {\ttfamily start\_fn} µÄÃüÁî²ã¹¦ÄÜºô½Ð£¬ µ±½éÃæ±»½¨¹¹ááËü»á±»Íø
Â·ÊÖ¸åËùÆôÓÃ£¬¶ø½éÃæÃû³Æ½«»á±»´«ËÍµ½Õâ¸ö¹¦ÄÜº¯Êý×öÎªµÚÒ»¸ö²ÎÊý£¨Ò²
Ö»ÓÐÕâ¸ö£©¡£ÏàÍ¬µØ£¬Èç¹û {\ttfamily stop\_fn} ±»¶¨ÒåÁË£¬ÄÇ÷áËü»áÔÚ¹Ø±ÕÒ»¸ö
½éÃæÇ°±»ÆôÓÃ¡£

ÊÕ·¢Æ÷ÀàÐÍ¿ÉÒÔÓÃ {\ttfamily IF\_PORT} À´Éè¶¨¡£Ëü¿ÉÒÔÊÇ PCMCIA Ö®Ç°°æ±¾µÄÊý
Öµ±íÊ¾»òÊÇÊ¶±ðÊÕ·¢Æ÷µÄ¹Ø¼ü×Ö¡£ËùÓÐµÄÍøÂ·Çý¶¯³ÌÊ½¾¡¿ÉÄÜ½«ËüÉè¶¨Îª×Ô
¶¯Õì²â£¨Èç¹û¿ÉÄÜµÄ»°£©½éÃæ»òÊÇ 10baseT µÄ¡£ {\ttfamily ifport} ÃüÁî¿ÉÓÃÀ´
¼ì²é»òÉè¶¨Ä¿Ç°µÄÊÕ·¢Æ÷ÀàÐÍ£¬ÀýÈç£º

\begin{tscreen}
\begin{verbatim}
# ifport eth0 10base2
# 
# ifport eth0
eth0    2 (10base2)
\end{verbatim}
\end{tscreen}


Ä¿Ç°µÄ 3c589 Çý¶¯³ÌÊ½°æ±¾»á×Ô¶¯Õì²âÍøÂ·µÄÁ¬½á£¬ µ«»¹ÎÞ·¨ÍêÈ«·¢»ÓËü
µÄ¹¦ÄÜ¡£ÈôÏëÒÔ×Ô¶¯Õì²âÀ´¹¤×÷£¬ÔÚÍøÂ·¿¨±»½¨¹¹Ç°ÍøÂ·ÏßÓ¦¸ÃÊÇÒÑÁ¬½ÓÖø
ÍøÂ·¿¨ÉÏµÄ¡£Òª²»È»£¬µÈÍøÂ·½ÓºÃáá£¬Äú¿ÉÒÔÏÂÁÐÃüÁîÆÈÊ¹Çý¶¯³ÌÊ½¼ì²éÁ¬
½á£º

\begin{tscreen}
\begin{verbatim}
ifconfig eth0 down up
\end{verbatim}
\end{tscreen}





\subsubsection{ÌØ¶¨¿¨Æ¬µÄÆÀÓï}



\begin{itemize}
\item Ê¹ÓÃ IBM CCAE ºÍ Socket EA ¿¨ÔÚÍøÂ·Éè±¸±»½¨¹¹Ê±£¬ ÄúÐèÌô¸ö½ÓÊÕÆ÷Àà
ÐÍ (10base2¡¢10baseT¡¢AUI)£¬²¢È·ÈÏÔÚÄúµÄÏµÍ³ÈÕÖ¾ÉÏËù¼ÇÂ¼µÄ½ÓÊÕÆ÷Óë
ÄúËùÁ¬½áµÄÏàÍ¬¡£
\item ¸ø SMC¡¢Megahertz¡¢ Ositech ¼° 3Com ¿¨Æ¬µÄÇý¶¯³ÌÊ½Ó¦¸Ã»á×Ô¶¯Õì²âÁ¬
½ÓÖøµÄÍøÂ·ÀàÐÍ  (10base2   »ò  10baseT) ¡£  µ±Çý¶¯³ÌÊ½±»ÔØÈëÊ±»áÉè
¶¨ÊÕ·¢Æ÷ÀàÐÍÀ´¶©¶¨Òå¿¨Æ¬µÄ ``µÚÒ»´Î²ÂÏë''¡£
\item Farallon EtherWave ÊÂÊµÉÏÊÇºÍ 3Com 3c589 ÏàÍ¬µÄ£¬ µ«ÓÐ¸öÌØÊâµÄÊÕ·¢
Æ÷¡£ ËäÈ» EtherWave Ê¹ÓÃ 10baseT ÀàµÄÁ¬½Ó·½Ê½£¬ µ«ËüµÄÊÕ·¢Æ÷ÐèÒª°Ñ
3c589 ½¨¹¹³É 10base2 Ä£Ê½¡£
\item Èç¹ûÄúÊ¹ÓÃ IBM CCAE¡¢NE4100¡¢ Thomas Conrad »ò Kingston ½éÃæ¿¨Ê±Óö
µ½ÎÊÌâ£¬ ÇëÊÔÖøÔÚ {\ttfamily pcnet\_cs} Ä£×éÄÚµÄ {\ttfamily mem\_speed=\#} Ñ¡Ïî
Ôö¼Ó¼ÇÒäÌå´æÈ¡Ê±¼ä¡£ÔÚ±ê×¼µÄ {\ttfamily config.opts} µµ°¸ÄÚÓÐ¸ö½ÌÄãÈçºÎ×ö
µÄ¡õÀý¡£ÇëÊÔ¿´¿´ËÙ¶ÈÔÚ 1000 ns(ÄÎÃë)ÒÔÉÏ¡£
\item New Media ÒÒÌ«ÍøÂ·¿¨ÔÚ½Óµ½Ä³Ð©ÏµÍ³ÉÏÊ±£¬¿ÉÄÜÐèÒªÔÚ {\ttfamily pcmcia\_core}
Ä£×é±»ÔØÈëÊ±£¬ ÒÔ {\ttfamily io\_speed=\#} Ñ¡ÏîÀ´Ôö¼Ó IO ²ºµÄ´æÈ¡Ê±¼ä¡£
ÔÚÆô¶¯ÊÖ¸åµÄ {\ttfamily CORE\_OPTS}  Ñ¡Ïî¿ÉÒÔÉè¶¨Ëü¡£
\item New Media ÒÒÌ«ÍøÂ·¿¨Çý¶¯³ÌÊ½µÄ¶à¹¤´«²¥Ö§Ô®²¢²»ÍêÕû¡£×îÐÂµÄÇý¶¯³ÌÊ½
°æ±¾¿ÉÓë¶à¹¤´«²¥ºËÐÄÒ»ÆðÊ¹ÓÃ£¬µ«»áÂÔ¹ý¶à¹¤´«²¥·â°ü¡£²»¹æÔòÄ£Ê½Ó¦¸Ã
¿ÉÒÔ¹¤×÷Õý³£ÁË¡£
\item ¸ø IBM ¼° 3Com token ring ¿¨µÄÇý¶¯³ÌÊ½ÔÚ¿¨Æ¬ÉÐÎ´½ÓÉÏÒ»¸ö ring ÉÏÊ±
¾Í×ö³õÊ¼»¯ÊÇ»áÓÐµãÎÊÌâ¡£ËùÒÔÇëÒ»¶¨¼ÇµÃÔÚ¿ª»úÇ°Ò»¶¨Òª°ÑÕâÐ©¿¨Æ¬ºÍ
ÍøÂ·Á¬½ÓÔÚÒ»Æð¡£ Õâ¸öÇý¶¯³ÌÊ½Ò²ÐèÒª¿ÕÖÃµÄ IO ²ºÔÚ 0xa20-0xa27 ¡õÎ§
ÄÚ¡£ÔÚÓÐÐ©ÏµÍ³ÉÏ£¬×Ô¶¯ IO ²º³åÍ»¼ì²éÆ÷»á´íÎóµØÅÐ¶¨ËµÕâ¸ö²º¡õÎ§²¢²»
ÊÇ¿ÕÖÃµÄ¡£   Óöµ½ÕâÖÖÇé¿ö£¬  ÎÒÃÇ¿ÉÒÔ°Ñ²º¼ì²éÆ÷¸ø¹Ø±Õµô¡£   Ö»ÒªÔÚ
ÔØÈë {\ttfamily pcmcia\_core} Ä£×éÊ±Éè¶¨ {\ttfamily probe\_io=0}¼´¿É¡£
\item Newer Linksys ¼° D-Link µÄ¿¨Æ¬ÓÐ¸öÌØÊâµÄÑ¡ÔñÊÕ·¢Æ÷·½Ê½£¬Ä¿Ç°»¹²»±»
Linux µÄÇý¶¯³ÌÊ½ËùÄÜ¿ØÖÆ¡£ Ö»ÓÐÒ»¸ö±äÍ¨µÄ·½·¨ÊÇÒÔ DOS ¿ª»ú²¢Ê¹ÓÃ³§
ÉÌËù¸¶µÄ¹«ÓÃ³ÌÊ½À´Ñ¡ÔñÊÕ·¢Æ÷áá£¬ÔÙÅ¯¿ª»ú½øµ½ Linux ¡õ¡£ ÎÒÏÖÔÚÒ²Õý
ÔÚÑ°ÕÒÊ×´ÎµÄ²âÊÔÕßÊ¹ÓÃ Linux µÄ¹«ÓÃ³ÌÊ½À´×öµ½ÕâÐ©¹¦ÄÜ¡£
\item ¶Ô WaveLAN ÎÞÏßÍøÂ·¿¨À´Ëµ£¬Jean Tourrilhes ({\ttfamily jt@hplb.hpl.hp.com})
Ð´ÁËÒ»ÆªÎÞÏßµÄ  (Éè±¸  )  wireless   HOWTO  ·ÅÔÚ  \nameurl{http: //www-uk.hpl.hp.com/people/jt/Linux/Wavelan.html}{} ÄÚ¡£
\end{itemize}





\subsubsection{Õï¶ÏÍøÂ·¿¨µÄÎÊÌâ}



\begin{itemize}
\item ÄúµÄ¿¨Æ¬ÓÐ±»±æÊÓ³ÉÒÒÌ«ÍøÂ·¿¨Âð? Çë²é¿´ÏµÍ³ÈÕÖ¾²¢È·ÈÏ  {\ttfamily cardmgr}
ÒÑÕýÈ·µØ±æÊÓÁËÕâÕÅ¿¨£¬¶øÇÒÒÑÆô¶¯ÁËÒ»ÖÖÍøÂ·Çý¶¯³ÌÊ½ÁË¡£Èç¹ûÃ»ÓÐ£¬Äú
µÄ¿¨Æ¬Ò²¿ÉÄÜ»¹ÊÇ¿ÉÒÔÊ¹ÓÃ£¬Ö»ÒªËüÓëÈÎÒ»ÖÖ±»Ö§Ô®µÄ¿¨Æ¬ÏàÈÝµÄ»°¡£Ö»Òª
ÊÇÕâ¿¨Æ¬ÊÇÓë NE2000 ÏàÈÝµÄ¿¨Æ¬¶¼¿ÉÒÔ×öµ½¡£
\item ¿¨Æ¬ÓÐÍ×µ±µØ±»½¨¹¹ÁËÂð?   Èç¹ûÄãÊ¹ÓÃµÄÊÇ±»Ö§Ô®µÄ¿¨Æ¬£¬  ¶øÇÒËüÒÑ±»
{\ttfamily cardmgr}Ëù±æÊÓÁË£¬µ«Ëü»¹ÊÇÎÞ·¨¹¤×÷£¬Õâ¿ÉÄÜÊÇÒòÎªËüÓëÆäËûµÄÉè±¸
·¢Éú²å¶Ï»ò²ºµÄ³åÍ»ÁË¡£Çë²éÃ÷ÕâÕÅ¿¨Æ¬Ê¹ÓÃÁËÂðÐ©×ÊÔ´ (´ÓÏµÍ³ÈÕÖ¾¡õÕÒ
)£¬ È»ááÊÔÖøÔÚ {\ttfamily /etc/pcmcia/config.opts} ÄÚ°ÑÕâÐ©¸øÅÅ³ýµôÀ´
ÆÈÊ¹¿¨Æ¬Ê¹ÓÃÆäËûµÄ×ÊÔ´¡£
\item Èç¹ûÄãµÄ¿¨Æ¬ËÆºõÒÑÍ×µ±µØ½¨¹¹ÁË£¬µ«ÓÐÊ±ºò»¹ÊÇ»áËøËÀ²»ÄÜ¶¯£¬ÓÈÆäÊÇÔÚ
¸ß¸ºÔØÊ±£¬Äã¿ÉÄÜÐèÒªÊÔÖø¸Ä±äÄãµÄ²å²ÛÇý¶¯³ÌÊ½µÄ·ÖÊ±²ÎÊý¡£ÏêÏ¸×ÊÁÏÇë
¿´ \ref{timing} {(2.3)} ÕâÕÂ¡£
\item µ±ÄãÔÚ´æÈ¡ÍøÂ·Ê¹Óöµ½Ïñ ``network unreachable'' ÕâÀàµÄÑ¶Ï¢£¬ ¿ÉÄÜÊÇ
ÄãÔÚ {\ttfamily /etc/pcmcia/network.opts} ÓÐÉè¶¨´íÎóµÄµØ·½¡£ ÁíÍâ£¬´í
ÎóµØ½¨¹¹µÄ¿¨Æ¬Í¨³£»á°²¾²µØ·¢ÉúÎÊÌâ¡£
\item ÒªÕï²éÔÚ {\ttfamily /etc/pcmcia/network.opts} ÄÚµÄ´íÎó£¬ ¿ªÊ¼ÇëÏÈÊÔÖø
ÒÔËüÃÇµÄ IP Î»Ö·À´ ping Í¬Ò»´ÎÍøÂ·µÄÆäËûÏµÍ³¡£È»ááÊÔÖø ping ÄãµÄÕ¢
µÀ£¬È»ááÆäËû´ÎÍøÂ·ÄÚ»úÆ÷¡£ÔÚÊÔÍêÕâÐ©½Ï¼òµ¥µÄ²âÊÔáá£¬ÔÙÒÔ»úÆ÷µÄÃû×Ö
À´ Ping¡£
\item ÇëÒªÈ·ÈÏÄãµÄÎÊÌâÕæµÄ¸ö  PCMCIA  µÄÎÊÌâ¡£ Äã¿ÉÒÔÔÚ DOS ÏÂÒÔ³§ÉÌ¹©Ó¦
µÄÇý¶¯³ÌÊ½À´Çý¶¯¿´¿´ÊÇ·ñ¿ÉÒÔ¹¤×÷£¬ÕâÑù½«ÓÐÖúì¶ÅÐ¶Ï¡£²¢ÔÙ´Î¸´¼ìÄã¶Ô
{\ttfamily /etc/pcmcia/network.opts} ÊÖ¸åÄÚµÄÈÎºÎÐÞ¸Ä¡£²¢È·ÈÏÄãµÄÀÂÏß
¡¢``T'' ½ÓÍ·¡¢ÖÕ¶Ëµç×èÆ÷µÈµÈµÄÔª¼þ¶¼¿ÉÕý³£¹¤×÷¡£
\end{itemize}





\subsection{PCMCIA ´®ÁÐÓëÊý¾Ý»úÉè±¸}

Linux µÄ´®ÁÐÉè±¸¶¼ÊÇ±»¾­ÓÉ {\ttfamily /dev/cua*} ºÍ {\ttfamily /dev/ttyS*}
ÌØÊâÉè±¸µµ°¸À´×öÈ¡ÓÃ¡£ {\ttfamily ttyS*} µÄÉè±¸±»Ê¹ÓÃÔÚ½øÀ´µÄÁ¬½Ó£¬ÀýÈçÖ±
½ÓµØÁ¬½ÓÖÕ¶Ë»ú¡£{\ttfamily cua*} µÄÉè±¸±»Ê¹ÓÃÔÚÍùÍâµÄÁ¬½Ó£¬±ÈÈçËµÊý¾Ý»ú¡£
¶øÃ¿Ò»¸öÊµÌå´®ÁÐ²º¶¼¸÷ÓÐ {\ttfamily ttyS} ºÍ {\ttfamily cua} Á½¸öÉè±¸µµ£º ÒªÊ¹ÓÃ
ÄÄ¸öÊÊµ±µÄÉè±¸µ½ÄãµÄÓ¦ÓÃÉÏ¶¼ÓÉÄúÀ´¾ö¶¨¡£

¶Ôì¶´®ÁÐÉè±¸µÄ½¨¹¹£¬Äú¿ÉÊ¹ÓÃ {\ttfamily setserial} ÃüÁîÀ´¼ì²éÓëÐÞ¸Ä¡£

µ±Ò»¸ö PCMCIA ´®ÁÐ¿¨»òÊý¾Ý¿¨±»Õì²âµ½Ê±£¬Ëü»á±»Ö¸¶¨³ÉÎªµÚÒ»¸ö¿ÉÓÃµÄ
´®ÁÐÉè±¸¡£Í¨³£ÊÇ {\ttfamily /dev/ttyS1} ({\ttfamily cua1}) »ò {\ttfamily /dev/ttyS2}
({\ttfamily cua2}) £¬ÕâÍê³É¿´Ô­ÒÑÄÚ½¨µÄ´®ÁÐ²ºÊýÄ¿¡£  {\ttfamily ttyS*} Éè±¸»á±»
±¨¸æÔÚ   {\ttfamily /var/run/stab}    ÄÚ¡£   Ô­ÄÚ¶¨µÄ´®ÁÐÉè±¸Ñ¡ÏîÊÖ¸å
{\ttfamily /etc/pcmcia/serial.opts} »á½«Ö®Á¬½áµ½Ïà¶ÔÓ¦µÄ {\ttfamily cua*} Éè
±¸µµ°¸³ÉÎª {\ttfamily /dev/modem}¡£ÕâÑù¾ÍºÜ±ãÀûÁË¡£

ÇëÎðÊ¹ÓÃ {\ttfamily /etc/rc.d/rc.serial} À´½¨¹¹ PCMCIA Êý¾Ý»ú¡£Õâ¸öÊÖ
¸åÓ¦¸ÃÖ»ÄÜ±»ÓÃÀ´½¨¹¹ÄÇÐ©·Ç¿ÉÒÆ¶¯µÄÉè±¸¡£Èç¹ûÄãÏëÒªÉè¶¨ÄãµÄÊý¾Ý»úÀ´
×öÈÎºÎÌØ±ðµÄ¶¯×÷Ê±£¬ÇëÐÞ¸Ä {\ttfamily /etc/pcmcia/serial.opts} Õâ¸öÊÖ
¸å¡£ ÁíÍâ£¬ Ò²ÇëÎðÊ¹ÓÃ {\ttfamily setserial} À´¸Ä±ä PCMCIA ´®ÁÐÉè±¸µÄÉè±¸
IO ²ººÍ²å¶ÏÉè¶¨¡£ ÕâÑù×öÖ»»á¸æËß´®ÁÐÇý¶¯³ÌÊ½µ½²»¶ÔµÄµØ·½Ñ°ÕÒ´®ÁÐÉè
±¸£¬µ«²»»á¸Ä±ä¿¨Æ¬Ó²Ìå·½ÃæÕæÕý±»½¨¹¹µÄÊÂÊµ¡£´®ÁÐ½¨¹¹ÊÖ¸åÔÊÐíÄúÖ¸¶¨
ÆäËûµÄ {\ttfamily setserial}  Ñ¡Ïî£¬ ÒÔ¼°ÊÇ·ñÄú¸ÃÔÚ {\ttfamily /etc/inittab}
ÄÚÎªÕâ¸ö²º¼ÓÒ»ÐÐÉè¶¨¡£

¿ì´«ËÍµ½ {\ttfamily serial.opts} µÄÉè±¸Î»Ö·¹²ÓÐÈý¸öÓÉ¶ºµãËù·Ö¿ªµÄÀ¸Î»£ºµÚ
Ò»ÊÇ scheme¡¢ µÚ¶þÊÇ²å²ÛºÅÂëÒÔ¼°µÚÊÇ  device instance¡£ The device
instance »áÎªÖ§Ô®¶à´®ÁÐ²ºµÄ¿¨Ñ¡ÓÃ¶à¸öÊý¾Ý£¬µ«¶Ôì¶µ¥Ò»²º¿¨À´Ëµ£¬ Ëü
ÓÀÔ¶¶¼ÊÇÁã¡£ Èç¹ûÄã³£Ê¹ÓÃ²»Ö»Ò»¸öµÄ PCMCIAl Êý¾Ý»ú£¬Äã¿ÉÄÜÐèÒªÕë¶Ô
¸÷±ð²å²ÛÄÚµÄÊý¾Ý»ú×ö²»Í¬µÄÉè¶¨¡£ÈçÏÂ£º

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,0,*)
    # Options for modem in socket 0
    LINK=/dev/modem0
    ;;
*,1,*)
    # Options for modem in socket 1
    LINK=/dev/modem1
    ;;
esac
\end{verbatim}
\end{tscreen}


Èç¹û PCMCIA Êý¾Ý¿¨ÔÚ Linux Æô¶¯Ê±¼´±»½¨¹¹ºÃÁË£¬ ÄÇËü¿ÉÄÜÒÑ±»´íÎóµØ
±»±æÊ¶³ÉÎªÒ»°ãµÄÄÚ½¨´®ÁÐ²ºÁË¡£ÕâËäÈ»ÎÞº¦´¦£¬µ«ÊÇ£¬µ± PCMCIA Çý¶¯³Ì
Ê½½ÓÊÖÀ´¿ØÖÆÊý¾Ý»úÊ±£¬ Ëü»á±»Ö¸ÅÉ³É²»Ò»ÑùµÄÉè±¸²å¿×¡£ ×îºÃÊÇ parse
{\ttfamily /var/run/stab}   »òÊ¹ÓÃ  {\ttfamily /dev/modem}£¬  ¶ø²»ÊÇÆÚÍû
PCMCIA Êý¾Ý»ú×ÜÊÇ±»Ö¸ÅÉ³ÉÏàÍ¬µÄÉè±¸¡£

Èç¹ûÄã½¨¹¹ÄãµÄºËÐÄÀ´ÔØÈë»ù±¾µÄ  Linux ´®ÁÐ²ºÇý¶¯³ÌÊ½³ÉÎªÒ»¸öÄ£×é£¬
Äã±ØÐë±àÐÞ {\ttfamily /etc/pcmcia/config} À´Ö¸³ö¸ÃÄ£×é±ØÐë±»ÔØÈë¡£ ±à
ÐÞ´®ÁÐÉè±¸ÄÇÁÐÈçÏÂ£º

\begin{tscreen}
\begin{verbatim}
device "serial_cs"
  class "serial" module "misc/serial", "serial_cs"
\end{verbatim}
\end{tscreen}





\subsubsection{´®ÁÐ×°ÖÃ²ÎÊý}

ÒÔÏÂµÄ²ÎÊý¿ÉÒÔ²ç {\ttfamily serial.opts}ÄÚ±»¶¨Òå£º
\begin{description}
\item[{\ttfamily LINK}] \mbox{}

Îª·ûºÅÁ¬½á (symbolic  link)Ö¸¶¨¸öÒª±»½¨Á¢µÄÂ·¾¶  ``dialout''  »òÊÇ
{\ttfamily /dev/cua*} Éè±¸¡£

\item[{\ttfamily SERIAL\_OPTS}] \mbox{}

Ö¸¶¨ÓÐÄÄÐ©Ñ¡Ïî½«±»´«ËÍµ½ {\ttfamily setserial} ÃüÁî¡£

\item[{\ttfamily INITTAB}] \mbox{}

Èç¹ûÓÐÖ¸¶¨µÄ»°£¬Ëü½«±»ÓÃÀ´ÔÚ {\ttfamily inittab} ÖÐÎª¸ÃÉè±¸½¨Á¢Ò»¸öÌõÄ¿¡£

\end{description}


ÀýÈç£º

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,*,*,*)
    LINK="/dev/modem"
    SERIAL_OPTS=""
    INITTAB="/sbin/getty"
\end{verbatim}
\end{tscreen}





\subsubsection{Õï¶Ï´®ÁÐÉè±¸µÄÎÊÌâ}



\begin{itemize}
\item ÄúµÄ¿¨±»ÈÏÎªÊÇ¸öÊý¾Ý»úÂð? Çë¼ì²éÏµÍ³ÈÕÖ¾²¢È·ÈÏ {\ttfamily cardmgr} ÓÐÕýÈ·
µØ±æÊ¶ÁËÕâÕÅ¿¨£¬²¢ÇÒÆô¶¯ÁË {\ttfamily serial\_cs} Çý¶¯³ÌÊ½¡£Èç¹ûÃ»ÓÐ£¬Äã¿É
ÄÜÐèÒªÔÚÄãµÄ {\ttfamily /etc/pcmcia/config}  µµ°¸ÖÐ¼ÓÈëÒ»ÌõÓ¦¸Ã±»ÊÊµ±
µØ±æÊ¶µÄÌõÄ¿¡£Ï¸½ÚÇë¿´ÕÂ½Ú \ref{new-card} {(3.6)}¡£
\item Êý¾Ý¿¨³É¹¦µØ±» serial\_cs Ëù½¨¹¹ÁËÂð? ÔÙÀ´Ò»´Î£¬ Çë¼ì²éÏµÍ³ÈÕÖ¾£¬ÔÙ
¿´¿´´Ó      serial\_cs       Çý¶¯³ÌÊ½Ëù³öÀ´µÄÑ¶Ï¢¡£      Èç¹ûÄã¿´µ½
``register\_serial() failed''£¬ Äã¿ÉÄÜÓöµ½ÁË I/O ²ºÓëÆäËûÉè±¸Ïà³åÍ»
ÁË¡£ ÁíÍâÒ»¸öÇé±¨ÊÇ£¬ Èç¹ûÕâ¸öÉè±¸±»±¨¸æËµÊÇ¸ö 8250;  ´ó²¿·ÝÏÖÔÚµÄ
PCMCIA Êý¾Ý¿¨Ó¦¸ÃÊÇ±»±æÊÓ³É 16550A UART ÀàÐÍµÄ¡£Èç¹ûÄú¾õµÃÓöÉÏÁËÒ»
¸ö²º³åÍ»ÁË£¬Çë±àÐÞ {\ttfamily /etc/pcmcia/config.opts} °Ñ±»ÅäÖÃ¸øÊý¾Ý
¿¨µÄ²º¡õÎ§¸øÅÅ³ý¡£
\item ÓöÉÏÁË²å¶Ï³åÍ»Âð? Èç¹ûÏµÍ³ÈÕÖ¾¿´ËÆºÜºÃ£¬µ«Êý¾Ý¿¨¾ÍÊÇºÃÏñ²»ÄÜ¹¤×÷£¬
ÇëÊÔÊÔÓÃ {\ttfamily setserial} À´°Ñ irq ¸Ä³É 0£¬ ÔÙ¿´¿´Êý¾Ý»úÊÇ·ñ¿ÉÒÔ¹¤×÷
ÁË¡£ÕâÑù»áÈÃ´®ÁÐÇý¶¯³ÌÊ½Ê¹ÓÃÒ»¸öÂýÒ»Ð©µÄÆ±Ñ¡Ä£Ê½¶ø²»Ê¹ÓÃ²å¶ÏÀ´¹¤×÷
¡£Èç¹ûÕâÑù¿ÉÒÔÐÞÕýÕâ¸öÎÊÌâ£¬ÄÇ¾ÍÊÇÔÚÄãµÄÏµÍ³ÖÐÓÐÄ³¸öÆäËûµÄÉè±¸Ê¹ÓÃ
ÁË±» serial\_cs ËùÑ¡ÓÃµÄ²å¶ÏÔÚ¹¤×÷Öø¡£ÄãÓ¦¸ÃÔÚ {\ttfamily /etc/pcmcia/config.opts}
ÖÐ¼ÓÒ»ÐÐÃüÁî½«Õâ¸ö²å¶Ï¸øÅÅ³ýµô¡£
\item Èç¹ûÊý¾Ý»úºÃÏñÖ»ÄÜÂýÂýµØ¹¤×÷£¬Õâ¾ÍºÜÃ÷ÏÔµØÊÇ¸ö²å¶Ï³åÍ»µÄÎÊÌâÁË¡£
\item ÇëÈ·ÈÏÄãËùÓöµ½µÄÎÊÌâÕæµÄÊÇ¸ö PCMCIA µÄÎÊÌâ¡£Ê¹ÓÃÔ­³§ÉÌµÄÇý¶¯³ÌÊ½ÔÚ
DOS ÏÂ¿´¿´ÊÇ·ñ¿ÉÒÔÕý³£¹¤×÷¼´¿ÉÖªµÀ¡£ÁíÍâ£¬ÔÚÄãÒÑÈ·¶¨Äã¿ÉÒÔ×ö¼òµ¥µÄ
Á¬½ÓÇ°£¬Çë²»ÒªÊ¹ÓÃ¸ü¸´ÔÓµÄ·½Ê½À´²âÊÔ£¬±ÈÈçËµ SLIP »ò PPP¡£Èç¹û¼òµ¥
µÄÁ¬½ÓÕý³£µ«Ê¹ÓÃ SLIP Ê±È´²»ÊÇ£¬ÄãµÄÎÊÌâÓ¦¸Ã¾ÍÊÇ³öÔÚ SLIP ÉÏ£¬¶ø²»
ÊÇ PCMCIA¡£
\item Èç¹ûÄãµÃµ½·¢×ÔºËÐÄµÄÑ¶Ï¢Ö¸³ö serial\_cs Ä£×éÎÞ·¨±»ÔØÈë¡£ ÄÇ¾Í±íÊ¾Äã
µÄºËÐÄ²¢²»Ö§Ô®´®ÁÐÉè±¸¡£Èç¹ûÄãÒÑ½«´®ÁÐÇý¶¯³ÌÊ½±àÒë³ÉÒ»¸öÄ£×éÁË£¬Äã
±ØÐëÐÞ¸Ä {\ttfamily /etc/pcmcia/config} À´ÈÃ {\ttfamily serial} Ä£×éÓ¦¸Ã
ÔÚÔØÈë {\ttfamily serial\_cs} Ç°¾Í±»ÔØÈëÁË¡£
\end{itemize}





\subsection{PCMCIA SCSI¿¨}

Ä¿Ç°ËùÓÐ±»Ö§Ô®µÄ PCMCIA SCSI ¿¨¶¼¹¤×÷µÄÏñÏÂÁÐµÄ ISA »ãÁ÷ÅÅ¿¨µÄÑù×Ó
£º Qlogic¡¢Adaptec AHA-152X »òÊÇ Future Domain TMC-16x0¡£PCMCIA Çý
¶¯³ÌÊ½±»½¨Á¢³ÉÓë  PCMCIA  ÌØ±ð³ÌÊ½ÂëÏàÁ¬½á  (Èç {\ttfamily qlogic\_cs.c}¡¢
{\ttfamily toaster\_cs.c} »ò {\ttfamily fdomain\_cs.c}) ÒÔ¼°Õý³£µÄ Linux SCSI Çý¶¯
³ÌÊ½¡£

µ±Ò»¸öÐÂµÄ SCSI Ö÷¿¨±»Õì²âµ½Ê±£¬ SCSI Çý¶¯³ÌÊ½»áÑ°ÕÒÁ¬½ÓÖøµÄÉè±¸¡£
Çë¼ì²éÏµÍ³ÈÕÖ¾ÄãµÄÉè±¸±»ÕýÈ·µØÕì²âµ½ÁË¡£ÐÂµÄ SCSI Éè±¸»á±»Ö¸¶¨ÎªµÚ
Ò»¸ö¿ÉÓÃµÄ SCSI Éè±¸µµ¡£µÚÒ»¸ö SCSI Ó²µúÊÇ {\ttfamily /dev/sda}£¬µÚÒ»
¸ö SCSI  ´Å´ø»úÊÇ  {\ttfamily /dev/st0}£¬ »¹ÓÐ£¬ µÚÒ»¸ö  CD-ROM  »áÊÇ
{\ttfamily /dev/scd0}¡£

ÔÚ 1.3.X (º¬ ) ÒÔááµÄºËÐÄ¡õ£¬PCMCIA ºËÐÄÇý¶¯³ÌÊ½¿ÉÒÔ´ÓÏµÍ³ºËÐÄÖÐÕÒ
³öÓÐÄÄÐ© SCSI Éè±¸ÓÐÁ¬½ÓÔÚ½éÃæ¿¨ÉÏ¡£ËüÃÇ»á±»ÁÐ±íÔÚ {\ttfamily /var/run/stab}
£¬ ¶ø SCSI ¹¹½¨ÊÖ¸å {\ttfamily /etc/pcmcia/scsi} Ò²»á±»Ã¿Ò»¸öÁ¬½ÓÖøµÄ
Éè±¸Ëùºô½ÐÀ´½¨¹¹»ò¹Ø±Õ¸ÃÉè±¸¡£ÄÚ¶¨µÄÊÖ¸å²¢²»»á×öÈÎºÎ½¨¹¹ SCSI Éè±¸
µÄ¶¯×÷£¬µ«Ëü»áÍ×µ±µØÔÚ½éÃæ¿¨±»ÒÆ×ßÊ±Ð¶ÏÂÔÚ SCSI Éè±¸ÉÏµµ°¸ÏµÍ³¡£

ÔÚ 1.2.X ºËÐÄ¡õ£¬PCMCIA Çý¶¯³ÌÊ½ÎÞ·¨×Ô¶¯µØÍÆ²âÄÄ¸öÉè±¸±»°²×°ÔÚÄÄ¸ö
ÌØ¶¨µÄ SCSI ½éÃæ¿¨ÉÏ¡£È»¶ø£¬Èç¹ûÄãÓÐÒ»¸öÕý³£µÄ SCSI Éè±¸Ö®½¨¹¹£¬Äã
¿ÉÒÔ½«ÕâÐ©Éè±¸ÁÐÃ÷ÔÚ {\ttfamily /etc/pcmcia/scsi.opts} ÖÐ¡£ÀýÈç£¬Èç¹û
ÄãÕý³£¶¼ÓÐ¸ö SCSI ´ÅµúÒÔ¼°Ò»¸ö CD-ROM£¬Äã¿ÉÒÔÊ¹ÓÃÒÔÏÂ£º

\begin{tscreen}
\begin{verbatim}
# For 1.2 kernels: list of attached devices
SCSI_DEVICES="sda scd0"
\end{verbatim}
\end{tscreen}


±»´«µ½ {$<$}{\ttfamily scsi.opts} µÄÉè±¸Î»Ö·ÓÐµã¸´ÔÓ£¬ ÄÇÊÇÒòÎªÓÐÐí¶àÖÖÀàµÄ¶«
Î÷¿ÉÒÔ±»Á¬½Óµ½ SCSI ½éÃæ¿¨ÉÏ¡£ÕâÐ©Î»Ö·°üº¬ÁË²»ÊÇ 6 ¸ö¾ÍÊÇ 7 ¸öÒÔ¶º
ºÅÀ´·Ö¿ªµÄÀ¸Î»×ÊÁÏ£º ÏÖÔÚµÄ¼Ü¹¹¡¢Éè±¸ÖÖÀà¡¢²å²ÛºÅÂë¡¢SCSI ÆµµÀ¡¢Ê¶
±ðºÅ¡¢Âß¼­µ¥Î»ºÅÂë£¬ÒÔ¼°Ñ¡ÔñÐÔµÄ·Ö¸îºÅÂë¡£Éè±¸ÖÖ±¸Îª ``sd'' Ö¸´Åµú
¡¢``st'' Ö¸´Å´ø¡¢``sr'' Ö¸ CD-ROM Éè±¸£¬ »¹ÓÐ ``sg'' Ö¸Ò»°ãµÄ SCSI
Éè±¸¡£ ´ó²¿·ÝµÄÉè¶¨ÖÐ£¬SCSI ÆµµÀ»¹ÓÐÂß¼­µ¥Î»ºÅÂë¶¼ÉèÎª 0¡£¶Ôì¶ÓÐÐí
¶à´Åµú·Ö¸îÇøµÄ´ÅµúÉè±¸£¬{\ttfamily scsi.opts} »áÏÈ±»ÒÔ 5 ¸öÀ¸Î»µÄÎ»Ö·Ëùºô
½Ð¡£  ÕâÊÖ¸åÓ¦¸ÃÒªÉèÒ»¸ö  {\ttfamily PARTS}  ±äÊýÀ´ÁÐÃ÷ÕâÐ©·Ö¸î¡£  È»áá£¬
{\ttfamily scsi.opts} »á±»Ã¿Ò»¸ö´ÅÇøÒÔ½Ï³¤µÄ 7 À¸Î»Î»Ö·Ëùºô½ÐÊ¹ÓÃ¡£

Èç¹ûÄãµÄºËÐÄÃ»ÓÐÕë¶ÔÌØ¶¨µÄ SCSI Éè±¸¸øÉÏ²ãÇý¶¯³ÌÊ½ (´Åµú¡¢´Å´øµÈ )
£¬ÄÇ÷áÕâÐ©Éè±¸¾Í²»»á±»¡¡ PCMCIA Çý¶¯³ÌÊ½Ëù½¨¹¹¡£µ«ÓÐ¸ö±ß¼ÊÐ§Ó¦ÊÇ£¬
¸ÃÉè±¸µÄÃû×ÖÔÚ  {\ttfamily /var/run/stab}  ÄÚ»á±äÎªÏñ ``sd\#nnnn''
µÄÃû×Ö¡£Õâ ``nnnn'' ÊÇ¸ö 4 ¸öÊý×ÖµÄÊ®Áù½øÎ»ºÅÂë¡£Ö»Òª {\ttfamily cardmgr}
ÎÞ·¨×ªÒëÒ»¸ö SCSI Éè±¸µÄÊ¶±ðºÅÂëµ½Ïà¶ÔÓ¦µÄ  Linux Éè±¸Ãû×ÖÊ±¶¼»á·¢
ÉúÕâÖÖÊÂ¡£

Òª½«ÉÏ²ãµÄ SCSI Çý¶¯³ÌÊ½Ä£×é»¯³ÉÖ»ÓÐµ±  PCMCIA SCSI ¿¨±»Õì²âµ½Ê±Ëü
ÃÇ²Å»á±»ÔØÈëÊÇÓÐ¿ÉÄÜµÄ¡£ÒªÕâ÷á×ö£¬ÄãÐèÒª±àÐÞ {\ttfamily /etc/pcmcia/config}
À´¸æËß {\ttfamily cardmgr} ÓÐÄÄ¸öÁíÍâµÄÄ£×éÔÚ½éÃæ¿¨±»½¨¹¹Ê±Ò²Òª½«ËüÔØÈë¡£
ÀýÈç£º

\begin{tscreen}
\begin{verbatim}
device "aha152x_cs"
  class "scsi" module "scsi/scsi_mod", "scsi/sd_mod", "aha152x_cs"
\end{verbatim}
\end{tscreen}


»áÔÚÔØÈëÒ»°ãµÄ PCMCIA Çý¶¯³ÌÊ½Ä£×éÇ°½«Ö÷ÒªµÄ SCSI Ä£×éºÍÉÏ²ãµÄ´Åµú
Çý¶¯³ÌÊ½Ä£×é¸øÔØÈë¡£PCMCIA ½¨¹¹ÊÖ¸å²»»á×Ô¶¯µØÕì²â±»Ä£×é»¯ÁËµÄ SCSI
Ä£×é£¬ËùÒÔÄã±ØÐèÊÖ¶¯½¨¹¹Ñ¡ÏîÀ´½« SCSI Ö§Ô®µÄ¹¦ÄÜ´ò¿ª¡£

Ã¿´ÎÔÚ¿ª»úÄúµÄ±Ê¼ÇÐÍµçÄÔÇ°ÏÈ½« SCSI Éè±¸¿ª»ú£¬»òÊÇÔÚ²åÈë¿ØÖÆ¿¨Ç°£¬
ÕâÑù×Ó SCSI »ãÁ÷ÅÅ»áÔÚ¿ØÖÆ¿¨±»½¨¹¹ááÕýÈ·µØ±»ÖÕÖ¹¡£ÁíÍâ»¹Òª×¢Òâ³é³ö
SCSI ¿ØÖÆ¿¨¡£ ¼ÇµÃÒªÈ·ÈÏÔÚ³é³ö¿ØÖÆ¿¨Ç°±»Á¬½ÓÖøµÄ SCSI Éè±¸¶¼±»ÕýÈ·
µØÐ¶ÏÂÓë¹Ø±ÕÁË¡£ ×îºÃµÄÈ·ÈÏ·½·¨ÊÇÔÚÊµÌå³é³ö¿¨Æ¬Ç°Ê¹ÓÃ {\ttfamily cardctl}
»ò {\ttfamily cardinfo} À´ÒªÇó¿¨Æ¬µÄÒÆ³ö¶¯×÷¡£ ¾ÍÕâÑù£¬ËùÓÐµÄ SCSI Éè±¸±Ø
ÐëÔÚ²åÉÏ SCSI ¿ØÖÆ¿¨Ç°ÒÑ¿ªÆôÁËµçÔ´£¬¶øÔÚÄã³é³ö¿ØÖÆ¿¨ºÍ£¯»ò¹Ø»ú±Ê¼Ç
µçÄÔÇ°¶¼ÐëÒª±£³ÖÖøËüÃÇÊÇÁ¬½ÓÖøµÄ¡£

Ê¹ÓÃÒ»°ãµÄ ISA »ãÁ÷ÅÅ½éÃæ¿¨Ê±¿ÉÄÜ»áÓÐÇ±ÔÚµÄ¸´ÔÓÐÔ£¬ ÓÈÆäÊÇÎÞ·¨Æô¶¯
¡£  SCSI »ãÁ÷ÅÅ´îÔØÒ»¸öÎªÁËÊÊµ±µØÊ¹ÓÃ±»¶¯Ê½ SCSI ÖÕ¶ËÆ÷Ëù±ØÐëµÄ ``
ÖÕ¶ËµçÔ´ '' ÐÅºÅ¡£PCMCIA SCSI ¿¨²¢²»¹©Ó¦ÖÕ¶ËµçÔ´£¬ËùÒÔÈç¹ûÐèÒª¸Ãµç
Ô´µÄ»°£¬¾Í±ØÐëÓÉÍâ½ÓµÄÉè±¸À´¹©Ó¦Ëü¡£ÓÐÐ©Íâ½ÓµÄ SCSI Éè±¸¿ÉÒÔ±»½¨¹¹
³É¹©Ó¦Õâ¸öÖÕ¶ËµçÔ´¡£ÆäËûµÄ£¬Èç Zip ´ÅµúÒÔ¼° Syquest EZ-Drive£¬ËüÃÇ
Ê¹ÓÃÖ÷¶¯Ê½ÖÕ¶Ëµç×è¾Í²»ÐèÒªÈç´ËÁË¡£ÓÐÊ±ºò£¬¿ÉÄÜÐèÒªÊ¹ÓÃÒ»¸öÌØ±ðµÄÖÕ
¶Ëµç×èÆ÷Èç APS SCSI Sentry 2£¬ËüÓÐ¸öÍâ½ÓµÄµçÔ´¹©Ó¦¡£ µ±Äú½¨¹¹ SCSI
Éè±¸´®½ÓÊ±£¬Çë×¢ÒâÊÇ·ñÆäÖÐÓÐÈÎºÎµÄÉè±¸ÐèÒª»ò¿ÉÒÔÌá¹©ÖÕ¶Ëµç×èµçÔ´µÄ
¡£

Adaptec APA-460 SlimSCSI ¿¨²¢²»±»Ö§Ô®¡£ÕâÕÅ¿¨Ô­±¾ÊÇÒÔ Trantor µÄÃû
³Æ±»··ÂôµÄ£¬ µ± Adaptec ²¢¹ºÁË Trantor áá£¬ËûÃÇÈÔ¼ÌÐøÒÔ Adaptec µÄ
ÉÌ±êÀ´Âô Trantor µÄ¿¨£¬·´Õý£¬APA-460 ²»±»ÏÖÓÐµÄÈÎºÎÒ» Linux Çý¶¯³Ì
Ê½ËùÏàÈÝ¡£

ÎÒ²»È·¶¨ÒªÐ´¸öÇý¶¯³ÌÊ½»áÓÐ¶àÄÑ£¬ ÎÒ²»ÈÏÎªÓÐÈÎºÎÈË¿ÉÒÔ´Ó Adaptec ÄÇ
¶ùÄÃµ½¼¼Êõ×ÊÑ¶¡£

(Î´±»Ö§Ô®µÄ ) Trantor SlimSCSI ¿ÉÓÃÒÔÏÂ·½·¨±»Ê¶±ð£º

\begin{tscreen}
\begin{verbatim}
Trantor / Adaptec APA-460 SlimSCSI
FCC ID: IE8T460
Shipped with SCSIworks! driver software
\end{verbatim}
\end{tscreen}


(Î´±»Ö§Ô®µÄ) Adaptec SlimSCSI ¿ÉÓÃÒÔÏÂ·½·¨±»Ê¶±ð£º

\begin{tscreen}
\begin{verbatim}
Adaptec APA-1460 SlimSCSI
FCC ID: FGT1460
P/N: 900100
Shipped with EZ-SCSI driver software
\end{verbatim}
\end{tscreen}





\subsubsection{SCSI  Éè±¸µÄ²ÎÊý}

ÒÔÏÂµÄ²ÎÊý¿ÉÒÔ±»¶¨ÒåÔÚ {\ttfamily scsi.opts}ÄÚ£º
\begin{description}
\item[{\ttfamily DO\_FSTAB}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£ºÖ¸¶¨ÊÇ·ñÕâ¸öÉè±¸Ó¦¸ÃÔÚ {\ttfamily /etc/fstab} ÄÚ¼Ó¸ö
ÌõÄ¿¡£

\item[{\ttfamily DO\_FSCK}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£ºÖ¸¶¨ÊÇ·ñµµ°¸ÏµÍ³Ó¦¸ÃÔÚ±»¹ÒÉÏÇ°ÒÔ ``{\ttfamily fsck -Ta}''
À´¼ì²éÒ»ÏÂ¡£

\item[{\ttfamily DO\_MOUNT}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£º Ö¸¶¨ÊÇ·ñÕâ¸öÉè±¸Ó¦¸ÃÔÚ¿¨Æ¬±»²åÈëµÄÍ¬Ê±±»×Ô¶¯µØ±»
¹ÒÉÏ¡£

\item[{\ttfamily FSTYPE}, {\ttfamily OPTS}, {\ttfamily MOUNTPT}] \mbox{}

µµ°¸ÏµÍ³ÐÍÌ¬¡¢ ¹ÒÉÏÑ¡Ïî¡¢ÒÔ¼°±»ÓÃÀ´×öÎª fstab µÄÏîÄ¿¼°£¯»ò¹ÒÉÏ¸ÃÉè
±¸µÄ¹ÒÉÏµã¡£

\end{description}


ÀýÈç£¬ÒÔÏÂÊÇÒ»¸ö½¨¹¹Ò»¸ö SCSI ID Îª 3¡¢ÓÐ 2 ¸ö·Ö¸îÇøµÄ´ÅµúÉè±¸»¹ÓÐ
Ò»¸ö SCSI ID Îª 6 µÄ CD-ROM Ö®ÊÖ¸å£º

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,sd,*,0,3,0)
    # This device has two partitions...
    PARTS="1 2"
    ;;
*,sd,*,0,3,0,1)
    # Options for partition 1:
    #  update /etc/fstab, and mount an ext2 fs on /usr1
    DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
    FSTYPE="ext2"
    OPTS=""
    MOUNTPT="/usr1"
    ;;
*,sd,*,0,3,0,2)
    # Options for partition 2:
    #  update /etc/fstab, and mount an MS-DOS fs on /usr2
    DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
    FSTYPE="msdos"
    OPTS=""
    MOUNTPT="/usr2"
    ;;
*,sr,*,0,6,0)
    # Options for CD-ROM at SCSI ID 6
    PARTS=""
    DO_FSTAB="y" ; DO_FSCK="n" ; DO_MOUNT="y"
    FSTYPE="iso9660"
    OPTS="ro"
    MOUNTPT="/cdrom"
    ;;
esac
\end{verbatim}
\end{tscreen}





\subsubsection{Õï¶ÏSCSI¿¨µÄÎÊÌâ}

\begin{itemize}
\item Ê¹ÓÃ {\ttfamily aha152x\_cs} Çý¶¯³ÌÊ½ (±» Adaptec¡¢ New Media ÒÔ¼°ÓÐÐ©ÅÆ×Ó
ËùÊ¹ÓÃ )£¬ËÆºõÔÚ SCSI ÍÑÀëÁ¬½Ó£¯ÔÙÁ¬½ÓÖ§Ô®Ê±Ê¹ÓÃ´Å´ø»úÊ±³£»áÓÐÎÊÌâ
¡£Òª½«Õâ¸öÎÊÌâ½â³ý£¬ÇëÔÚ {\ttfamily /etc/pcmcia/config.opts} ÖÐ¼ÓÈëÏÂ
ÁÐÕâÐÐ£º
\begin{tscreen}
\begin{verbatim}
module "aha152x_cs" opts "reconnect=0"
\end{verbatim}
\end{tscreen}
\item Èç¹ûÄã½« SCSI Ö§Ô®±àÒë³ÉÄ£×éÁË ({\ttfamily CONFIG\_SCSI} is ``m'')£¬ÔÚ
½¨¹¹  PCMCIA  Ê±£¬ Äã±ØÐëÖ¸¶¨Òª°Ñ½¨Á¢  SCSI  Çý¶¯³ÌÊ½¡£ ÄãÒ²ÒªÐÞ¸Ä
{\ttfamily /etc/pcmcia/config}  ÔÚÊÊºÏµÄ {\ttfamily *\_cs} Çý¶¯³ÌÊ½±»ÔØÈë
Ç°ÔØÈë SCSI Ä£×é¡£
\item Èç¹ûÔÚ  SCSI  »ãÁ÷ÅÅ±»Ì½²âµ½Ê±¿´µ½   ``aborting   command  due  to
timeout'' Ñ¶Ï¢Ê±£¬´ó²¿·ÝÊÇÄãÓÐ¸ö²å¶Ï³åÍ»ÁË¡£
\end{itemize}





\subsection{PCMCIA ¼ÇÒä¿¨}

1tt/memory\_cs/ Çý¶¯³ÌÊ½¸ºÔðËùÓÐÐÍÌ¬µÄÉèÒä¿¨£¬ ²¢ÇÒ»¹Ìá¹©¶Ôì¶ÄÇÐ©ÓÐ
ÆäËû¹¦ÄÜµÄ¿¨µÄ PCMCIA ¼ÇÒäÌåÎ»Ö·¿Õ¼äÖ±½Ó´æÈ¡¹¦ÄÜ¡£µ±±»ÔØÈëÊ±£¬Ëü½¨
Á¢ÁËÒ»¸ö×ÖÔªÓëÇø¿éÉè±¸µÄ×éºÏÌå¡£ Çë¿´ÕâÄ£×éµÄ man Ò³ÖÐÓÐ¸öÍêÕûµÄÉè
±¸È¡Ãû¹æÔòµÄÃèÊö¡£Çø¿éÉè±¸±»ÓÃÀ´×ö´ÅµúÀàÐÍµÄ´æÈ¡ (½¨Á¢ºÍ¹ÒÉÏµµ°¸Ïµ
Í³µÈµÈ )¡£¶ø×ÖÔªÉè±¸±»ÓÃÀ´×ö " Î´¼Ó¹¤ " µÄÎ´±»»º³åÖ®ËæÒâÎ»ÖÃÉÏ¶ÁÓë
Ð´¡£

±»´«ËÍµ½ {\ttfamily memory.opts} µÄÉè±¸Î»Ö·°üº¬ÁË 2 ¸öÀ¸Î»£º ¼Ü¹¹ºÍ²å²ÛºÅ
Âë¡£Õâ¸öÑ¡Ïî±»·ÅÔÚÏà¶ÔÓ¦µÄ¼ÇÒä¿¨ÄÚµÄµÚÒ»¸ö¹²Í¬¼ÇÒä·Ö¸îÇøÖÐ¡£

ÓÐÐ©¾ÉÐÍµÄ¼ÇÒä¿¨£¬ »¹ÓÐ´ó²¿·ÝµÄ¼òµ¥¾²Ì¬ RAM ¿¨£¬¶¼È±ÉÙ `` ¿¨Æ¬×ÊÑ¶
¼Ü¹¹ '' (CIS)£¬e PCMCIA ¿¨ÓÃÀ´±æÊÓËüÃÇ×ÔÒÑµÄÒ»ÖÖ scheme¡£ Ò»°ãÀ´Ëµ
£¬ {\ttfamily cardmgr} »á½«ÈÎºÎÈ±ÉÙ CIS µÄ¿¨Æ¬ÊÓÎªÒ»¸ö¼òµ¥¼ÇÒä¿¨£¬ ²¢ÔØÈë
{\ttfamily memory\_cs} Çý¶¯³ÌÊ½¡£ Òò´Ë£¬ÓÐ¸ö±ß¼ÊÐ§Ó¦ÊÇ£¬Ò»°ãµÄÊ¶±ðÎÊÌâÊÇÆä
ËûÐÍÊ½µÄ¿¨Æ¬¿ÉÄÜ»á´íÎóµØ±»Õì²âÎª¼ÇÒä¿¨ÁË¡£

{\ttfamily memory\_cs}   Çý¶¯³ÌÊ½Ê¹ÓÃÁË  heuristic  À´²Â²âÕâÐ©¿¨Æ¬µÄÈÝÁ¿¡£
heuristic   ÔÚÐ´Èë±£»¤µÄ¿¨Æ¬ÉÏ²¢ÎÞ·¨¹¤×÷£¬  ÓÐÊ±»¹ÓÐ¿ÉÄÜ»á³ö´íÎó¡£
Èç¹û¿¨Æ¬±»ÎóÅÐÁË£¬µ±ÄãÔÚÊ¹ÓÃÏñ {\ttfamily dd} »ò {\ttfamily mkfs} ÕâÑùµÄÃüÁîÊ±£¬
ËüµÄÈÝÁ¿Ó¦ÒªÃ÷È·µØ±»Ö¸¶¨¡£




\subsubsection{¼ÇÒäÉè±¸²ÎÊý}



ÏÂÁÐ²ÎÊý¿ÉÒÔ·ÅÔÚ {\ttfamily memory.opts}ÄÚ£º

\begin{description}
\item[{\ttfamily DO\_FSTAB}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£ºÖ¸¶¨ÊÇ·ñÕâ¸öÉè±¸Ó¦¸ÃÔÚ {\ttfamily /etc/fstab} ÄÚ¼Ó¸ö
ÌõÄ¿¡£

\item[{\ttfamily DO\_FSCK}] \mbox{}

²¼ÁÖ  (y/n)  Éè¶¨£º  Ö¸¶¨ÊÇ·ñµµ°¸ÏµÍ³Ó¦¸ÃÔÚ±»¹ÒÉÏÇ°ÒÔ   ``{\ttfamily fsck
-Ta}'' À´¼ì²éÒ»ÏÂ¡£

\item[{\ttfamily DO\_MOUNT}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£º Ö¸¶¨ÊÇ·ñÕâ¸öÉè±¸Ó¦¸ÃÔÚ¿¨Æ¬±»²åÈëµÄÍ¬Ê±±»×Ô¶¯µØ±»
¹ÒÉÏ¡£

\item[{\ttfamily FSTYPE}, {\ttfamily OPTS}, {\ttfamily MOUNTPT}] \mbox{}

µµ°¸ÏµÍ³ÐÍÌ¬¡¢ ¹ÒÉÏÑ¡Ïî¡¢ÒÔ¼°±»ÓÃÀ´×öÎª fstab µÄÏîÄ¿¼°£¯»ò¹ÒÉÏ¸ÃÉè
±¸µÄ¹ÒÉÏµã¡£

\end{description}


ÒÔÏÂ¡õÀý»áÕë¶Ô²åÉÏÈÎÒ»²å²ÛµÄ¼ÇÒä¿¨×ö×Ô¶¯¹ÒÉÏ¶¯×÷µÄÊÖ¸å£º

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,0,0)
    # Mount filesystem, but don't update /etc/fstab
    DO_FSTAB="n" ; DO_FSCK="y" ; DO_MOUNT="y"
    FSTYPE="ext2" ; OPTS=""
    MOUNTPT="/mem0"
    ;;
*,1,0)
    # Mount filesystem, but don't update /etc/fstab
    DO_FSTAB="n" ; DO_FSCK="y" ; DO_MOUNT="y"
    FSTYPE="ext2" ; OPTS=""
    MOUNTPT="/mem1"
    ;;
esac
\end{verbatim}
\end{tscreen}





\subsubsection{Ê¹ÓÃ¿ìÉÁ¼ÇÒä¿¨}

´«µ½ {\ttfamily ftl.opts} ÄÚµÄÉè±¸Î»Ö·ÓÐ 3 »ò 4 ¸öÀ¸Î»£º the scheme¡¢²å²Û
ºÅÂë¡¢ÇøºÅÂëÒÔ¼°ÁíÍâµÄÑ¡Ïî£¬·Ö¸îºÅÂë¡£´ó²¿·ÝµÄ¿ìÉÁ¿¨Ö»ÓÐÒ»¸ö¿ìÉÁ¼Ç
ÒäÌåÇø£¬ËùÒÔ´ó²¿·ÝµÄÇøºÅÂë¶¼ÊÇ 0 µÄ¡£

Òª½«¿ìÉÁ¼ÇÒä¿¨µ±³ÉÒ»°ãµÄ´ÅµúÀ´Ê¹ÓÃ£¬ Ê×ÏÈÒª½¨Á¢ \idx{FTL}£¬»ò
``\idx{ ¿ìÉÁ×ªÒë²ã¼¶ (flash translation layer)}''£¬ËüÊÇÒ»¸öÊ¹
ÓÃ {\ttfamily ftl\_format} ÃüÁîÔÚÉè±¸ÉÏ×ö³ÉµÄÒ»¸ö·Ö¸î¡£ Õâ²ã×ÊÁÏÒþ²ØÁË¿ìÉÁ
¼ÇÒäÌå³ÌÊ½µÄÉè±¸Ö¸¶¨Ï¸½Ú£¬²¢ÈÃ¿¨Æ¬¿´ÆðÀ´¾ÍÏñÊÇ¸ö¼òµ¥µÄÇø¿éÉè±¸¡£Àý
Èç£º

\begin{tscreen}
\begin{verbatim}
ftl_format -i /dev/mem0c0c
\end{verbatim}
\end{tscreen}


¼ÇµÃÕâ¸öÃüÁîÊÇ¾­ÓÉ `` Î´¼Ó¹¤µÄ '' ¼ÇÒäÌå¿¨Æ¬½éÃæÀ´´æÈ¡¿¨Æ¬µÄ¡£Ò»¾­
¸ñÊ½»¯áá£¬ Õâ¸ö¿¨¾Í¿ÉÒÔ¾­ÓÉ {\ttfamily ftl\_cs} Çý¶¯³ÌÊ½½«Ëüµ±³ÉÒ»°ãµÄÇø¿é
Éè±¸ÄÇÑùµØ×ö´æÈ¡ÁË¡£ÀýÈç£º

\begin{tscreen}
\begin{verbatim}
mke2fs /dev/ftl0c0
mount -t ext2 /dev/ftl0c0 /mnt
\end{verbatim}
\end{tscreen}


±»ÃüÃû³É FTL ÀàµÄÉè±¸¶¼ÓÐµã¹Ö¹ÖµÄ¡£Minor device numbers ÓÐÈý¸ö²¿·Ý
: ¿¨Æ¬ºÅÂë¡¢¿¨Æ¬ÄÚµÄÇøÓòºÅÂëÒÔ¼°Ñ¡Ïî£­ÔÚÇøÓòºÅÂëÄÚµÄ·Ö¸î¡£Õâ¶ùµÄÇø
Óò¿ÉÒÔ±»¿´³ÉÎªÃ»ÓÐ·Ö¸î±í¸ñµÄµ¥Ò»Çø¿éÉè±¸  (¾ÍÏñÈíÌåÆ¬Ò»Ñù ) »òÕßËü
Ò²¿ÉÒÔ±»·Ö¸î£¬¾ÍÏñÊÇ¸öÓ²µúÉè±¸Ò»Ñù¡£ ``ftl0c0'' Éè±¸ÊÇ¿¨Æ¬ 0£¬¹²Í¬
¼ÇÒäÌåÇøÓòÎª   0£¬  Õû¸öÇøÓò¡£   Èç¹ûÕâ¸öÇøÓòÒÑ±»·Ö¸îÁË£¬   ÄÇ÷á´Ó
``ftl0c0p1'' µ½ ``ftl0c0p4'' µÄÉè±¸ÊÇÖ÷·Ö¶îÇø 1 µ½ 4 ÁË¡£

¿ìÉÁ¼ÇÒäÌå¿¨Æ¬ÓÐÁ½ÖÖÖ÷ÒªµÄ¸ñÊ½:   FTL    ÐÍÊ½£¬   ÒÔ¼°   Microsoft
µÄ¿ìÉÁµµ°¸ÏµÍ³ \idx{ Flash File System}¡£FTL ¸ñÊ½ÊÇ×îÓÐµ¯ÐÔµÄ
£¬ÒòÎªËüÔÊÐíÒ»°ãµÄÈÎºÎ¸ß½×µµ°¸ÏµÍ³ (ext2¡¢ms-dos µÈµÈ ) ¶¼¿ÉÊÓÎªÒ»
°ã´ÅµúÉè±¸°ãµØÀ´Ê¹ÓÃ¡£FFS ÔòÍêÈ«ÊÇ¸ö²»Í¬µÄµµ°¸ÏµÍ³ÀàÐÍÁË¡£Linux Ä¿
Ç°ÎÞ·¨´¦ÀíÓÃ FFS ¸ñÊ½»¯µÄ¿¨Æ¬¡£




\subsection{PCMCIA ATA/IDE ¿¨Ê½Ó²µú»ú}

¶Ô ATA/IDE  ´Åµú»úµÄÖ§Ô®ÐèÒª  1.3.72 »ò¸üÐÂµÄºËÐÄ°æ±¾¡£ Çý¶¯³ÌÊ½ÄÚ
Ö¸¶¨ PCMCIA µÄ²¿·ÝÊÇ {\ttfamily fixed\_cs}¡£ Çë¼ÇµÃÔÚ³é³ö ATA/IDE ¿¨Ç°ÇëÊ¹
ÓÃ {\ttfamily cardctl} »ò {\ttfamily cardinfo} ³ÌÊ½°ÑËüÏÈ¹Ø±Õ£¬ ÒòÎªÕâ¸öÇý¶¯³ÌÊ½
²¢Ã»ÓÐ±»Éè¼Æ³É¿É ``·ÀÖ¹ÈÈÖÃ»»µÄ''¡£

´«ËÍµ½   {\ttfamily fixed.opts}    ÄÚµÄÉè±¸Î»ÖÃ°üº¬Èý»òËÄ¸öÀ¸Î»:   Ä¿Ç°µÄ
scheme¡¢²å²ÛºÅÂë¡¢´ÅµúµÄÐòºÅÒÔ¼°Ñ¡ÏîµÄ·Ö¸îºÅÂë¡£{\ttfamily ide\_info} ¿ÉÒÔ
±»ÓÃÀ´»ñµÃ IDE ´ÅµúµÄÐòºÅ¡£ Ê¹ÓÃ SCSI Éè±¸Ê±£¬{\ttfamily fixed.opts} »áÔÚ
µÚÒ»´Î±»ºô½Ð¸øÕû¸öÉè±¸×öÉè¶¨¡£ Èç¹û  {\ttfamily fixed.opts}  »ØÓ¦ÁËÒ»¸öÔÚ
{\ttfamily PARTS} ±äÊýÄÚµÄÒ»´®·Ö¸î×ÊÑ¶£¬ ÃüÁîÊÖ¸å½ÓÖø¾Í»áÎªÃ¿Ò»¸ö·Ö¸î×öÉè
¶¨¡£




\subsubsection{ATA/IDE ¹Ì¶¨´ÅµúÉè±¸²ÎÊý}



ÒÔÏÂµÄ²ÎÊý¿ÉÒÔ±»¶¨ÒåÔÚ {\ttfamily fixed.opts}ÄÚ£º

\begin{description}
\item[{\ttfamily DO\_FSTAB}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£ºÖ¸¶¨ÊÇ·ñÕâ¸öÉè±¸Ó¦¸ÃÔÚ {\ttfamily /etc/fstab} ÄÚ¼Ó¸ö
ÌõÄ¿¡£

\item[{\ttfamily DO\_FSCK}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£ºÖ¸¶¨ÊÇ·ñµµ°¸ÏµÍ³Ó¦¸ÃÔÚ±»¹ÒÉÏÇ°ÒÔ ``{\ttfamily fsck -Ta}''
À´¼ì²éÒ»ÏÂ¡£

\item[{\ttfamily DO\_MOUNT}] \mbox{}

²¼ÁÖ (y/n) Éè¶¨£º Ö¸¶¨ÊÇ·ñÕâ¸öÉè±¸Ó¦¸ÃÔÚ¿¨Æ¬±»²åÈëµÄÍ¬Ê±±»×Ô¶¯µØ±»
¹ÒÉÏ¡£

\item[{\ttfamily FSTYPE}, {\ttfamily OPTS}, {\ttfamily MOUNTPT}] \mbox{}

µµ°¸ÏµÍ³ÐÍÌ¬¡¢ ¹ÒÉÏÑ¡Ïî¡¢ÒÔ¼°±»ÓÃÀ´×öÎª fstab µÄÏîÄ¿¼°£¯»ò¹ÒÉÏ¸ÃÉè
±¸µÄ¹ÒÉÏµã¡£

\end{description}


ÒÔÏÂÊÇ¸ö {\ttfamily fixed.opts} µµ°¸µÄÀý×ÓÓÃÀ´¹ÒÉÏÈÎÒ»¸ö ATA/IDE ¿¨µÄµÚÒ»
¸ö·Ö¸îµ½ {\ttfamily /mnt} Ä¿Â¼ÉÏ¡£

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
*,*,*)
    PARTS="1"
    ;;
*,*,*,1)
    DO_FSTAB="y" ; DO_FSCK="y" ; DO_MOUNT="y"
    FSTYPE="msdos"
    OPTS=""
    MOUNTPT="/mnt"
    ;;
esac
\end{verbatim}
\end{tscreen}





\subsubsection{Õï¶Ï ATA/IDE ¿¨µÄÎÊÌâ}

\begin{itemize}
\item ÓÐÐ© IDE ´ÅµúÔÊÐí PCMCIA  µÄ¹æ¸ñÊ¹ÓÃ±È×î´ó¿ÉÔÊÐí¿¨Æ¬Éè¶¨ÆðÀ´µÄÊ±¼ä
¸ü³¤µÄÊ±¼äÀ´Æð¶¯¡£ÒªÊ¹ÓÃÕâÐ©¿¨Æ¬£¬ÇëÔØÈë {\ttfamily pcmcia\_core} Ä£×éÅäºÏ
ÏÂÃæµÄÉè¶¨:
\begin{tscreen}
\begin{verbatim}
CORE_OPTS="unreset_delay=400"
\end{verbatim}
\end{tscreen}
\item ÒªÊ¹ÔÂ ATA/IDE CD-ROM Éè±¸£¬ÄãµÄºËÐÄ±ØÐë½« {\ttfamily CONFIG\_BLK\_DEV\_IDECD}
¹¦ÄÜ´ò¿ªÇÒ±àÒë½øÈ¥¡£Í¨³£±ê×¼µÄºËÐÄ¶¼ÒÑÖ§Ô®ÁË£¬È»¶øÈç¹ûÄãÏë±àÒë¸ö×Ô
¶¨µÄºËÐÄÇë¼ÇµÃÒª½÷É÷Ð©¡£
\end{itemize}





\subsection{¶à¹¦ÄÜ¿¨}

´Ó 1.3.73 Linux ºËÐÄ¿ªÊ¼£¬¼¸¸öÇý¶¯³ÌÊ½¿ÉÒÔ¹²ÓÃµ¥Ò»¸ö²å¶Ï£¬Ïñ´®ÁÐ²º
Çý¶¯³ÌÊ½ÓëÒ»¸öÒÒÌ«ÍøÂ·Çý¶¯³ÌÊ½¡£ÔÚÐÂµÄºËÐÄÏÂÊ¹ÓÃ¶à¹¦ÄÜ¿¨Æ¬Ê±£¬ËùÓÐ
µÄ¿¨Æ¬¿ÉÒÔ²»ÓÃÔÚÔØÈë»òÓùÏÂÇý¶¯³ÌÊ½µÄ×´¿öÏÂÊ¹ÓÃ¿¨Æ¬µÄËùÓÐ¹¦ÄÜ¡£

ºÜ¶àµÄÓ²Ìå³§ÉÌ×ÔÒÑ×öÁË²»Ì«ÄÜ»¥ÏàÏàÈÝµÄ  (ÓÐÐ©¿ÉËµÊÇ¶ÀÁ¢µÄ ) ²å¶Ï¹²
Ïí·½·¨À´Ä£ÄâÊ¹ÓÃ¶þ¸ö¿¨µÄ¹¦ÄÜ¡£ÓÐÐ©¿¨Æ¬ (Diamonds µÄ Ositech Jack¡¢
¡¢3Com µÄ 3c562¡¢Linksys) µÄÇý¶¯³ÌÊ½¿ÉÒÔÕýÈ·µØÖ§Ô®ÕâÑùµÄÄ£Äâ´æÈ¡£¬
µ«ÊÇÓÐÐ©¿¨ (ÌØ±ðÊÇ Megahertz) Ôò²»ÄÜ¡£

ÔçÆÚµÄºËÐÄ²¢²»Ö§Ô®²å¶Ï·ÖÏí¸ø²»Í¬µÄÉè±¸Çý¶¯³ÌÊ½¡£ËùÒª PCMCIA Çý¶¯³Ì
Ê½²»¿ÉÄÜ½¨¹¹´Ë¿¨Æ¬ÈÃËü¿ÉÄ£ÄâÒÒÌ«ÍøÂ·¿¨ÓëÊý¾Ý¿¨µÄ´æÈ¡¡£ÒÒÌ«ÍøÂ·¿¨Óë
´®ÁÐ²ºÇý¶¯³ÌÊ½»á±»×Ô¶¯µØÔØÈë¡£È»¶ø£¬ÄÚ¶¨ÉÏÊÇÒÒÌ«ÍøÂ·Çý¶¯³ÌÊ½ `` Óµ
ÓÐ '' ÕâÕÅ¿¨Æ¬µÄ²å¶Ï¡£ÒªÊ¹ÓÃÊý¾Ý»ú£¬Äã¿ÉÒÔÐ¶ÏÂÒÒÌ«ÍøÂ·Çý¶¯³ÌÊ½£¬È»
ááÊ¹ÓÃÒÔÁÐ·½·¨ÖØÐÂ½¨¹¹´®ÁÐ²º:

\begin{tscreen}
\begin{verbatim}
ifconfig eth0 down
rmmod 3c589_cs
setserial /dev/modem autoconfig auto_irq
setserial /dev/modem
\end{verbatim}
\end{tscreen}


µÚ¶þ¸ö {\ttfamily setserial} »á²éÖ¤³ö¸Ã²ºÔÚÏÈÇ°ÊÇÓÉÒÒÌ«ÍøÂ·Çý¶¯³ÌÊ½ËùÊ¹ÓÃ
µÄ²å¶Ï¡£




\section{½ø½×µÄÖ÷Ìâ}






\subsection{PCMCIA Éè±¸µÄ×ÊÔ´·ÖÅä}

ÀíÂÛÉÏ£¬ ÄÄÒ»¸ö²å¶Ï±»Ê¹ÓÃµ½ÄÄ¸öÉè±¸ÉÏ¶¼Ã»¹ØÏµ¡£ Ö»ÒªÁ½¸ö (»òÒÔÉÏ )
Éè±¸²»±»½¨¹¹³ÉÊ¹ÓÃÏàÍ¬µÄ²å¶Ï¼´¿É¡£ÔÚ {\ttfamily /etc/pcmcia/config.opts}
¡õÄã¿ÉÒÔ·¢ÏÖÓÐ¸öµØ·½ÓÃÀ´ÅÅ³ýÄÇÐ©±»·Ç PCMCIA Éè±¸ËùÊ¹ÓÃÖøµÄ²å¶Ï¡£

Í¬ÑùµØ£¬Ò²Ã»ÓÐ°ì·¨¿ÉÒÔÖ±½ÓÖ¸¶¨ I/O Î»Ö·¸øÒ»¸ö PCMCIA ¿¨À´Ê¹ÓÃ¡£
{\ttfamily /etc/pcmcia/config.opts}  µµ°¸ÔÊÐíÄãÖ¸¶¨¿É±»ËùÓÐµÄ  PCMCIA
Éè±¸ËùÊ¹ÓÃµÄ²º¡õÎ§£¬ »òÊÇÅÅ³ýÄÇÐ©»áºÍÆäËûÉè±¸Ïà³åÍ»µÄ²º¡õÎ§¡£

ÔÚÐÞ¸ÄÁË  {\ttfamily /etc/pcmcia/config.opts}áá£¬Äã¿ÉÒÔÊ¹ÓÃ ``{\ttfamily kill -HUP}''
À´ÖØÐÂÆô¶¯ {\ttfamily cardmgr}¡£

±»ÓÃÀ´¼àÊÓ¿¨Æ¬×´Ì¬µÄ²å¶ÏÊÇÔÚ {\ttfamily cardmgr} ´¦Àí {\ttfamily /etc/pcmcia/config}
µµ°¸Ö®Ç°ÓÉµÍ½×µÄ²å²ÛÇý¶¯³ÌÊ½Ä£×é ({\ttfamily i82365} »ò {\ttfamily tcic}) ËùÑ¡Ôñ
µÄ¡£Òò´Ë¸Ä±äÕâ¸öµµ°¸²¢²»»áÓÐÊ²÷áÓ°Ïì¡£ÒªÉè¶¨Õâ¸ö²å¶Ï£¬ÔÚ²å²ÛÇý¶¯³Ì
Ê½±»ÔØÈëÊ±£¬Éè¶¨ÔÚ {\ttfamily /etc/rc.d/rc.pcmcia} ÄÚµÄ {\ttfamily PCIC\_OPTS}
±äÊýÊ¹ÓÃ {\ttfamily cs\_irq=} Ñ¡Ïî¡£

ËùÓÐµÄ¿Í»§¶Ë¿¨Æ¬Çý¶¯³ÌÊ½¶¼ÓÐ¸ö½Ð×ö {\ttfamily irq\_list} µÄ²ÎÊý¡£ ±»ÓÃÀ´Ö¸
¶¨ÄÄÐ©²å¶Ï¿ÉÓÃÊÔÖøÓÃÀ´ÅäÖÃ¸øËûÃÇµÄ¡£ÕâÐ©Çý¶¯³ÌÊ½Ñ¡ÏîÓ¦¸Ã±»Éè¶¨ÔÚÄã
µÄ {\ttfamily /etc/pcmcia/config} µµ°¸¡õ¡£ÀýÈç:

\begin{tscreen}
\begin{verbatim}
device "serial_cs"
  module "serial_cs" opts "irq_list=8,12"
  ...
\end{verbatim}
\end{tscreen}


»áÖ¸¶¨´®ÁÐ²ºÇý¶¯³ÌÊ½Ö»Ê¹ÓÃ  irq  8 »ò irq  12¡£ ²»¹Ü {\ttfamily irq\_list}
µÄÉè¶¨ÈçºÎ£¬ ¿¨Æ¬·þÎñ³ÌÊ½ Card Services ¾ø²»»á·ÖÅäÒÑ±»ÆäËûÉè±¸ËùÊ¹
ÓÃÁËµÄ²å¶Ï£¬»òÊÇÔÚ½¨¹¹µµ¡õ±»ÅÅ³ýµÄ²å¶Ï¡£




\subsection{ÎÒÔõÑù²ÅÄÜÎª¼ÒÍ¥¼°¹¤×÷µÄÊ¹ÓÃ×ö¸÷±ðµÄÉè±¸Éè¶¨ÄØ?}

ÎÒÃÇ¿ÉÒÔºÜ¼òµ¥µØÊ¹ÓÃ PCMCIA ``scheme'' Ö§Ô®À´´ï³É¡£ Ê¹ÓÃÁ½ÖÖ²»Í¬µÄ
½¨¹¹ schemes£¬·Ö±ð½Ð ``home'' ¼° ``work''¡£ ÒÔÏÂÊÇ¸öÓÐ scheme Ö¸¶¨
µÄÉè¶¨µÄ {\ttfamily network.opts} ÊÖ¸å¡õÀý:

\begin{tscreen}
\begin{verbatim}
case "$ADDRESS" in
work,*,*,*)
    # definitions for network card in work scheme
    ...
    ;;
home,*,*,*|default,*,*,*)
    # definitions for network card in home scheme
    ...
    ;;
esac
\end{verbatim}
\end{tscreen}


PCMCIA  Éè±¸Î»Ö·µÄÊ×Òª²¿·Ý¶¼ÊÇ½¨¹¹  scheme¡£ ÔÚÕâ¸öÀý×ÓÖÐ£¬ µÚ¶þ¸ö
``case'' ¾ä×Ó»á´Ó ``homee'' ºÍ ``default'' schemes ÖÐÌôÑ¡Ò»¸ö¡£ Òò
´Ë£¬²»¹ÜÈÎºÎÀíÓÉ scheme ²¢Ã»±»Éè¶¨ÁË£¬ÄÚ¶¨ÖµÊÇ ``home'' Éè¶¨¡£

ÏÖÔÚ£¬ÒªÔÚ¶þ¸öÉè¶¨¼¯¡õÍ·ÌôÑ¡Ò»¸ö£¬¿ÉÖ´ÐÐ:

\begin{tscreen}
\begin{verbatim}
cardctl scheme home
\end{verbatim}
\end{tscreen}


»òÕßÊÇ

\begin{tscreen}
\begin{verbatim}
cardctl scheme work
\end{verbatim}
\end{tscreen}


{\ttfamily cardctl}  ÃüÁîÏàµ±ì¶¹ØµôËùÓÐµÄ¿¨Æ¬ááÔÙÖØÆô¶¯ËüÃÇ¡£ ²»¹Ü PCMCIA
ÏµÍ³ÊÇ·ñ±»ÔØÈë£¬Õâ¸öÃüÁî¶¼¿É°²È«µØ±»Ö´ÐÐ¡£µ«ÊÇÈç¹ûÄãÔÚµ±Ê±ÕýÔÚÊ¹ÓÃ
ÆäËûµÄ PCMCIA Éè±¸Ê±Õâ¸öÃüÁî¿ÉÄÜ»áÊ§°Ü¡£ (ËäÈ»ËûÃÇµÄ½¨¹¹²¢²»ÍêÈ«ÒÀ
¿¿ scheme µÄÉè¶¨¡£ )¡£

ÒªÖªµÀÄ¿Ç° PCMCIA scheme µÄÉè¶¨£¬Ö´ÐÐ:

\begin{tscreen}
\begin{verbatim}
cardctl scheme
\end{verbatim}
\end{tscreen}





\subsection{´Ó PCMCIA Éè±¸¿ª»ú}



ÒªÔÚÒ»¸ö PCMCIA  Éè±¸ÉÏ×ö¸öµµ°¸ÏµÍ³ÐèÒªË£¸öÐ¡°ÑÏ·¿ÉÐÐ£¬ ÒòÎª Linux
µÄ PCMCIA ÏµÍ³²¢Ã»ÓÐÉè¼Æ³ÉÁ¬½Óµ½ºËÐÄ³ÌÊ½ÉÏ¡£ËüµÄÖ÷ÒªÔª¼þ£¬¿ÉÔØÈëÊ½
ºËÐÄÄ£×éÒÔ¼°Ê¹ÓÃÕßÄ£Ê½µÄ  cardmgr ¾«ÁéÊÇÑöÀµÔÚÒ»¸öÒÑ¾­ÔÚÖ´ÐÐµÄÏµÍ³
ÉÏ¡£ºËÐÄµÄ ``\idx{initrd}'' ÒÔÔÊÐí Linux Ê¹ÓÃÒ»¸öÓÐ×îÐ¡»¯µÄ¸ù
Ó³Ïñµµ¡¢ÔØÈëÇý¶¯³ÌÊ½µÄÔÝÊ±ÐÔµÄ¶¯Ì¬¼ÇÒäÌå´ÅµúÀ´¿ª»ú£¬È»ááÔÙÖØÐÂ¹ÒÉÏ
Ò»¸ö²»Í¬µÄ¸ùµµ°¸ÏµÍ³¡£Õâ¸öÔÝÊ±µÄ¸ùÏµÍ³¿ÉÒÔ½¨¹¹ PCMCIA Éè±¸£¬È»ááÔÙ
°ÑËüÖØÐÂ¹Ò³ÉÒ»¸ö¸ùÏµÍ³¡£

initrd  Ó³Ïñµµ¾ø¶Ô±ØÐë´æ·ÅÔÚÒ»¸ö¿É¿ª»úµÄÉè±¸ÉÏ: Ò»°ãÀ´ËµÕâ¾ÍÎÞ·¨·Å
µ½ PCMCIA Éè±¸ÉÏÁË¡£ÕâÊÇÒòÎª BIOS µÄÏÞÖÆ£¬¿É²»ÊÇºËÐÄµÄÏÞÖÆ¡£ÔÚÕâ¡õ
£¬ ÄÜ¹»·Ö±æ³ö `` ¿É¿ª»úµÄ (boot-able)'' Éè±¸ (ÀýÈç£¬ÈÎºÎ¿ÉÒÔ×ö¿ª»ú
Ê¹ÓÃµÄÉè±¸ ) Óë `` ¿É×ö¸ùÏµÍ³µÄ (root-able)'' Éè±¸ (ÀýÈç£¬¿ÉÒÔ±»¹Ò
Èë³ÉÎª¸ùÏµÍ³µÄÉè±¸    )    µÄ²»Í¬´¦Ò²ÊÇºÜÖØÒªµÄ¡£   ``    ¿É¿ª»úµÄ
(Boot-able) '' Éè±¸ÊÇÓÉ BIOS Ëù¾ö¶¨µÄ£¬ Í¨³£ÊÇÄÚ²¿Èíµú»úºÍÓ²Ê½´Åµú
»ú¡£`` ¿É×ö¸ùÏµÍ³µÄ (root-able)'' Éè±¸ÊÇÈÎºÎ¿ÉÒÔÔÚ±»ÔØÈë¼´¼´±»ºËÐÄ
ËùÖ§Ô®µÄÇø¿éÉè±¸¡£ initrd µÄ¹¦ÄÜ¿ÉÊ¹¸ü¶àµÄÉè±¸±ä³É `` ¿É×ö¸ùÏµÍ³µÄ
(root-able)''£¬¶ø·Ç ``¿É¿ª»úµÄ (boot-able)''¡£

ÓÐÐ© Linux ¹©Ó¦°æ±¾ÔÊÐí°²×°µ½ PCMCIA SCSI ¿¨½ÓÖøµÄÉè±¸ÉÏ¡£Ê¹µÃËüÃÇ
ÎÞÒâµØ¶à³öÁË¿ÉÖ§Ô®´Ó  PCMCIA  SCSI  CD-ROM  Éè±¸À´°²×°µÄ±ß¼ÊÐ§Ó¦¡£
È»¶ø£¬  µ½Ä¿Ç°ÎªÖ¹£¬ ²¢Ã»ÓÐÈÎºÎ  Linux  °²×°¹¤¾ßÖ§Ô®½¨¹¹Ò»¸ö¿ÉÒÔ´Ó
PCMCIA  ¸ùµµ°¸ÏµÍ³ÉÏ¿ª»úµ½  Linux  µÄºÏÊÊ  ``initrd''¡£ ÉèÁ¢Ò»¸öÒÔ
PCMCIA  ¸ùµµ°¸µÄ Linux ÏµÍ³ÐèÒªÄúÊ¹ÓÃÆäËûµÄ  Linux  ÏµÍ³À´²úÉúÒ»¸ö
``initrd'' Ó³Ïñµµ°¸¡£Èç¹ûÃ»ÓÐ¿ÉÓÃµÄÆäËû Linux ÏµÍ³£¬ÁíÒ»¸öÌæ´ú·½·¨
ÊÇ×ö×îÐ¡°²×°µ½·Ç PCMCIA ´ÅµúÉÏ£¬½¨Á¢Ò»¸ö initrd Ó³Ïñµµ£¬È»ááÔÙÖØÐÂ
°²×°µ½ PCMCIA Ä¿µØÉè±¸ÉÏ¡£

ÔÚ Linux Bootdisk-HOWTO ¡õÓÐÒ»Ð©¹Øì¶Éè¶¨¿ª»ú´ÅµúÆ¬µÄÒ»°ã×ÊÑ¶£¬µ«È´
Ã»ÓÐÈÎºÎÓÐ¹Øì¶ initrd µÄ×ÊÑ¶¡£ initrd µÄÖ÷ÒªÎÄ¼þ±»·ÅÔÚ×îÐÂµÄºËÐÄ³Ì
Ê½Âë¹©Ó¦°æ±¾¡õÍ·£¬  ÔÚ   {\ttfamily linux/Documentation/initrd.txt}¡£
ÔÚ¿ªÊ¼Ç°£¬ÄãÓ¦¸ÃÒªÏÈ¶ÁÒ»ÏÂÕâ·ÝÎÄ¼þ¡£ ¶Ôì¶ {\ttfamily lilo} µÄÊìÏ¤Ò²ÊÇÓÐÖú
ÒæµÄ¡£ ÒªÊ¹ÓÃ initrd Ò²ÐèÒªÄãÒÑÓÐ¸ö½«  {\ttfamily CONFIG\_BLK\_DEV\_RAM}  ºÍ
{\ttfamily CONFIG\_BLK\_DEV\_INITRD} ¹¦ÄÜ´ò¿ªááËù±àÒë³öÀ´µÄºËÐÄ¡£

ÕâÊÇ¸ö¸ßµÈ½¨¹¹¼¼Êõ£¬ ÐèÒªÄú¶Ô Linux ÒÔ¼° PCMCIA ÏµÍ³ÓÐÒ»¶¨³Ì¶ÈµÄÊì
Ï¤¶È¡£ÇëÈ·ÈÏÔÚÄúÔÄ¶ÁÍêËùÓÐÏà¹ØµÄÎÄ¼þááÔÙ¿ªÊ¼¡£ÏÂÃæµÄ `` Ê³Æ× '' Ó¦
¸ÃÊÇ¿ÉÐÐµÄ£¬ µ«ÊÇÒ»µ©²»ÒÀÕÕ¡õÀýÀ´×öµÄ»°£¬ ¾Í»áºÜ¿ìµØ½«ÄãÍÆÏòÎ´Öª¼°
`` ²»±»Ö§Ô®µÄ '' µØ·½£¬ÄÇÄã¾ÍµÃ×Ô¼ºÀ´µÄ¡£

Õâ·½·¨ÐèÒªÄãÒ»¶¨ÒªÊ¹ÓÃ PCMCIA Çý¶¯³ÌÊ½ 2.9.5 »ò×îÐÂµÄ°æ±¾²Å¿ÉÒÔ¡£
¾ÉµÄ PCMCIA Ì×¼þ»òÊÇ¸ö±ðµÄÔª¼þ²¢²»ÄÜÔÚ initrd ¡õÊ¹ÓÃ¡£Çë²»Òª½«²»Í¬
µÄ°æ±¾µÄÔª¼þ»ìºÏÁË¡£




\subsubsection{pcinitrd ¸¨ÖúÔ±ÊÖ¸å}

{\ttfamily pcinitrd}  ÊÖ¸åÓÃÀ´½¨Á¢Ò»¸öÊ¹ÓÃ  PCMCIA ¸ù´ÅÇø·Ö¸îÀ´Æô¶¯ Linux
µÄ»ù±¾   initrd    Ó³Ïñµµ¡£   ¸ÃÓ³Ïñµµ¡õ°üº¬Ò»¸ö×îÐ¡µÄÄ¿Â¼²ã¼¶½á¹¹
¡¢ ÒÔ¼°ÓÐÓÃµÄÉè±¸µµ°¸¡¢Ò»Ð©¶þ½øÎ»µµ°¸¡¢¹²ÓÃ³ÌÊ½¿âµµÒÔ¼°Ò»Ì× PCMCIA
Çý¶¯³ÌÊ½Ä£×é¡£ µ±ÄãÖ´ÐÐ {\ttfamily pcinitrd} Ê±£¬ÒªÖ¸¶¨ÒªÒª°üº¬½øÈ¥Ó³Ïñµµ
¡õÃæµÄÇý¶¯³ÌÊ½Ä£×éÃû³Æ¡£ ¶øÖ÷Òª PCMCIA  ºËÐÄÔª¼þ  {\ttfamily pcmcia\_core}
¼° {\ttfamily ds}»á±»×Ô¶¯µØ°üº¬½øÈ¥¡£

ÀýÈç£¬¼ÙÉèÄãµÄ±Ê¼ÇµçÄÔÊ¹ÓÃÒ»¸ö i82365 Í¬ÈÝµÄ PCMCIA Ö÷¿ØÖÆÆ÷£¬¶øÄã
Ïë´ÓÒ»¸ö½ÓÖø Adaptec SlimSCSI ¿¨¶ø×°ÓÐ¸ùµµ°¸ÏµÍ³µÄÓ²µúÉÏÆô¶¯ Linux
¡£Äã¿ÉÒÔ½¨Á¢Ò»¸öºÏÊÊµÄ initrd Ó³Ïñµµ£¬·½·¨ÈçÏÂ:

\begin{tscreen}
\begin{verbatim}
pcinitrd -v initrd pcmcia/i82365.o pcmcia/aha152x_cs.o
\end{verbatim}
\end{tscreen}


À´×Ô¶© initrd ÆôÊ¹ÅÅ³Ì£¬Äã¿ÉÒÔÓÃÏÂÃæµÄÃüÁîÀ´Ê¹ÓÃ ``loopback'' Éè±¸
À´¹ÒÉÏ¸ÃÓ³Ïñµµ°¸:

\begin{tscreen}
\begin{verbatim}
mount -o loop -t ext2 initrd /mnt
\end{verbatim}
\end{tscreen}


È»áá±àÐÞ {\ttfamily linuxrc} ÊÖ¸å¡£ PCMCIA ½¨¹¹µÄµµ°¸»á±»°²×°µ½Ó³Ïñµµ°¸¡õ
Í·µÄ    {\ttfamily /etc}    ÄÚ£¬   µ±È»ÄãÒ²¿ÉÒÔ×ÔÒÑÉè¶¨¡£    Ï¸½ÚÇë¿´
{\ttfamily pcinitrd} µÄ man Ò³¡£




\subsubsection{½¨Á¢Ò»¸ö initrd ¿ª»úÈíµúÆ¬}



ÔÚ½¨Á¢ÁË {\ttfamily pcinitrd} Ó³Ïñµµáá£¬ Äã¿ÉÒÔÀûÓÃ¿½±´ºËÐÄµÄ·½Ê½À´×öÒ»Æ¬
¿É¿ª»úµÄ´ÅµúÆ¬£¬ ²¢°Ñ±»Ñ¹ËõµÄ initrd Ó³Ïñµµ¡¢Ö§Ô®¸ø {\ttfamily lilo} Ê¹ÓÃ
µÄµµ°¸µ½Ò»ÕÅ¿Õ°×´ÅµúÆ¬ÉÏ¡£ ÏÂÃæµÄÁÐ×Ó£¬ ÎÒÃÇ¼ÙÉèÎÒÃÇÐèÒªµÄ  PCMCIA
¸ùÉè±¸ÊÇ {\ttfamily /dev/sda1}:

\begin{tscreen}
\begin{verbatim}
mke2fs /dev/fd0
mount /dev/fd0 /mnt
mkdir /mnt/etc /mnt/boot /mnt/dev
cp -a /dev/fd0 /dev/sda1 /mnt/dev
cp [kernel-image] /mnt/vmlinuz
gzip < [initrd-image] > /mnt/initrd
\end{verbatim}
\end{tscreen}


½¨Á¢Ò»¸ö°üº¬ÏÂÃæÄÚÈÝµÄ {\ttfamily /mnt/etc/lilo.conf} µµ°¸:

\begin{tscreen}
\begin{verbatim}
boot=/dev/fd0
compact
image=/vmlinuz
    label=linux
    initrd=/initrd
    read-only
    root=/dev/sda1
\end{verbatim}
\end{tscreen}


×îáá£¬Ö´ÐÐ lilo ÈçÏÂ:

\begin{tscreen}
\begin{verbatim}
lilo -r /mnt
\end{verbatim}
\end{tscreen}


µ± {\ttfamily lilo} ±»Ö´ÐÐÊ±ÅäºÏÊ¹ÓÃ {\ttfamily -r} Ñ¡Ïî£¬Ëü»á×öËùÓÐÓë±»Ö¸¶¨µÄ¸ù
Ä¿Â¼µÄÏà¹Ø¶¯×÷¡£  ÔÚ  {\ttfamily /mnt/dev}   ¡õ½¨Á¢Éè±¸µµ°¸µÄÀíÓÉÊÇ£¬
µ±ËüÊÇÔÚÌæ´úµÄ¸ùÄ¿Â¼Ä£Ê½ÏÂ {\ttfamily lilo} ²¢ÎÞ·¨Ê¹ÓÃÔÚ {\ttfamily /dev} ÄÚ
µÄµµ°¸¡£




\subsubsection{°²×° initrd Ó³Ïóµµµ½·ÇLinux ´ÅµúÄÚ}

initrd  ¹¦ÄÜÒ»°ã¶¼Ê¹ÓÃÔÚµ±ÄÚ²¿µÄÓ²µú»ú±»·ÖÅÉ¸øÆäËûµÄ×÷ÒµÏµÍ³Ê¹ÓÃÊ±
¡£ Linux ºËÐÄÒÔ¼° initrd  Ó³Ïñµµ¿ÉÒÔ±»·ÅÔÚ·Ç  Linux µÄ´ÅÇø·Ö¸îÄÚ£¬
¶øÇÒ  {\ttfamily lilo}  »òÊÇ  {\ttfamily LOADLIN}   ¿ÉÒÔ±»Éè¶¨ÓÉÕâÐ©Ó³ÏñµµÀ´¿ªÆô
Linux ÏµÍ³¡£

¼ÙÉèÄãÓÐ¸öÒÑ±»½¨¹¹ºÃºÏÊÊµÄ¸ùÉè±¸£¬ÇÒ initrd Ó³Ïñµµ±»½¨Á¢ÔÚÁíÍâµÄÏµ
Í³ÉÏÁË£¬Æô¶¯ Linux ÏµÍ³µÄ×îÈÝÒ×·½·¨ÊÇÊ¹ÓÃ {\ttfamily LOADLIN}£¬ÈçÏÂ:

\begin{tscreen}
\begin{verbatim}
LOADLIN <kernel> initrd=<initrd-image>
\end{verbatim}
\end{tscreen}


Ò»µ©Äã¿ÉÒÔÔÚÄãµÄÄ¿±ê»úÆ÷ÉÏÆô¶¯ Linux£¬ Äã¾Í¿ÉÒÔ°²×° {\ttfamily lilo} À´ÔÊ
ÐíÖ±½ÓµØÆô¶¯ Linux ÁË¡£ ÀýÈç£¬¼ÙÉè {\ttfamily /dev/hda1} ÊÇ¸ö·Ç Linux
µÄÄ¿±ê´ÅÇø·Ö¸î£¬ÇÒ {\ttfamily /mnt} ¿ÉÒÔ±»ÓÃ×öÎª¹ÒÈëµã¡£ Ê×ÏÈ£¬ÔÚÄ¿±ê
´ÅÇø·Ö¸îÉÏ½¨Á¢Ò»¸ö·Å Linux µµ°¸µÄ×ÓÄ¿Â¼:

\begin{tscreen}
\begin{verbatim}
mount /dev/hda1 /mnt
mkdir /mnt/linux
cp [kernel-image] /mnt/linux/vmlinuz
cp [initrd-image] /mnt/linux/initrd
\end{verbatim}
\end{tscreen}


ÔÚÕâ¸öÀý×ÓÖÐ£¬ ¼ÙÉè {\ttfamily /dev/sda1} ÊÇÎÒÃÇÒª×öÎª Linux ¸ù·Ö¸îµÄ
´Åµú£¬ ËüÊÇ¸ö¾­ÓÉ  PCMCIA  SCSI  ¿¨Ëù¹ÒÉÏµÄ  SCSI  Ó²µú»ú¡£ Òª°²×°
{\ttfamily lilo}£¬Çë½¨Á¢Ò»¸öÓÐÒÔÏÂÄÚÈÝµÄ {\ttfamily lilo.conf} µµ:

\begin{tscreen}
\begin{verbatim}
boot=/dev/hda
map=/mnt/linux/map
compact
image=/mnt/linux/vmlinuz
        label=linux
        root=/dev/sda1
        initrd=/mnt/linux/initrd
        read-only
other=/dev/hda1
        table=/dev/hda
        label=windows
\end{verbatim}
\end{tscreen}


ÔÚ {\ttfamily boot=} ÕâÐÐ¡õËµÒªÔÚÖ¸¶¨µÄÉè±¸Ö®Ö÷¿ª»ú¼ÇÂ¼  MBR( master boot
record) ¡õ°²×°¿ª»úÔØÈë³ÌÊ½¡£ {\ttfamily root=} ÕâÐÐÖ¸³öÔÚÔØÈë initrd Ó³Ïñ
µµááÐèÒªÊ¹ÓÃµÄ¸ùµµ°¸ÏµÍ³£¬Èç¹ûºËÐÄÓ³Ïñµµ¡õÒÑÕâ÷á½¨¹¹ÁËÄÇ¾Í²»ÐèÕâ÷á
×öÁË¡£  ÔÚ  {\ttfamily other=}   ÄÇÐÐÊÇÓÃÀ´ÃèÊöËµÓÐÆäËûµÄ×÷ÒµÏµÍ³±»°²×°ÔÚ
{\ttfamily /dev/hda1} ¡õ¡£

Òª°²×°Õâ¸öÀý×Ó¡õµÄ {\ttfamily lilo} £¬Ê¹ÓÃ:

\begin{tscreen}
\begin{verbatim}
lilo -C lilo.conf
\end{verbatim}
\end{tscreen}


¼ÇµÃÔÚÕâ¸ö°¸×Ó¡õ£¬{\ttfamily lilo.conf} µµ°¸Ê¹ÓÃÁË°üÀ¨ {\ttfamily /mnt} ÔÚÄÚ
µÄ¾ø¶ÔÎ»Ö·¡£ÎÒÓÃÕâ¸öÀý×ÓµÄÔ­ÒòÊÇÄ¿±êµµ°¸ÏµÍ³²¢²»Ò»¶¨Ö§Ô®Ê¹ÓÃ {\ttfamily boot=}
ºÍ {\ttfamily root=} Ñ¡ÏîÀ´½¨Á¢ Linux Éè±¸µµ°¸µÄ½¨Á¢¡£




\section{Ê¹ÓÃÎ´±»Ö§Ô®µÄ¿¨Æ¬}






\subsection{½¨¹¹ÎÞ·¨±»±æÊÓµÄ¿¨Æ¬\label{new-card}}



ÏÖÔÚÎÒÃÇ¼ÙÉèÄãµÄ¿¨Æ¬ÒÑ±»ÏÖÓÐµÄÇý¶¯³ÌÊ½ËùÖ§Ô®£¬ÎÒÃÇËùÐèÒª×öµÄÊÇÔÚ
{\ttfamily /etc/pcmcia/config} ÖÐ¼ÓÈëÒ»¸öÌõÄ¿À´¸æËß {\ttfamily cardmgr} ÈçºÎ
À´±æÊÓÕâÕÅ¿¨£¬ÄÄÐ©Çý¶¯³ÌÊ½ÐèÒªÁ¬½áµ½ÕâÕÅ¿¨Æ¬ÉÏ¡£½¨¹¹µµ°¸µÄ¸ñÊ½Ï¸½Ú
Çë²é¿´  {\ttfamily pcmcia}  µÄ  man  Ò³¡£  Èç¹ûÄã²åÈëÒ»ÕÅ²»±»ÈÏµÃµÄ¿¨Æ¬£¬
{\ttfamily cardmgr} Õý³£À´Ëµ»á¼ÇÂ¼Ò»Ð©±æÊÓ×ÊÑ¶µ½ÏµÍ³ÈÕÖ¾ÉÏ£¬ ÎÒÃÇ¿ÉÒÔÀûÓÃ
ÕâÐ©×ÊÑ¶À´½¨ÔìËüµÄ½¨¹¹ÌõÄ¿¡£

ÒÔÏÂÊÇ¸ö cardmgr ÈçºÎ½«Î´Ö§Ô®¿¨µÄ±¨¸æµ½ {\ttfamily /usr/adm/messages}
ÄÚµÄÀý×Ó¡£

\begin{tscreen}
\begin{verbatim}
cardmgr[460]: unsupported card in socket 1
cardmgr[460]: version info: "MEGAHERTZ", "XJ2288", "V.34 PCMCIA MODEM"
\end{verbatim}
\end{tscreen}


Ïà¶ÔÓ¦µ½{\ttfamily /etc/pcmcia/config} µÄÌõÄ¿¿ÉÒÔÊÇ:

\begin{tscreen}
\begin{verbatim}
card "Megahertz XJ2288 V.34 Fax Modem"
  version "MEGAHERTZ", "XJ2288", "V.34 PCMCIA MODEM"
  bind "serial_cs"
\end{verbatim}
\end{tscreen}


Äã¿ÉÒÔÊ¹ÓÃ ``*'' À´´úÌæ²»ÏþµÃµÄ×Ö´®£¬Ïñ°æ±¾ºÅÂëÀ²¡£ µ±ÄãÐ´ÐÂµÄ½¨¹¹
ÌõÄ¿Ê±£¬ÇëÐ¡ÐÄµØ°ÑÍêÕûµÄ×Ö´®¿½±´¹ýÈ¥£¬±£³ÖÔ­ÓÐµÄ´óÐ¡Ð´ÌåÒÔ¼°¿Õ°××Ö
Ôª¡£»¹ÓÐ£¬ÇëÈ·ÈÏ½¨¹¹ÌõÄ¿Óë±»±¨¸æµ½ÈÕÖ¾µµ°¸¡õµÄ×ÊÁÏÓÐÍ¬ÑùÊýÄ¿µÄ×Ö´®
¡£

ÇëÀÎ¼ÇÄú¼¸ºõ¿ÉÒÔÖ¸¶¨ÈÎºÎµÄÇý¶¯³ÌÊ½¸øÒ»ÕÅ¿¨Ê¹ÓÃ£¬µ«Èç¹ûÄãÖ»ÊÇºúÂÒµØ
ÂÒÅª£¬²¢²»ÊÇ¸öºÜÓÐÉú²úÐ§ÂÊµÄ×÷·¨¡£ÄãÒ²¿ÉÄÜºÜÐÒÔËµØ·¢ÏÖÏÖÓÐµÄÇý¶¯³Ì
Ê½ÒÑÖ§Ô®ÁËÄãµÄ¿¨Æ¬¡£È»¶ø£¬´ó²¿·ÝµÄ½á¹ûÊÇÄÇÐ©Çý¶¯³ÌÊ½²¢ÎÞ·¨¹¤×÷£¬Ò²
ÓÐ¿ÉÄÜ»á²úÉú±ß¼ÊÐ§Ó¦ÏñËøËÀÄãµÄÏµÍ³ÁË¡£²»ÏñÒ»°ãµÄÉè±¸Çý¶¯³ÌÊ½Ö»Ì½²â
ÊÊµ±µÄ¿¨Æ¬£¬Ì½²â PCMCIA Éè±¸µÄ¹¤×÷ÊÇÓÉ {\ttfamily cardmgr} ËùÖ´ÐÐ£¬Çý¶¯³Ì
Ê½±¾ÉíÔÚÊÔÖøÓëÉè±¸¹µÍ¨Ç°²¢²»»á×öÉ¶÷áÈ·ÈÏ¶¯×÷µÄ¡£

ÔÚ±àÐÞ {\ttfamily /etc/pcmcia/config}  Ö®áá£¬ Äã¿ÉÒÔ°µÊ¾ {\ttfamily cardmgr}
ÖØÐÂÔØÈë¸Ãµµ°¸£¬Ê¹ÓÃ:

\begin{tscreen}
\begin{verbatim}
kill -HUP `cat /var/run/cardmgr.pid`
\end{verbatim}
\end{tscreen}


Èç¹ûÄãÉè¶¨ºÃÁËÒ»ÕÅÐÂµÄ¿¨Æ¬£¬Çë¼ÄÒ»·ÝÉè¶¨¸øÎÒ£¬ÕâÑù×ÓÎÒ¾Í¿ÉÒÔ°ÑËü°ü
º¬½ø±ê×¼½¨¹¹µµ°¸¡õ¡£




\subsection{ÔöÁÐ¶Ô NE2000ÏàÈÝÒÒÌ«ÍøÂ·¿¨µÄÖ§Ô®}

Ê×ÏÈ£¬ ÏÈ²é¿´¿´ÕâÕÅ¿¨ÊÇ·ñÒÑ±» {\ttfamily cardmgr} Ëù±æÊ¶¡£ ÓÐÐ©Ã»ÓÐ±»ÁÐÔÚ
{\ttfamily SUPPORTED.CARDS} ÄÚµÄ¿¨Æ¬ÊÂÊµÉÏÊÇÓÐÐ©±»Ö§Ô®µÄ¿¨µÄ OEM °æ±¾¡£Èç
¹ûÄã·¢ÏÖÁËÏñÕâÑùµÄ¿¨Æ¬£¬ÇëÈÃÎÒÖªµÀ£¬ÕâÑù²ÅÄÜ°ÑËü¼Óµ½ÁÐ±íÄÚ¡£

Èç¹ûÄãµÄ¿¨Æ¬Ã»±»±æ±ðµ½£¬ ÇëÒÀÕÕ \ref{new-card} {(3.6)} ÄÚ
µÄ²½ÖèÎªÄãµÄ¿¨Æ¬½¨Á¢Ò»¸ö½¨¹¹ÌõÄ¿£¬²¢°ÑÕâÕÅ¿¨Æ¬Á¬ÏµÉÏ {\ttfamily pcnet\_cs}
Çý¶¯³ÌÊ½¡£ ÖØÐÂÖ´ÐÐ {\ttfamily cardmgr} ¼´¿ÉÊ¹ÓÃ±»¸üÐÂµÄ½¨¹¹µµ°¸ÁË¡£

Èç¹û {\ttfamily pcnet\_cs}  Çý¶¯³ÌÊ½ËµËüÎÞ·¨¾ö¶¨ÄãµÄ¿¨Æ¬Ö®Ó²ÌåÒÒÌ«ÍøÂ·Î»Ö·
£¬ÄÇ÷áÇë±àÐÞÄãµÄÐÂ½¨¹¹ÌõÄ¿½«ÕâÕÅ¿¨Æ¬Á¬ÏµÉÏ¼ÇÒäÌå¿¨Æ¬Çý¶¯³ÌÊ½
{\ttfamily memory\_cs} ÉÏ¡£ ÖØÐÂÖ´ÐÐ {\ttfamily cardmgr} ¼´¿ÉÊ¹ÓÃ±»¸üÐÂµÄ½¨¹¹µµ°¸
ÁË¡£ÄãÐèÒªÖªµÀÄãµÄ¿¨Æ¬µÄÓ²ÌåÒÒÌ«ÍøÂ·Î»Ö·µÄÖµ¡£Õâ¸öÎ»Ö·ÊÇ¸öÒÔ¶þ¸öÊ®
ÁùÎ»Ôª×ÖÔªºÅÂëËùÅÅ³ÉµÄÁù¸öÊý×Ö£¬Í¨³£Ëü»á±»Ó¡ÔÚ¿¨Æ¬ÉÏ¡£Èç¹ûËüÃ»ÓÐÓ¡
ÔÚ¿¨Æ¬ÉÏ£¬Äã¿ÉÒÔÊ¹ÓÃ DOS µÄÇý¶¯³ÌÊ½À´ÏÔÊ¾Õâ¸öÎ»Ö·¡£ Ö»ÒªÄãÒ»ÖªµÀÕâ
¸öÖµ£¬ÇëÖ´ÐÐ:

\begin{tscreen}
\begin{verbatim}
dd if=/dev/mem0a count=20 | od -Ax -t x1
\end{verbatim}
\end{tscreen}


È»ááÑ°ÕÒÄãµÄÎ»Ö·Ö®Êä³ö¡£Ö»ÓÐÅ¼ÊýÎ»Ôª×é±»¶¨ÒåÁË£¬Òò´Ë¿ÉÒÔºöÂÔÇãÓ¡×Ê
ÁÏÄÚµÄÆæÊýÎ»Ôª×é¡£¼ÇÏÂÎ»Ö·µÄµÚÒ»¸öÎ»Ôª×éµÄÊ®ÁùÎ»ÔªÎ»ÒÆ¡£ÏÖÔÚ£¬±àÐÞ
{\ttfamily modules/pcnet\_cs.c} ²¢Ñ°ÕÒ {\ttfamily hw\_info} ¹¹Ôì¡£ÄãÐèÒªÎªÄãµÄ
¿¨Æ¬½¨Á¢Ò»¸öÐÂµÄÌõÄ¿¡£µÚÒ»¸öÀ¸Î»¾ÍÊÇ¼ÇÒäÌåÎ»ÒÆ¡£½ÓÖøµÄÈý¸öÀ¸Î»¾ÍµÚ
Ó²ÌåÎ»Ö·µÄÇ°Èý¸öÎ»Ôª×é¡£×îááÒ»À¸Î»º¬ÓÐ¿¨Æ¬µÄÌØ±ð¹¦ÄÜµÄÆì±ê; ¿ªÊ¼Ê±
ÇëÊÔÖø½«ËüÉèÎª 0¡£

±àÐÞÍê   {\ttfamily pcnet\_cs.c}    áá£¬   ±àÒëÓë°²×°ÐÂµÄÄ£×é¡£   ÔÙ´ÎÐÞ¸Ä
{\ttfamily /etc/pcmcia/config}£¬ È»áá¸Ä±ä¿¨Æ¬µÄÁ¬Ïµ´Ó  {\ttfamily memory\_cs}
»»³É {\ttfamily pcnet\_cs}¡£Ë³ÖøÖ¸Ê¾ÖØÐÂÔØÈë½¨¹¹µµ°¸áá¾ÍÍê³ÉÁË¡£ÇëÄú¼Ä¸øÎÒ
Ò»·ÝÄãµÄÐÂ{\ttfamily hw\_info} µµ°¸ÒÔ¼°½¨¹¹µÄÌõÄ¿ÄÚÈÝ¡£

Èç¹ûÄãÃ»ÓÐÔÚÊ®Áù½øÎ»ÇãÓ¡ÄÚÕÒµ½ÄãµÄ¿¨Æ¬µÄÓ²ÌåÎ»Ö·¡£×îááµÄÒ»¸ö·½·¨£¬
µ± {\ttfamily pcnet\_cs} Ä£×é³õÊ¼»¯Ê±ÏëÒª ``hard-wire( Ó²Ìå½ÓºÏ )'' ÊÇÓÐ¿É
ÄÜµÄ¡£Çë±àÐÞ {\ttfamily /etc/pcmcia/config.opts} ²¢¼ÓÈë {\ttfamily hw\_addr=}
Ñ¡Ïî£¬ÏñÕâÑù:

\begin{tscreen}
\begin{verbatim}
module "pcnet_cs" opts "hw_addr=0x00,0x80,0xc8,0x01,0x02,0x03"
\end{verbatim}
\end{tscreen}


ÔÚÊÊÒËµÄµØ·½´ú»»µôÄã×Ô¼ºµÄ¿¨Æ¬Ö®Ó²ÌåÎ»Ö·¡£µ±È»£¬ÇëÐ¡ÐÄÈç¹ûÄãÒÑ¾­×ö
ÁËÄÇ÷á¶àÁË£¬ÄÇÄãµÄ¿¨Æ¬¾Í²»Ì«ÏñÊÇ¸ö NE2000 ÏàÈÝ¿¨ÁË¡£ÊÂÊµÉÏ£¬ÎÒ²¢²»
È·¶¨ÊÇ·ñÓÐ  {\itshape  ÈÎºÎ \/} ¿¨Æ¬ÔÚ¾­¹ýÁËÇ°ÃæÁ½ÖÖ·½·¨Ö®Ò»áá»¹²»ÄÜÓÃµÄÁË
¡£




\subsection{PCMCIA Èíµú»ú½éÃæ¿¨}

ÔÚ Compaq Aero ¼°ÉÙÊýÒ»Ð©±Ê¼ÇÐÍµçÄÔËùÊ¹ÓÃµÄ  PCMCIA Èíµú»ú½éÃæ¿¨Ä¿
Ç°ÉÐÎ´±»Ö§Ô®¡£ Ö÷ÒªÕÏ°­ÔÚì¶ Aero ËÆºõÊ¹ÓÃ×Ô¶©µÄ  PCMCIA ¿ØÖÆÆ÷À´Ê¹
DMA Ö§Ô®Èíµú»ú¡£ÔÚ²»ÏþµÃÕâÊÇÈçºÎ°ìµ½µÄÇé¿öÏÂ£¬ÎÒÃÇ¾ÍÎÞ·¨ÕÒ³ö½â¾öµÄ
·½·¨¡£

Èç¹ûÔÚ Aero ±»¿ªÆôÊ±Èíµú»ú½éÃæ¿¨ÊÇ²åÖøµÄ£¬ Aero µÄ BIOS ¾Í»á½¨¹¹¸Ã
¿¨£¬´ËÊ± Linux »á°ÑËüÊÓÎªÒ»°ãµÄÈíµú»ú¡£µ± Linux µÄ PCMCIA Çý¶¯³ÌÊ½
±»ÔØÈëÊ±£¬ ËüÃÇ»á²é²ìµ½Õâ¿¨ÒÑ±»½¨¹¹²¢ÒÑ¸½ÖøÔÚ Linux µÄÇý¶¯³ÌÊ½ÉÏ£¬
¶øÕâ²å²ÛÒ²»á±»ºöÂÔ²»¹ÜÁË¡£ËùÒÔ£¬Èç¹ûÔÚ¿ª»úÊ±¿¨Æ¬¼´²åÖøÁËÄÇ¾Í¿ÉÒÔÊ¹
ÓÃ£¬µ«Ëü²»¾ß±¸ÈÈ»ú½»»»µÄ¹¦ÄÜ¡£




\subsection{Ö§Ô® Xircom ¿¨µ½µ×Ôõ÷áÁË£¿}

ÔÚÄ¿Ç°µÄ PCMCIA Ì×¼þÖÐÓÐº¬ÁËÒ»¸ö¹ÅÔ®  Xircom ÒÒÌ«ÍøÂ·¼°ÒÒÌ«ÍøÂ·  /
Êý¾Ý»úµÄÇý¶¯³ÌÊ½¡£ ÕâÒª¸ÐÐ» Werner Koch ÏÈÉú¡£ÎÒÓÐÉèÁ¢Ò»¸ö×¨ÃÅÌÖÂÛ
Xircom Çý¶¯³ÌÊ½ÂÛ¡õµÄ³¬Ã½ÌåÐÂÎÅ£¬ÔÚ \nameurl{http://hyper.stanford.edu/hypernews/get/pcmcia/xircom.html}{}¡£

ÒÔÇ° Xircom ¿¨²¢Ã»±»Ö§Ô®ÊÇÒòÎª Xircom ¹«Ë¾ÓÐ²»ÄÜ¡õÂ¶ËûÃÇµÄ¿¨Æ¬Ö®¼¼
Êõ×ÊÑ¶¡£ááÀ´£¬ËûÃÇ·ÅËÉÕâÐ©¹æ¶¨£¬ÏÖÔÚÖ÷¶¯Ìá¹©Çý¶¯³ÌÊ½µÄ×ÊÑ¶¡£




\section{³ý´íÐ¡¼¼ÇÉ¼°³ÌÊ½Éè¼Æ×ÊÑ¶}


\subsection{Ìá³öÓÐÓÃµÄÐ¡³æ±¨¸æ}

Ìá³öÐ¡³æ±¨¸æµÄ×îºÃµÄ·½·¨ÊÇÊ¹ÓÃÔÚ Linux PCMCIA ×ÊÑ¶Õ¾µÄ³¬Ã½ÌåÐÂÎÅÑ¶
Ï¢ÁÐ±í¡£ÕâÑù¿ÉÈÃÆäËûÈËÖªµÀ×îÐÂµÄÎÊÌâÓÐÄÄÐ© (²¢ÐÞ¸Ä»ò¸Ä±ä·½·¨ )¡£Õâ
¶ùÊÇÐ¡³æ±¨¸æÄÚÓ¦ÈÃÓÐµÄ×ÊÁÏ£º

\begin{itemize}
\item ÄúµÄÏµÍ³ÀàÐÍ£¬ÒÔ¼° {\ttfamily probe} ÃüÁîµÄÊä³öÑ¶Ï¢¡£
\item ÄúÊ¹ÓÃÄÄÐ© PCMCIA ¿¨¡£
\item ÄúµÄ Linux ºËÐÄ³ÌÊ½°æ±¾¼° PCMCIA Çý¶¯³ÌÊ½°æ±¾¡£
\item Äú¶Ô {\ttfamily /etc/pcmcia} µµ»ò PCMCIA Æô¶¯ÊÖ¸åËù×öµÄ¸Ä±ä¡£
\item  ÔÚÏµÍ³ÈÕÖ¾µµÄÚËùÓÐÓë PCMCIA ÓÐ¹ØµÄÑ¶Ï¢¡£
\end{itemize}


ËùÓÐµÄ PCMCIA ³ÌÊ½Ä£×éºÍ {\ttfamily cardmgr} ¾«ÁéËù´«µ½ÏµÍ³ÈÕÖ¾µµµÄÑ¶Ï¢¡£
Í¨³£Îª {\ttfamily /var/log/messages}  »ò {\ttfamily /usr/adm/messages}¡£
µ±×·×ÙÒ»¸öÎÊÌâÊ±ÕâÓ¦¸ÃÊ±µÚÒ»¸öÒª²ì¿´µÄµØ·½¡£µ±ÄúÌá³öÐ¡³æ±¨¸æÊ±ÇëÁ¬
Í¬°üÀ¨Õâ¸öµµ°¸¡£      Èç¹ûÄúÔÚÕÒÏµÍ³Ñ¶Ï¢ÓÐÈÎºÎÎÊÌâÊ±£¬      Çë¼ì²é
{\ttfamily /etc/syslogd.conf} À´¿´ÓÐÄÄÐ©²»Í¬µÄÑ¶Ï¢Àà±ð±»´¦ÀíÁË¡£

ÔÚÌá³öÐ¡³æ±¨¸æÇ°£¬ÇëÄú¼ì²éÒ»ÏÂÈ·ÈÏÄúÊ¹ÓÃµÄÊÇ×îÐÂ°æµÄÇý¶¯³ÌÊ½Ì×¼þ¡£
Èç¹ûÄÜÏÈ¿´ÒÑ±»ÎÒ¸ÄÕý³ý´íááµÄ±¨¸æµÄ»°»áÈÃÈËÉÔÉÔ¸ßÐËÒ»ÏÂ£¬²»È»¾ÍÓÐµã
Ã»½¨ÉèÐÔµØ¹¼¸ºÎÒµÄÐÄÑªÁË¡£

Èç¹ûÄãµÄÎÊÌâÊÇºËÐÄµÄ²¿·Ý£¬´Ó´íÎóµÄµØ·½Ö®´íÎóÇãÓ¡Ö»ÓÐÄãÄÜ¹»×·×Ý´íÎó
Î»Ö·£­ EIP ²ÅÓÐÓÃ¡£ Èç¹û´íÎóÊÇÔÚÖ÷ÒªºËÐÄÄÚ£¬¿´¿´ÔÚ {\ttfamily System.map}
ÄÚµÄÎ»Ö·£¬ÕÒ³ö´íÎóµÄ¹¦ÄÜº¯Êý¡£Èç¹û³ö´íµÄµØ·½ÊÇÔÚ¿ÉÔØÈëÊ½Ä£×éÄÚ£¬ÄÇ
÷á¾ÍºÜÄÑ×·×ÝÁË¡£ Ê¹ÓÃÄ¿Ç°µÄÄ£×é¹¤¾ß ``{\ttfamily ksyms -m}'' »áÌá³öÒ»·ÝÃ¿
Ò»¸ö¿ÉÔØÈëÄ£×éµÄ»ùÎ»Ö·¡£Ñ¡È¡°üº¬ÁË EIP Î»Ö·µÄÄ£×é£¬È»áá°Ñ EIP ¼õµô
»ùÎ»Ö·¼´¿É»ñµÃÄ£×éÄÚµÄÎ»ÒÆ¡£ È»áá£¬ Ö´ÐÐ {\ttfamily gdb} ÔÚ¸ÃÄ£×éÉÏ£¬Ê¹ÓÃ
{\ttfamily list} ÃüÁîÕÒµ½Î»ÒÆ¡£ ÕâÏî¹¦ÄÜÖ»ÓÐÔÚÄãÓÐÊ¹ÓÃ {\ttfamily -g} Ñ¡ÏîÔÚ±àÒë
¸ÃÄ£×éÊ±¼ÓÈëÁË³ý´í×ÊÑ¶µÄ¹¦ÄÜ¡£

Èç¹ûÄãÃ»ÓÐÊ¹ÓÃÍøÂ·£¬Ð¡³æ±¨¸æÒ²¿ÉÒÔ¼Äµ½ {\ttfamily dhinds@hyper.stanford.edu}
À´¸øÎÒ£¬ÎÒ½ÏÏ£ÍûÄãÄÜ°ÑÐ¡³æ±¨¸æÌùµ½ÎÒµÄÍøÕ¾ÉÏ£¬ÕâÑù×ÓÆäËûÈËÒ²¶¼¿ÉÒÔ
¿´µ½¡£




\subsection{µÍ½× PCMCIA ³ý´í¸¨Öú}

PCMCIA Ä£×éº¬ÓÐÐí¶àÌõ¼þ±àÒëµÄ³ý´íÂë¡£ ´ó²¿·ÝµÄÕâÐ©Âë¶¼ÔÚÇ°ÖÃ´¦ÀíÆ÷
{\ttfamily PCMCIA\_DEBUG} ¶¨ÒåµÄ¿ØÖÆÏÂ¡£Èç¹ûËüÃ»±»¶¨Òå£¬³ý´íÂë¾Í²»»á±»±àÒë
¡£Èç¹ûÉè¶¨Î» 0£¬¿ØÖÆÂë»á±»±àÒë½øÈëµ«²»»á±»ÆôÓÃ¡£Óú´óµÄÊý×ÖÖ¸¶¨»á±ä
µÃ¸üÈß³¤ÁË¡£ ÒÔ {\ttfamily PCMCIA\_DEBUG} ¶¨ÒåÀ´½¨Á¢µÄÄ£×é¶¼»áÓÐ¸öÕûÊý²ÎÊý
{\ttfamily pc\_debug}£¬Ëü»á¿ØÖÆËüµÄÊä³öÖ®¶à¹Ñ¡£ Õâ¿ÉÒÔÔÚÄ£×é±»ÔØÈëÊ±¼ÓÒÔµ÷
Õû£¬ÔÚ²»ÐèÖØÐÂ±àÒëÏÂÊ¹µÃÊä³ö¿ÉÒÔ±»¿ØÖÆ³ÉÒÔÃ¿¸öÄ£×éÎªµ¥Î»ÁË¡£

ÔÚ PCMCIA ¹©Ó¦°æÄÚµÄ {\ttfamily debug\_tools/}  ×ÓÄ¿Â¼ÄÚÓÐÒ»Ð©³ý´íµÄ¹¤
¾ß¡£ {\ttfamily dump\_tcic} ºÍ {\ttfamily dump\_i365} Á½¸ö¹«ÓÃ³ÌÊ½»á²úÉú PCMCIA ¿Ø
ÖÆÆ÷µÄÍêÕûÔÝ´æÆ÷µÄÇãÓ¡£¬²¢ÇÒ½«Ðí¶àÔÝ´æÆ÷×ÊÑ¶µÄ½âÂë¡£Èç¹ûÄãÓÐ¶ÔÏà¹Ø
µÄ¿ØÖÆ¾§Æ¬×ö´æÈ¡µÄ»°£¬   ÕâÐ©×ÊÑ¶×î×îÓÐÓÃµÄÁË¡£   {\ttfamily dump\_tuples}
¹«ÓÃ³ÌÊ½ÁÐ³öÁË¿¨Æ¬µÄ CIS (¿¨Æ¬×ÊÑ¶½á¹¹ )£¬²¢½«Ò»Ð©½ÏÖØÒªµÄ×ÊÁÏ½âÂë
³öÀ´¡£  {\ttfamily dump\_cisreg}  ¹«ÓÃ³ÌÊ½ÏÔÊ¾¿¨Æ¬µÄ±¾µØ¶Ë½¨¹¹ÔÝ´æÆ÷(local
configuration registers)×ÊÁÏ¡£

ÓÐÊ±ºò {\ttfamily memory\_cs} ¼ÇÒäÌå¿¨Çý¶¯³ÌÊ½ÓÃÀ´³ý´íºÜºÃÓÃ¡£Ëü¿ÉÒÔÓëÈÎºÎ
µÄ PCMCIA ¿¨ÏàÁ¬½Ó£¬¶øÇÒ²»»á¸ÉÈÅµ½ÆäËûµÄÇý¶¯³ÌÊ½¡£Ëü¿ÉÒÔ±»ÓÃÀ´¶ÔÈÎ
ºÎ¿¨Æ¬µÄÊôÐÔ¼ÇÒäÌå»òÍ¨ÓÃ¼ÇÒäÌåµÄÖ±½Ó´æÈ¡¡£




\subsection{ÎªÐÂ¿¨Æ¬Ð´¿¨Æ¬·þÎñÇý¶¯³ÌÊ½}

Linux PCMCIA ³ÌÊ½Éè¼ÆÊ¦Ö¸ÒýÊÇ Linux PCMCIA ½éÃæµÄ×îºÃÎÄ¼þ¡£ ×îÐÂµÄ
°æ±¾Äã¶¼¿ÉÒÔ´Ó {\ttfamily hyper.stanford.edu} µÄ {\ttfamily /pub/pcmcia/doc}
Ä¿Â¼ÄÚ»òÊÇÔÚÍøÕ¾ \nameurl{http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html}{}
ÄÚÕÒµ½¡£

¶Ôì¶ÄÇÐ©½Ó½üì¶Ò»°ãµÄ   ISA  ½éÃæÉè±¸À´Ëµ£¬  ÄãÒ²Ðí¿ÉÒÔÊ¹ÓÃÒÑ´æÔÚµÄ
Linux Çý¶¯³ÌÊ½À´Çý¶¯¡£ÓÐÊ±ºò£¬×î´óµÄÕÏ°­ÊÇÐÞ¸ÄÒ»¸öÒÑ´æÔÚµÄÇý¶¯³ÌÊ½
Ê¹Ëü¿ÉÒÔÔÚ¿ª»úáá´¦Àí¼ÓÈë»òÒÆ³öÉè±¸¡£ÔÚÏÖÐÐµÄÇý¶¯³ÌÊ½ÖÐ£¬Ö»ÓÐ¼ÇÒäÌå
¿¨ÊÇÎ¨Ò» `` ×ÔÎÒ°üº¬µÄ '' Çý¶¯³ÌÊ½£­²¢²»ÒÀÀµ  Linux µÄºËÐÄµÄÆäËû²¿
·ÝÀ´×ö¿à¹¤¡£

ÔÚºÜ¶àÀý×ÓÖÐ£¬ÒªÖ§Ô®Ò»ÕÅÐÂ¿¨µÄ×î´óÕÏ°­ÔÚì¶´ÓËüµÄÖÆÔì°æÄÇ¶ùµÃµ½¼¼Êõ
×ÊÑ¶¡£    ÒªÖªµÀÎÊË­²Å¶Ô»òÊÇ½âÊÍÄÄÐ©×ÊÑ¶ÊÇ±ØÐèµÄÒ²ºÜÄÑ¡£    È»¶ø£¬
Ö»ÓÐÉÙÊýÀý×ÓÍâ£¬ÔÚÃ»ÓÐ´ÓÖÆÔì³§µÃµ½¼¼Êõ×ÊÑ¶µÄÇé¿öÏÂÒªÐ´¸ö¸Ã¿¨µÄÇý¶¯
³ÌÊ½¼¸ºõºÜÄÑ¡£

ÎÒÐ´ÁËÒ»¸öº¬ÁË±¸×¢À´½âËµÐí¶àÓÐ¹ØÒ»¸öÇý¶¯³ÌÊ½ÈçºÎÓë Card ·þÎñ³ÌÊ½Ïà
¹àÍ¨µÄ¼Ü¹¹Çý¶¯³ÌÊ½¡£       Äã¿ÉÒÔÔÚ       PCMCIA        Ô­Ê¼µµ°¸µÄ
{\ttfamily modules/skeleton.c} ÄÚÕÒµ½¡£




\subsection{¸ø PCMCIA ¿Í»§×Ô¶¨Çý¶¯³ÌÊ½µÄ×÷ÕßµÄÖ¸Òý}



ÎÒ¾ö¶¨ÈôÒª¹©Ó¦ËùÓÐµÄ PCMCIA ¿Í»§¶ËÇý¶¯³ÌÊ½À´³ÉÎª PCMCIA Ì×¼þµÄÒ»²¿
·ÝµÄ»°£¬ÕâÑù²¢²»ÊÊºÏÎÒ¡£Ã¿Ò»¸öÐÂµÄÇý¶¯³ÌÊ½¶¼»áÈÃÖ÷ÒªÌ×¼þ½¥½¥µØÄÑÒÔ
À´Î¬»¤¡£¶øÇÒ°üº¬µÄÕâÐ©Çý¶¯³ÌÊ½Ò²»á²»Çë×ÔÀ´µØ½«Î¬»¤µÄ¹¤×÷´Ó×÷ÕßÄÇ¶ù
×ªÒÆµ½ÎÒµÄÉíÉÏ¡£Òò´Ë£¬ÎÒ»á»ùì¶Ê¹ÓÃÕßµÄÐèÇóÒÔ¼°¿ÉÎ¬»¤ÐÔÀ´ÒÔ¸ö°¸µÄ·½
Ê½¾ö¶¨ÊÇ·ñÒª°üº¬ÄÄÐ©¹©Ó¦µÄÇý¶¯³ÌÊ½¡£¶Ôì¶ÄÇÐ©²»±»°üº¬ÔÚºËÐÄÌ××°µÄÇý
¶¯³ÌÊ½£¬ÎÒ½¨ÒéÕâÐ©Çý¶¯³ÌÊ½µÄ×÷Õß¿ÉÒÔÊ¹ÓÃÏÂÃæµÄ·½°¸À´´ò°üÄúµÄÇý¶¯³Ì
Ê½×÷Îª¹©Ó¦ÓÃ¡£

Çý¶¯³ÌÊ½µÄµµ°¸Ó¦¸Ã±»°²ÅÅ·ÅÔÚÓë PCMCIA À´Ô´¹©Ó¦°æÉÌµÄÏàÍ¬Ä¿Â¼½á¹¹ÏÂ
£¬Èç´Ë£¬Çý¶¯³ÌÊ½¾Í¿É±»½â¿ªµ½ÍêÕûµÄ PCMCIA Ô­Ê¼³ÌÊ½Ê÷µÄÉÏÃæÁË¡£Ò»¸ö
Çý¶¯³ÌÊ½Ó¦¸Ã°üº¬Ô­Ê¼³ÌÊ½µµ°¸ (ÔÚ {\ttfamily ./modules/})£¬ man Ò³ (ÔÚ
{\ttfamily ./man/})£¬½¨¹¹µµ°¸ (ÔÚ {\ttfamily ./etc/})¡£ ÔÚ×îÉÏ²ãµÄÄ¿Â¼ÄÚ
Ò²Ó¦¸ÃÓÐ¸ö README ¶ÁÎÒµµ°¸¡£

×îÉÏ²ãÄ¿Â¼Ò²Ó¦¸Ã°üº¬Ò»¸ö makefile£¬ËüÊÇÒ»¸ö×éºÏÓÃÀ´Ö´ÐÐ ``{\ttfamily make
-f ...} all'' ÒÔ¼° ``{\ttfamily make -f...  install}'' ±àÒëÇý¶¯³ÌÊ½²¢°²×°
ÊÊµ±µÄµµ°¸¡£Èç¹ûÕâ¸ö makefile ÓÐ¸ö {\ttfamily .mk} ¸½¼ÓµµÃû£¬ÄÇ÷áËü»á×Ô¶¯
µØ±»ÉÏ²ãµÄ {\ttfamily Makefile}  ÃüÁî¼ÓÉÏ {\ttfamily all} ÒÔ¼° {\ttfamily install} Ä¿±ê
µØÊ±À´Ö´ÐÐ¡£

ÒÔÏÂÊÇÒ»¸ö   makefile   ÈçºÎ±»½¨Á¢µÄÀý×Ó£º

\begin{tscreen}
\begin{verbatim}
# Sample Makefile for contributed client driver
FILES = sample_cs.mk README.sample_cs \
        modules/sample_cs.c modules/sample_cs.h \
        etc/sample etc/sample.opts man/sample_cs.4
all:
        $(MAKE) -C modules MODULES=sample_cs.o
install:
        $(MAKE) -C modules install-modules MODULES=sample_cs.o
        $(MAKE) -C etc install-clients CLIENTS=sample
        $(MAKE) -C man install-man4 MAN4=sample_cs.4
dist:
        tar czvf sample_cs.tar.gz $(FILES)
\end{verbatim}
\end{tscreen}


Õâ¸ö makefile Ê¹ÓÃ 2.9.10 °æ±¾£¨º¬£©ÒÔááµÄ PCMCIA Ì××°³ÌÊ½Ëù¶¨ÒåµÄ
°²×°Ä¿±êµØ¡£Ëü»¹°üº¬ÁËÒ»¸ö ``dist'' Ä¿±êµØÀ´¸øÇý¶¯³ÌÊ½µÄ×÷Õß·½±ãÐÔ
¡£        ÄãÒ²ÐíÏëÒª¼ÓÉÏ°æ±¾±àºÅµ½×îááµÄÌ××°µµÃûÉÏ¡£       (ÀýÈç£¬
{\ttfamily sample\_cs-1.5.tar.gz})¡£Ò»¸öÍêÕû¹©Ó¦°æ¿ÉÒÔÈçÏÂ£º

\begin{tscreen}
\begin{verbatim}
sample_cs.mk
README.sample_cs
modules/sample_cs.c
modules/sample_cs.h
etc/sample
etc/sample.opts
man/sample_cs.4
\end{verbatim}
\end{tscreen}


ÒÔÕâÑùµÄ°²ÅÅ£¬µ±¹©Ó¦°æ±¾Çý¶¯³ÌÊ½±»½â¿ªÊ±£¬Ëü»á±äÎª PCMCIA Ô­Ê¼³ÌÊ½
Ê÷µÄ±ØÒª³ÉÔ±¡£ÕâÑùËü¾Í¿ÉÒÔÊ¹ÓÃ PCMCIA µµÍ·µµ°¸ÒÔ¼°¼ì²éÊ¹ÓÃÕßÏµÍ³½¨
¹¹µÄ»úÄÜ¡¢×Ô¶¯Ïà¹ØÐÔ¼ì²é£¬¾ÍÏñÊÇ¸ö `` Ò»°ãµÄ '' ¿Í»§¶ËÇý¶¯³ÌÊ½Ò»Ñù
¡£

ÎÒ½ÓÊÜÄÇÐ©ÒÀÕÕÕâ¸ö¹æ¸ñËù×¼±¸µÄ¿Í»§¶ËÇý¶¯³ÌÊ½½«ËüÃÇ·ÅÔÚÎÒµÄ  FTP µµ
°¸´«ÊäÕ¾  {\ttfamily hyper.stanford.edu}  µÄ {\ttfamily /pub/pcmcia/contrib}
Ä¿Â¼ÄÚ¡£ÔÚÕâ¸öÄ¿Â¼ÄÚµÄ README µµ°¸»áÊöÃ÷ÈçºÎ½â¿ª¹©Ó¦µÄÇý¶¯³ÌÊ½¡£

PCMCIA ¿Í»§¶ËÇý¶¯³ÌÊ½½éÃæÒ»Ö±ÒÔÀ´¶¼Ã»ÓÐ±ä¶¯ºÜ¶à£¬ ²¢ÇÒ»¹¶¼ÓÐ±£ÁôÏò
ááÏàÈÝµÄ¹¦ÄÜ¡£Ò»¿Í»§¶ËÇý¶¯³ÌÊ½²¢²»ÐèÔÚÖ÷ÒªµÄ PCMCIA Ì×¼þÐ¡²¿·ÝµÄ¸Ä
°æÊ±¾ÍµÃÉý¼¶Ò»´Î¡£ÎÒÒ²»áÊÔÖøÍ¨ÖªÄÇÐ©¹©Ó¦Çý¶¯³ÌÊ½µÄ×÷Õß¶Ôì¶ËûÃÇµÄÇý
¶¯³ÌÊ½ÐèÒª¸ü¶¯µÄµØ·½¡£




\subsection{¸ø Linux ¹©Ó¦°æ±¾Î¬»¤ÈËÔ±µÄµ¼Òý }



Èç¹ûÄúÊ¹ÓÃµÄ¹©Ó¦ÉÌ°æ±¾Ìá¹©ÏµÍ³½¨¹¹¹¤¾ß³ÌÊ½Ê¹ÄúÐë×¢Òâ PCMCIA ²¿·Ý£¬
ÇëÊ¹ÓÃÔÚ {\ttfamily /etc/pcmcia}  ÄÚµÄ {\ttfamily *.opts} µµ°¸À´¡±¹ÒÉÏ¡±
ÄÇÐ©¹¦ÄÜ¡£Èç¹ûÊ¹ÓÃÕß±àÒë¼°°²×°ÐÂ°æµÄ PCMCIA Ì×¼þÊ±ËüÃÇ½«²»»á±»¸ü¶¯
¡£Èç¹ûÄúÐÞ¸ÄÁËÖ÷½¨¹¹ÊÖ¸åááÔÙ°²×°¸öÐÂµÄ PCMCIA Ì×¼þÊ±£¬Õâ½«»áÇÄÇÄµØ
°ÑÄúÒÑ×Ô¶©µÄÊÖ¸å¸ø¸²¸Ç¶øÖÐ¶ÏÄúÖ®Ç°Óë½¨¹¹¹¤¾ß¼äµÄÁ¬½Ó¡£Èç¹ûÄú²»ÏþµÃ
Ôõ÷áÀ´Ð´¸öºÏÊÊµÄÑ¡ÏîÊÖ¸å£¬Äú¿ÉÒÔÓëÎÒÁ¬Âç¡£

Èç¹ûÄúÄÜ½«ÄúÊ¹ÓÃµÄ¹©Ó¦ÉÌ°æ±¾ÖÐÓÐ¹Ø PCMCIA Ì×¼þµÄÊ¹ÓÃÓë±¾ÎÄ¼þÖ®²»Í¬
µÄµØ·½Ð´³ÉÎÄ¼þ½«¶ÔÆäËûµÄÊ¹ÓÃÕßÒÔ¼°ÎÒ±¾ÈËÓÐÖúÒæµÄ¡£ÌØ±ðÊÇ£¬ÇëÔÚÎÄ¼þ
ÉÏ¸¶ÉÏÆô¶¯ÊÖ¸å¼°½¨¹¹ÊÖ¹¹µÄ²»Í¬´¦¡£

Èç¹ûÄúÏë×ö Linux ¹©Ó¦°æµÄ PCMCIA£¬×îºÃÒ²°Ñ·Ç PCMCIA Ö÷Òª³ÌÊ½µÄÆäËû
·ÖÏíÇý¶¯³ÌÊ½Ò»Æð°üÀ¨½øÈ¥¡£ÎªÁË·½±ãÎ¬»¤£¬ÎÒ»á¾¡Á¦µØ½«ºËÐÄÌ×¼þµÄ´óÐ¡
ÏÞÖÆÔÚÒ»¶¨¡õÎ§ÄÚ£¬³ý·ÇÓÐÎÒ¾õµÃ»á±»´ó¼Ò¸ÐÐËÈ¤µÄ²¿·Ý²Å»áÔÙ¼Ó½øÈ¥¡£Èç
Ç°ÃæËùËµ£¬ÆäËûµÄÇý¶¯³ÌÊ½»á±»·Ö¿ªµØ¹©Ó¦¡£¶Ôì¶±»ÕûºÏºÍ·Ö¿ªì¶ºËÐÄ²¿·Ý
µÄÇý¶¯³ÌÊ½Ö®½ç¶¨ÊÇËæÒâÇÒÓÐÐ©ÊÇÓÐÆäÀúÊ·ÐÔµÄ£¬Òò´ËÎÒÃÇ²»ÄÜÒÔÎªËüÃÇÔÚ
Æ·ÖÊÉÏÓÐÈÎºÎµÄ²»Í¬¡£



áá¼Ç:

ÒëÕß°´: ÔÚ·­Òë±¾ÆªÎÄÕÂµÄ¹ý³ÌÖÐ£¬¹²Óöµ½¶þ´Î·­Òëµ½Ò»°ë¶øÔ­×÷ÕßÐÞÕýÎÄ
¼þ¼°ÖØÐÂ±àÅÅµÄ×´¿ö¡£Òò´Ë£¬±¾ÒëÎÄ¿ÉÄÜÓÐ·­Òë²»ÖÜÑÓ»ò´í×ÖÖ®´¦£¬·³Çë·¢
ÏÖ´íÎóµØ·½µÄÅóÓÑÀ´ÐÅµ½ {\ttfamily \onlynameurl{linuxer.bbs@cis.nctu.edu.tw}}
¸øÎÒ£¬ÒÔ±ãÐÞÕý£¬Ð»Ð»Äú!



\end{document}
