LinuxÉ豸Çý¶¯Ö®——¹¹½¨ÄÚºËÊ÷
ѧLinuxÒ»Äê¶àÁË£¬¶ÔÇý¶¯µÄ֪ʶһµã¶¼Á˽⣬ÉÏÖÜÂòÁ˱¾¡¶LinuxÉ豸Çý¶¯¡·£¬O'REILLY³ö°æ£¬´òËãѧϰѧϰ¡£Ñ§Ï°¹ýµÄ´óÏÀ£¬Ï£Íû¿ÉÒÔÖ¸µ¼Ö¸µ¼¡£
Ê×ÏÈÏÂÔØLinuxÄںˣ¬°´×÷ÕßµÄ˵·¨£¬Ö»ÒªÊÇlinux-2.6.xxxµÄÄں˶¼¿ÉÒÔ£¬ÎÒµÄÊÇlinux-2.6.33.2¡£ÓÐÎ»ÍøÓÑ˵ÏÂÔØºó×îºÃ½âѹµ½/usr/src/Ŀ¼Ï£¬½âѹ
ÔÚ¹¹½¨ÄÚºËÊ÷ÊDzο¼ÁËÔÊéµÚËÄÕ“µ÷ÊÔ¼¼Êõ”£¬ÅäÖÃÁ˼¸Ìõµ÷ÊÔʱ¿ÉÄÜ»áÓõ½µÄÑ¡Ïî,ÕâЩѡÏî´ó¶àÔÚ“kernel hacking“²Ëµ¥ÖУº
CONFIG_DEBUG_KERNEL£ºÊ¹ÆäËûµ÷ÊÔÑ¡Ïî¿ÉÓÃ
CONFIG_DEBUG_SLAB£º´ò¿ªÄÚºËÄÚ´æ·ÖÅ亯ÊýÖеĶà¸öÀàÐͼì²é
CONFIG_DEBUG_PAGEALLOC£ºÔÚÊÍ·Åʱ£¬È«²¿ÄÚ´æÒ³´ÓÄں˵ØÖ·¿Õ¼äÖÐÒÆ³ö¡£¸ÃÑ¡Ï´ó´ó½µµÍÔËÐÐËÙ¶È£¬µ«¿ÉÒÔ¿ìËÙ¶¨Î»Ìض¨µÄÄÚ´æË𻵴íÎóµÄËùÔÚλÖÃ
CONFIG_DEBUG_SPINLOCK
CONFIG_DEBUG_SPINLOCK_SLEEP
CONFIG_INIT_DEBUG
CONFIG_DEBUG_INFO
Ïà¹ØÎĵµ£º
¡¡I2C×ÜÏß¾ßÓнṹ¼òµ¥Ê¹Ó÷½±ãµÄÌØµã¡£±¾ÎÄÃèÊöÁËlinuxÏÂI2CÇý¶¯µÄ½á¹¹£¬²¢ÔÚ´Ë»ù´¡Éϸø³öÁËI2CÉ豸Çý¶¯ºÍÓ¦ÓõÄʵÏÖ¡£
¡¡¡¡1 ÒýÑÔ
¡¡¡¡I2C (Inter£Integrated Circuit)×ÜÏßÊÇÒ»ÖÖÓÉPHILIPS¹«Ë¾¿ª·¢µÄÁ½Ïßʽ´®ÐÐ×ÜÏߣ¬ÓÃÓÚÁ¬½Ó΢¿ØÖÆÆ÷¼°ÆäÍâΧÉ豸¡£I2C×ÜÏß×îÖ÷ÒªµÄÓŵãÊÇÆä¼òµ¥ÐÔºÍÓÐЧÐÔ¡£ÓÉÓÚ½Ó¿ÚÖ±½ÓÔÚ×é¼þÖ ......
×î½üÔÚ¿´Linux 2.6.21Äں˵ÄI2CÇý¶¯£¬Ò²ÔÚÍøÉϲéÁËÒ»ÏÂ×ÊÁÏ£¬ÓдíÒ²Óжԣ¬ÓÐЩÐĵ㬼ǼÏÂÀ´°É¡£ÀïÃæÈÏʶ»òÐí¶àÓв»µ±Ö®´¦£¬»¹¿ÒÇëÖ¸Õý¡£
1. I2C ÐÒé
1.1 I2C×ÜÏß¹¤×÷ÔÀí
I2C×ÜÏßÊÇÓÉÊý¾ÝÏßSDAºÍʱÖÓSCL¹¹³ÉµÄ´®ÐÐ×ÜÏߣ¬¸÷ÖÖ±»¿ØÖÆÆ÷¼þ¾ù²¢ÁªÔÚÕâÌõ×ÜÏ ......
Ò»¡¢df
1.×÷ÓÃ
dfÃüÁîÓÃÀ´¼ì²éÎļþϵͳµÄ´ÅÅ̿ռäÕ¼ÓÃÇé¿ö£¬Ê¹ÓÃȨÏÞÊÇËùÓÐÓû§¡£
2.¸ñʽ
df [options]
3.Ö÷Òª²ÎÊý
£s£º¶Ôÿ¸öNames²ÎÊýÖ»¸ø³öÕ¼ÓõÄÊý¾Ý¿é×ÜÊý¡£
£a£ºµÝ¹éµØÏÔʾָ¶¨Ä¿Â¼Öи÷Îļþ¼°×ÓĿ¼Öи÷ÎļþÕ¼ÓõÄÊý¾Ý¿éÊý¡£Èô¼È²»Ö¸¶¨£s£¬Ò²²»Ö¸¶¨£a£¬ÔòÖ»ÏÔʾNamesÖеÄÿһ¸öĿ¼¼°ÆäÖеĸ÷×ÓĿ¼ËùÕ¼µÄ ......
CentOS Èç¹ûÄãϲ»¶RHµÄ²úÆ·£¬¶øÄãÓÖÌÖÑáFC4µÄÓ·Ö×£¬ÄÇô³¢ÊÔÒ»ÏÂCentOS°É£¬µ±Äã´ò¿ªÕâ¸ö·¢ÐаæµÄʱºò£¬ÏàÐÅÄã»á´ó½ÐÒ»Éù£º"Õâ²»¾ÍÊÇRedhatô"£¬Êǵģ¬Õâ¸ö°æ±¾ÍêȫʹÓÃRHµÄsrpmÉú³Éϵͳ£¬¶øÇÒÐÔÄÜÒ²ºÜ²»´í¡£
Debian Õâ¸ö·¢Ðа汾ÔÚËùÓз¢Ðа汾ÀïÃæ¿°³Æ×îÑϽ÷µÄ£¬aptÈí¼þ°ü¹ÜÀí»úÖÆ¿ÉÒÔÈÃÓû§¿ìËÙ½¨Á¢ÆðÀ´¸ßЧµÄ²Ù×÷ϵͳ¡£ ......
Linked from: http://www.faqs.org/docs/Linux-mini/C++-dlopen.html
//1.==== main.cpp =============================================================
// How to build?
// g++ main.cpp -ldl
//=============================================================================
#include "polygon.h"
......