linuxÇý¶¯µ÷ÊÔС½á
½üÆÚ±»¸ÏѼ×ÓÉϼÜÕûlinuxÉϵÄÇý¶¯£¬ÕÛÌÚÁ˺ÃЩÌ죬³Ã×Å»¹ÓÐÓ¡Ïó½«×Ô¼ºËÑÂ޵ij¢ÊÔµÄѧµ½µÄ¼Ç¼һÏ£¬ÒÔ±¸½ñºó²éÔÄ
Ò»¡¢Ò»Ð©»ù´¡
1.Çý¶¯ÎļþÐÎʽ ££> *.ko
2.°²×°ÃüÁî ££> insmod жÔØÃüÁ> rmmod ¶¼ÐèÒªrootȨÏÞ £¬Ò²¿ÉÓÃmodprobe
3.ÆäËû¿ÉÄÜÓõ½µÄÃüÁ
modinfo -- ²é¿´Ä£¿éÐÅÏ¢
demsg --- ²é¿´Ó²¼þÐÅÏ¢
objdump---²é¿´Ä£¿éÏêϸÐÅÏ¢(¹¦ÄܺÜÇ¿´ó£¬¾ßÌåman)
4.¹ØÓÚÇý¶¯Ä£ÐÍ ¼°char block streamµÈÏêϸÐÅÏ¢ ¿ÉÒԲο¼ Linux Device Driver 3thd
¶þ¡¢¹ØÓÚµ÷ÊÔ
Ö÷Òª³¢ÊÔ¹ýÁ½ÖÖ·½·¨£º´òÓ¡»òµ¥²½µ÷ÊÔ
1.´òÓ¡£º printk ·ÖºÜ¶à¼¶±ðÐÅÏ¢£¬¹¦ÄÜÀàËÆÓÚcÓïÑÔµÄprintf, Ò»°ãÀ´ËµÐÅÏ¢´òÓ¡µ½/var/log/messages£¬¿Éͨ¹ýcatÃüÁî»òtailÃüÁî²é¿´
´ó¶àÊýÎÊÌⶼ¿ÉÒÔͨ¹ýprintkÀ´½â¾ö£¬È±µãÔÚÓÚ²»¹»Ö±¸Ð
2.µ÷ÊÔ¹¤¾ß£º GDB £¬KDB£¬KGDB
¶¼ÐèÒª±àÒëDEBUG°æ±¾Äںˡ£
KDBµ¥»ú»ã±à¼¶µ÷ÊÔ£¬ÐèÒªµ¥¶ÀÏÂÔØkernel¶ÔÓ¦µÄpatch£¬
GDBûÕûÃ÷°×,Ö»ÖªµÀ gdb vmlinuxÆô¶¯ºó ͨ¹ýadd-symobl-fileÔö¼Ó±»µ÷ÊÔÄ£¿éµÄ·ûºÅÐÅÏ¢
KGDB ÔÚ2.6.*ºó¾ÍÒÑȱʡ·ÅÔÚÄÚºËÔ´ÂëÀïÁË£¬ÆäËûµÄÐèÒªµ¥¶ÀÏÂÔØPATCH£¬·´ÕýÎÒµÄ2.6.18ÄÚºËÀïûÓУ¨ÔÚkernel.orgÖУ¬people/ark ÏÂÓ¦¸ÃÄÜÕÒµ½2.6.18µÄpatch,×¢Òâ´òpatchµÄ˳Ðò£© ²é¿´ÊÇ·ñÓÐKGDBµÄ·½·¨ÊÇ£ºÔ´Âë·¾¶ÏÂmake menuconfigºóÄÜ¿´µ½KGDBÕâÒ»Ïî¡£ÏÂÃæÖ÷Òª½éÉÜ2.6.18ÉÏKGDB»·¾³µÄ½¨Á¢£º
KGDBÐèÒªÁ½Ì¨»úÆ÷ÅäºÏ£¬Ò»¸ö¿ª·¢»ú£¬Ò»¸ö²âÊÔ»ú£¬Á½Ì¨»úÆ÷ͨ¹ý´®¿ÚÏßÁ¬½Ó£¨¸ÃÏßÊÇÐèÒª´¦ÀíµÄ£¬¾ßÌåµÄÓëwindowÉϵ÷ÊÔÇýµØµÄÒ»Ö£©
a.Ó²¼þÁ¬½ÓÐÔ²âÊÔ£ºÔÚ¿ª·¢»úÉÏ Ö´ÐÐ stty -ispeed 115200 -ospeed 115200 -F /dev/ttyS0
 
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
Ò»¸öÎļþ£¬³ýÁ˱¾Éí°üº¬µÄÄÚÈÝÒÔÍ⣬»¹»áÓÐÒ»¸öÃû×ÖºÍÆäËûһЩÓÃÓÚ¹ÜÀí·½ÃæµÄ“ÊôÐÔ”ÐÅÏ¢£¬±ÈÈçÎļþµÄ½¨Á¢/ÐÞ¸ÄÈÕÖ¾£¬ËüµÄ·ÃÎÊȨÏ޵ȡ£ÕâЩÊôÐÔ¶¼±»±£´æµ½Ò»ÖÐÎÒÃdzÆ֮Ϊinode£¨½Úµã£©µÄÊý¾Ý½á¹¹ÖУ¬ÎļþµÄ³¤¶ÈºÍËüÔÚ´ÅÅÌÉϵĴæ·ÅµØµãÒ²±£´æÔÚÕâÀϵͳʹÓõÄÊÇÎļþµÄ½Úµã±àºÅ£¬¶ø×ÓĿ¼½á¹¹Ö»²»¹ýÊÇΪ·½±ãÈËÃÇ ......
Ò³ÉêÇëµÄºËÐĵ÷ÓÃÊÇ: __alloc_pages(). Ò³ÉêÇë˳ÐòÈçÏ£º
Ê×ÏÈÕÒ×î´óÄÜ·ûºÏµÄ¿é, Èç¹ûÒ»¸ö¿ÕÏп鲻ÄÜÂú×ã, ¸ü¸ßÒ»¼¶µÄ¿é½«·Ö¸î³É2¸öbuddy, Ò»¸ö±»Õ¼ÓÃ, Ò»¸ö·ÅÈëµÍÒ»¼¶µÄfreelist.
µ±¿é±»ÊÍ·Åʱ, ¼ì²éÿ¶Ôbuddy, Èç¹ûÁ½Õ߶¼¿ÕÏÐ, °ÑËûÃǺϲ¢µ½¸ü¸ßÒ»¼¶µÄ¿éÊý×é ......
1¡¢ÍøÂçÂýµÄÔÒò£ºÍøÂçÎÊÌâ¾³£ÒÔÁ½ÖÖÐÎʽ³öÏÖ¡£µÚÒ»ÖÖÊÇÀ´×ÔÔ¶³Ì·þÎñÆ÷µÄÂýËÙÏìÓ¦£¬µÚ¶þÖÖÊÇÍêȫʧȥÁ¬½Ó¡£ÍøÂçÂýµÄ¸ùÔ´Ö÷ÒªÓÐÍø¿¨µÄË«¹¤ºÍËٶȵIJ»¼æÈÝ¡¢ÍøÂçÓµÈû¡¢²»Á¼µÄ·ÓÉ¡¢ÏßÀÂÎÊÌâ¡¢µç×è»òµç²¨¸ÉÈÅ¡¢Ô¶¶Ë·þÎñÆ÷¸ºÔعýÖØ¡¢DNSÅäÖò»µ±¡£Á¬½Ó¶ªÊ§µÄ¸ùÔ´Ö÷ÒªÓеçÔ´ÎÊÌâ¡¢Ô¶¶ËµÄ·þÎñÆ÷»ò³ÌÐò±»¹Øµô¡ ......
Linux±£´æÁËϵͳÖÐËù·¢ÉúʼþµÄÏêϸ¼Ç¼£¬ÕâЩ¼Ç¼³Æ×÷ÈÕÖ¾Îļþ»òÏûÏ¢Îļþ¡£¿ÉÒÔ²éÔÄÈÕÖ¾ÎļþÀ´È·¶¨ÏµÍ³µ±Ç°×´Ì¬£¬¹Û²ìÈëÇÖÕß×Ù¼££¬Ñ°ÕÒijÌض¨³ÌÐò(»òʼþ)Ïà¹ØµÄÊý¾Ý¡£syslogdÓëklogd(¼à¿ØlinuxÄÚºËÌá½»µÄÏûÏ¢)ÊØ»¤½ø³Ì¸ºÔð¼Ç¼£¬·¢ËÍϵͳ»ò¹¤¾ß²úÉúµÄÐÅÏ¢£¬¶þÕßµÄÅäÖÃÎļþ¶¼ÊÇ/etc/syslog.conf¡£µ±ÏµÍ ......