linuxÉ豸Çý¶¯¿ª·¢Ïê½â——globalmem
linuxÉ豸Çý¶¯¿ª·¢Ïê½â——globalmem
ÊÕ²Ø
³£¼ûµÄÁ½ÖÖ´íÎó£º
1.ÔÚ²åÈëÄ£¿éµÄʱºò³öÏÖÈçÏÂÎÊÌ⣺
# insmod globalmem.ko insmod: error inserting 'globalmem.ko': -1
Device or resource busy
ANSWER:Ö÷É豸ºÅ±»Õ¼ÓÃÁË£¬»»ÁíÒ»¸ö¡£ Äã°Ñglobalmem.cÎļþÀïÃæµÄºê¶¨ÒåÄÇÀï¸ÄΪ226»òÆäËû£¬È»ºóÔÙ±àÒë¾Í¿ÉÒÔ²åÈëÁË£¡
Ìرð×¢Ò⣺ Èç¹û»»ÁËÖ÷É豸ºÅÒÔºó£¬ÏÂÃæ½Ó×Å´´½¨½ÚµãµÄʱºòÒ²Òª¸Ã£¬·ñÔò³öÏÖÏÂÃæ´íÎó£º
# mknod /dev/globalmem c 254 0 /*ÕâÀïµÄ254¸úÒÑÐ޸ĵÄÖ÷É豸ºÅ228²»Ò»ÖÂ*/
# echo
'hello world' > /dev/globalmem
/bin/sh: can't create
/dev/globalmem: No such device or address
½â¾ö°ì·¨£º
# rm /dev/globalmem
# mknod /dev/globalmem c 226 0
# echo
'hello world' > /dev/globalmem
written 12 bytes(s) from 0
2.¼ÓÔغʹ´½¨É豸½Úµã¶¼Êdzɹ¦µÄ£®µ«¾ÍÊÇÓÃcatÃüÁî²é¿´Ê±£¬ËäÈ»¶Á³öÁËÕýÈ·µÄ×Ö·û£¬È´×ÜÊÇÔÚ×îºó»¹Òª¼ÓÉÏÒ»¾äÌáʾ£¢ÕÒ²»µ½É豸»òµØÖ·£¢£®²»ÖªÎª
ºÎ»á¶à³öÕâ¾äÀ´£®
# echo 'hello world!' > /dev/globalmem
written 13 bytes(s)
from 0
# cat /dev/
/dev/console /dev/globalmem /dev/null
#
cat /dev/globalmem
read 4096 bytes(s) from 0
hello world!
cat:
read error: No such device or address
#
ANSWER:ÆäʵûÎÊÌ⣬
<1>
Äã°Ñglobalmem_readº¯ÊýÖеÄif (p >£½ GLOBALMEM_SIZE)¸ÄΪif (p >
GLOBALMEM_SIZE)¾ÍºÃÁË¡£¾ßÌåÔÒòÊÇÒ»´Îµ÷ÓÃcat»á¶ÁÁ½´Î£¬Ã¿´Î¶ÁÈ¡4096¸ö×Ö½Ú£¬´ËʱÎļþ¶ÁÖ¸Õëppos¾ÍÊÇ4096ÁË£¬ÔÚµÚ¶þ´Î¶Á
µÄʱºò£¬µ½if (p >£½
GLOBALMEM_SIZE)ÕâÀïÌõ¼þΪÕ棬globalmem_read¾Í·µ»ØENXIO´íÎóÁË£¬ËùÒԲŻá³öÏÖNo such device or
address"´íÎó¡£²»ÖªµÀÔÚËÎÀÏʦµÄ»ú×ÓÉÏΪʲô¾ÍÊÇÕýÈ·µÄ£¿
<2> Ëᦻª
£º·µ»Ø´íÎóÖµ²ÅÊÇÕýÈ·µÄ£¬ÒòΪ¶ÁµÄλÖÃÒѾԽ½ç£¬ËùÒÔÒª·µ»Ø´íÎ󡣸÷µ»Ø´íÎóµÄʱºò·µ»ØÕýÈ·£¬ÄǾÍÊÇ´íÎ󡣸ijÉif (p >
GLOBALMEM_SIZE)ÊÇ´íÎóµÄ¡£
<3> ¸ù¾ÝÉÏÃæÁ½µã¿ÉÒÔС½áÊéÉÏÊÇûÓдíÎóµÄ¡£Êä³öµÄ´íÎóÐÅÏ¢ÊÇÕý³£µÄdebugÐÅÏ¢£¬Ç§²»¸ÃÍò²»¸Ã¾ÍÊÇcatµ÷ÓÃÁËreadÁ½´Î¡£
Ïà¹ØÎĵµ£º
µÚÒ»¸ö£º DSL Linux
Damn Small LinuxÊÇÒ»Ì×»ùÓÚÒµÎñ¿¨£¨50M×Ö½Ú£©¿ÉÆô¶¯¹âÅ̵ÄLinux·¢ÐС£¾¡¹ÜËüµÄ¸öÍ·Èç´Ë֮С£¬ËüŬÁ¦³ÉΪһ·Ý¿ÉÓò¢ÇÒÒ×ÓõÄ×ÀÃæ¡£Damn Small LinuxµÄ×ÀÃ漸ºõÊÇÍêÕûµÄÒ»Ì×£¬°üÀ¨xmms£¨Ö§³Ömp3ºÍmpeg£©¡¢FTP¿Í»§¶Ë¡¢»ùÓÚlinksµÄwebä¯ÀÀÆ÷¡¢µç×ÓÖƱíÈí¼þ¡¢µç×ÓÓʼþ³ÌÐò¡¢ Ó¢Óïƴд¼ì²é¡¢×Ö´¦ÀíÆ÷¡¢Èý¸ö± ......
LINUXÏÂUSB1.1É豸ѧϰС¼Ç(4)_uhci(2)
À´Ô´: ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º 2009.03.14 16:44¡¡(¹²ÓÐÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
ºÃ~ ÏÖÔÚÍòʾ㱸,ֻǷuhciÓ²¼þµÄ×¢²áÁË
ÏÖÔÚ̸һÏÂuhciÓ²¼þµÄ×é³É,uhciµÄÓ²¼þ·ÖΪÁ½¸ö´óµÄ²¿·Ö,Ö÷»ú¿ØÖÆÆ÷ºÍ¸ù¼¯ÏßÆ÷,ÈçÏÂͼ
µ±Ìá½»uhciÓ²¼þµÄ×¢²áµ½pci×ÜÏߺó,¾¹ýÒ»ÂÖÆ¥Åä,Ö ......
Code maturity level options
´úÂë³ÉÊì¶ÈÑ¡Ïî
Prompt for development and/or incomplete code/drivers ÏÔʾÉÐÔÚ¿ª·¢ÖлòÉÐδÍê³ÉµÄ´úÂëÓëÇý¶¯.³ý·ÇÄãÊDzâÊÔÈËÔ±»òÕß¿ª·¢Õß,·ñÔòÇëÎðÑ¡Ôñ
General setup
³£¹æÉèÖÃ
Local version - append to kernel release ÔÚÄں˰汾ºóÃæ¼ÓÉÏ×Ô¶¨ÒåµÄ°æ±¾×Ö·û´®(СÓÚ64×Ö·û),¿ÉÒÔÓ ......
·½±ãµÄlinuxÃüÁîÊÖ²á
À´Ô´: ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º 2006.07.24 00:31¡¡(¹²ÓÐ0ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
NO
·ÖÀà
PS1
ÃüÁîÃû
Ó÷¨¼°²ÎÊý
¹¦ÄÜ×¢½â
¶ÔÓ¦Õ½Ú
1
Îļþ¹ÜÀí
#
ls
ls -a
Áгöµ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþ£¬°üÀ¨ÒÔ.Í·µÄÒþº¬Îļþ
Îļþ¹ÜÀí
#
ls
ls -l»òll
Áгöµ±Ç°Ä¿Â¼ÏÂÎļþµÄÏêϸР......