Linux NAND FLASHÇý¶¯´úÂë·ÖÎö
×÷Õߣº·¶Ò»º½,»ªÇåÔ¶¼ûÉîÛڸ߼¶½²Ê¦
FLASHÇý¶¯ÔÚǶÈëʽϵͳÖÐÓÐמÙ×ãÇáÖصÄλÖ㬶øÄ¿Ç°Êг¡ÉÏNAND FLASHµÄ¼Û¸ñÓÖÒª±ãÒËÓëNOR FLASH,Ëæ×ÅÔ½À´Ô½¶àµÄƽ̨֧³Ö´ÓNAND FLASHÖÐÆô¶¯£¬ÕÆÎÕNAND flashµÄÇý¶¯±àдÓÐ×ÅÖØÒªµÄÏÖʵÒâÒ壬ÓÉÓÚÄÚºËÒѾÍê³ÉÁ˴󲿷ֵŤ×÷£¬Êµ¼Ê¹¤×÷Öд󲿷ֹ¤³Ìʦ¶ÔNAND FLASHÇý¶¯Ö»ÊǼòµ¥µÄÐ޸ģ¬¶ÔÆ乤×÷ÔÀí²¢²»Ì«Çå³þ£¬ÏÂÃæÎÒÃÇÀ´·ÖÎöÒ»ÏÂNAND FLASHµÄ´úÂëÁ÷³Ì£¬´ÓÖÐÌå»á¿éÉ豸µÄ´úÂëÖ®ÃÀ¡£
ÔÚѧϰNAND FLASHÇý¶¯Ö®Ç°£¬ÎÒÃÇÐèÒª¶Ô¿éÉ豸ÖÐÏÂÃæµÄÖØÒª2µãÓиöÈÏʶ£º
1.gendisk: ÃèÊö¿éÉ豸ʵÌå(Ò»Õû¸önandflashоƬ)µÄ½á¹¹Ìå
Õû¸ö¿éÉ豸µÄ×¢²á¹ý³Ì¶¼ÊÇΧÈÆgendiskÀ´¿ªÕ¹µÄ
2. add_disk() // ½«Ò»¸ö·ÖÇøÐÅÏ¢(Èç/dev/mtdblock3)×¢²áµ½ÄÚºËÁбíÖÐ
ÏÂÃæÎÒÃÇÀ´·ÖÎö¾ßÌåµÄÇý¶¯£º
Ò»¡¢s3c2410nandflash¿ØÖÆÆ÷³õʼ»¯²½Öè:
s3c2410_nand_init(&s3c2410_nand_driver)
-> driver_register->bus_add_driver()->driver_attach->bus_for_each_dev(__driver_attach)->driver_probe_device()->dev->probe() [×îºóÕâ¸öº¯ÊýʵÖÊÊÇs3c2410_nand_probe()]
-> s3c2410_nand_probe()
-> s3c24xx_nand_probe()
-> s3c2410_nand_inithw() // ³õʼ»¯nandflash¿ØÖÆÆ÷
-> s3c2410_nand_init_chip()// ³õʼ»¯s3c2410 nandflashÇý¶¯×îµ×²ãµÄ·ÃÎÊ¿ØÖƺ¯Êý
&nbs
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
1.·ÖÇøÓë¸ñʽ»¯ÔÀí
Ó²Å̵ķÖÇø·ÖÖ÷MBR£¨446byte£©,Ö÷·ÖÇø±í(64byte)£¬·ÖÇø.
2.ʹÓÃlinuxÖеÄfdisk·ÖÇø
fdisk /dev/sdb
p ´òÓ¡·ÖÇø±í
t ת»»·ÖÇø±í
w д½ø·ÖÇø±í
n н¨·ÖÇø
v ¼ì²é·ÖÇø
×¢£ºfdiskʹÓÃÍêÒªÖØÐÂÆô¶¯.ÐÂÓ²Å̲»ÓÃ.
3.linuxµÄ¸ñʽ»¯Èí¼þ
mkfs-Ö§³Öext2,ext3,vfat,msdos,jfs,reiserfsµÈ
Ó÷¨1£ºmkfs ......
ÓйØlinuxϽø³ÌÓëÏ߳̿´¹ýºÜ¶àÎÄÕ£¬ÎÒ¾õµÄÕâƪ¿ÉÒÔ˵×î¾µä
£££££££££££££££££££££££££££££££££
Ò».»ù´¡ÖªÊ¶£ºÏ̺߳ͽø³Ì
°´Õս̿ÆÊéÉϵĶ¨Ò壬½ø³ÌÊÇ×ÊÔ´¹ÜÀíµÄ×îСµ¥Î»£¬Ïß³ÌÊdzÌÐòÖ´ÐеÄ×îСµ¥Î»¡£ÔÚ²Ù×÷ϵͳÉè¼ÆÉÏ£¬´Ó½ø³ÌÑÝ»¯³öỊ̈߳¬×îÖ÷ÒªµÄÄ¿µÄ¾ÍÊǸüºÃµÄÖ§³ÖSMPÒÔ¼°¼õÐ ......
×î½üÔÚkernel ÀïÃæ coding, ÕÒÀ´Ò»Ð©×ÊÁÏ Ë³ÊÖÌùÀ´£¬·½±ã²éÕÒ¡££¨¸ÐлÔ×÷ÕßµÄŬÁ¦£¬ÈôÓаæȨÎÊÌ⣬ÇëÁªÏµ£©
ÓÐʱºòÐèÒªÔÚLinux kernel££´ó¶àÊÇÔÚÐèÒªµ÷ÊÔµÄÇý¶¯³ÌÐò££ÖжÁдÎļþÊý¾Ý¡£ÔÚkernelÖвÙ×÷ÎļþûÓбê×¼¿â¿ÉÓã¬ÐèÒªÀûÓÃkernelµÄһЩº¯Êý£¬ÕâЩº¯ÊýÖ÷ÒªÓУº filp_open() fi ......