µÚÊ®¶þÕ Îļþ¹ÜÀí¼°LinuxʵÏÖÎÊÓë´ð
µÚÊ®¶þÕ Îļþ¹ÜÀí¼°LinuxʵÏÖÎÊÓë´ð
12.1 ʲôÊÇÎļþ£¿Ëü°üº¬ÄÄЩÄÚÈÝ£¿ÓÐʲôÌص㣿
´ð£ºÎļþÊÇÐÅÏ¢µÄÒ»ÖÖ×éÖ¯ÐÎʽ£¬ÊÇ´æ´¢ÔÚÍâ´æÉϵľßÓбêʶÃûµÄÒ»×éÏà¹ØÐÅÏ¢¼¯ºÏ¡£Îļþ°üº¬µÄÄÚÈÝÓУºÔ´³ÌÐò¡¢¶þ½øÖÆ´úÂë¡¢Îı¾Îĵµ¡¢Êý¾Ý¡¢±í¸ñ¡¢ÉùÒôºÍͼÏóµÈ¡£
Îļþ¾ßÓеÄÌصãÈçÏ£º
¢Ù Îļþ¾ßÓб£´æÐÔ£¬Ëü±»´æ´¢ÔÚijÖÖ´æ´¢½éÖÊÉÏ£¬³¤ÆÚ±£´æºÍ¶à´ÎʹÓá£
¢Ú ÎļþÊÇ°´Ãû´æÈ¡µÄ£¬Ã¿¸öÎļþ¾ßÓÐΨһµÄ±êʶÃû£¬Í¨¹ý±êʶÃûÀ´´æÈ¡ÎļþÖеÄÐÅÏ¢£¬¶ø²»ÐèÒªÁ˽âÎļþÔÚ´æ´¢½éÖÊÉϵľßÌåÎïÀíλÖá£
¢Û ÎļþµÄÄÚÈÝÊÇÒ»×éÐÅÏ¢µÄ¼¯ºÏ£¬ÐÅÏ¢¿ÉÒÔÊÇÔ´´úÂë³ÌÐò¡¢¶þ½øÖÆ´úÂë¡¢ÎļþÎĵµ¡¢Êý¾Ý±í¸ñ¡¢ÉùÒôºÍͼÏóµÈ¡£
12.2ÎļþϵͳҪ½â¾öÄÄЩÎÊÌ⣿ÐéÄâÎļþϵͳҪ½â¾öÄÄЩÎÊÌ⣿
´ð£ºÎļþϵͳµÄÖ÷ҪĿ±êÊÇÌá¸ß´æ´¢¿Õ¼äµÄÀûÓÃÂÊ£¬ËüÒª½â¾öµÄÖ÷ÒªÎÊÌâÓУºÍê³ÉÎļþ´æ´¢¿Õ¼äµÄ¹ÜÀí£¬ÊµÏÖÎļþÃûµ½ÎïÀíµØÖ·µÄת»»£¬ÊµÏÖÎļþºÍĿ¼µÄ²Ù×÷£¬ÌṩÎļþ¹²ÏíÄÜÁ¦ºÍ°²È«´ëÊ©£¬ÌṩÓѺõÄÓû§½Ó¿Ú¡£ÎļþϵͳÏòÓû§ÌṩÁËÓйØÎļþºÍĿ¼²Ù×÷µÄ¸÷ÖÖ¹¦ÄܽӿںÍϵͳµ÷Óã¬ÈçÃüÁî½Ó¿Ú¡¢³ÌÐò½Ó¿ÚºÍ½»»¥½Ó¿ÚµÈ¡£
ÐéÄâÎļþϵͳµÄÖ÷Òª¹¦ÄÜÊÇ¿ÉÒÔʹ¶àÖÖ±¾µØµÄ»òÕßÔ¶³ÌµÄÎļþϵͳ¹²´æÓÚͬһ̨»úÆ÷ÉÏ¡£ËüµÄÖ÷ÒªÉè¼ÆÄ¿±êÊÇÄÚºËÀïÌṩһ¸ö¶ÔÎļþ½øÐзÃÎʺͲÙ×ݵĿò¼Ü£¬ÒÔ¼°ÔÚÄÚºËÓëʵÏÖרÃÅÎļþϵͳµÄÄ£¿éÖ®¼äÌṩһ¸öÑϸñ¶¨ÒåµÄ½Ó¿Ú¡£ÐéÄâÎļþϵͳÓм¸¸öÖØÒªµÄÉè¼ÆÄ¿±ê£º
¢Ù ¸ÃϵͳӦ¸Ãͬʱ֧³Ö¼¸ÖÖÎļþϵͳÀàÐÍ¡£ÆäÖаüÀ¨UNIXÎļþϵͳºÍ·ÇUNIXÎļþϵͳ¡£
¢Ú ²»Í¬µÄ´ÅÅÌ·ÖÇø¿ÉÒÔ°üº¬²»Í¬ÀàÐ͵ÄÎļþϵͳ¡£È»¶ø£¬Ò»µ©°²×°ÔÚÆäËûÎļþϵͳÉÏ£¬ËüÃÇÓ¦¸ÃºÍ´«Í³µÄµ¥Ò»ÎļþϵͳûÓÐÇø±ð¡£Óû§¶ÔÕû¸öÎļþϵͳµÄÊÓͼӦ¸ÃÒ»Ö£¬¶øÒâʶ²»µ½×ÓÊ÷ÔÚ´ÅÅ̽ṹÉϵIJî±ð¡£
¢Û Ó¦¸Ã¶Ôͨ¹ýÍøÂç¹²ÏíÎļþÌṩÍêÈ«µÄÖ§³Ö¡£·ÃÎÊÔ¶³Ì½ÚµãÉÏÎļþϵͳӦ¸ÃºÍ·ÃÎʱ¾µØ½ÚµãµÄÎļþϵͳÍêÈ«Ò»Ñù¡£
¢Ü ³§¼ÒÓ¦¸Ã¿ÉÒÔ¿ª·¢ËûÃÇ×Ô¼ºÐèÒªµÄÎļþϵͳ²¢ÇÒÒÔÄ£¿é·½Ê½¼ÓÈëµ½ÄÚºËÖÐÈ¥¡£
12.3Ϊʲôÿ¸ö½ø³Ì¶¼ÓÐÒ»¸öȱʡµÄÎļþ´´½¨ÑÚÂ룿Õâ¸öÑÚÂë´æ·ÅÔÚʲôµØ·½£¿
´ð£ºÄÚºËΪÿ¸ö½ø³ÌÉèÖõÄÒ»¸öȱʡµÄÎļþ´´½¨ÑÚÂ룬ÊÇÒ»¸öȨÏÞλÑÚÂ룬ÓÃÓÚΪ½ø³Ìд´½¨µÄÎļþÉèÖóõʼÎļþÐí¿ÉȨ¡£
Õâ¸öÑÚÂë´æ·ÅÔÚstruct fs_struct½á¹¹ÀàÐÍÖУ¬¸Ã½á¹¹µÄµØÖ·°üº¬ÔÚ½ø³Ì¿ØÖÆ¿éPCBµÄfs³ÉÔ±ÖС£¸Ã½á¹¹¶¨ÒåÈçÏ£º
struct fs_struct{
&nbs
Ïà¹ØÎĵµ£º
¾¹ýÉÏÊöµÄ¼¸¸ö²½Öè¡£µÚÒ»¸öÄ¿±ê£¬´úÂëÄܹ»±àÒëͨ¹ý»ù±¾ÉÏÊDz»»áÓÐʲôÎÊÌâµÄ¡£Ö»Òª°ÑÎպöþ¸öÐ޸ĴúÂëµÄ»ù±¾ÔÔò£¬µÚÒ»¡£ÒýÈëеĴúÂ룬¶ø²»ÐÞ¸ÄÔÓеĴúÂë¡£ÔÚûÓа취½øÐе÷ÊÔÇ°ÐÞ¸ÄÔ´´úÂëÊDz»ÔÊÐíµÄ£¬Ð޸ĵIJ»ºÃ¾Í»áÒýÆð×îºó´úÂëÔËÐÐÂß¼µÄ»ìÂÒ£¬¶øÇÒÔÚ´úÂëÄܹ»ÔËÐÐ֮ǰÊǺÜÄÑ·¢ÏÖÎÊÌâµÄ¡£ËùÒÔ³ý·Ç·Ç³£ÓаÑÎÕ£¬·ñÔò²»Òª ......
2010-3-8
Ò»¡¢gccµ÷ÊÔ£º
Èç¹û±àÒëʱ£¬Ê¹ÓÃÏÂÃæµÄÖ¸Áî(Ôö¼ÓÁ˲ÎÊý-g)£¬¾Í»áÉú³É´øÔ´´úÂëµ÷ÊÔ·ûºÅµÄ¿ÉÖ´ÐÐÎļþ¡£±àÒëÐγɵĿÉÖ´ÐÐÎļþÓÐ7KB¡£Ö®ËùÒÔÔö¼ÓÁË2KB£¬¾ÍÊÇÒòΪÔö¼ÓµÄµ÷ÊÔ·ûºÅ¡£
gcc -o calc calcutlator.c -g
½øÒ»²½µØ£¬¾Í¿ÉÒÔÖ´ÐÐÏÂÃæµÄÖ¸ÁîÆô¶¯µ÷ÊÔ¹¤¾ß½øÈëµ÷ÊÔ»·¾³¶Ô³ÌÐò½øÐе÷ÊÔÁË¡£
gdb calc
ÔÚµ÷ÊÔ»·¾³Ï ......
Linux I2CºËÐÄ¡¢×ÜÏßÓëÉ豸Çý¶¯
×¢:
ÔÚlinux2.6.32°æ±¾ÖÐÓÐÕâÑùµÄ´úÂëÓë×¢ÊÍ:
struct i2c_driver {
unsigned int class;
/* Notifies the driver that a new bus has appeared or is about to be
* removed. You should avoid using this if y ......
²»ÖªµÀÔÚʲçÛʱºò£¬×ªÔØLinux ³öÏÖÁË module ÕâÖÖ¶«Î÷£¬µÄÈ·£¬ËüÊÇ Linux µÄÒ»´ó¸ïС£ÓÐÁË module Ö®ºó£¬Ð´
device driver ²»ÔÙÊÇÒ»Ïî¶ñÃΣ¬ÐÞ¸Ä kernel Ò²²»ÔÙÊÇÒ»¼þÍ´¿àµÄÊÂÁË¡£ÒòΪÄã²»ÐèҪÿ´ÎÒª²âÊÔ driver ¾ÍÖØÐÂ
compile kernel Ò»´Î¡£ÄǼòÖ±ÊÇ»áÀÛËÀÈË¡£Module ¿ÉÒÔÔÊÐíÎÒÃǶ¯Ì¬µÄ¸Ä±ä kernel£¬¼ÓÔØ device
dri ......
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
Linux
·¢ÐаæÓë
Linux
²úÆ·Á½ÕßÏà²îºÜ´ó£¬ÓÐʱÈÝÒ×»ìÏý£¬·¢ÉúÎó½â£¬ÉõÖÁÒªÄÖ³ö´óЦ»°À´¡£ÎªÊ²Ã´£¿
´Ó×ÖÃæÉÏÀ´½²£¬·¢Ðа棨
Distribution
£©ºÍ²úÆ ......