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
Ïà¹ØÎĵµ£º
vi
±à¼Æ÷ÊÇËùÓÐUnix¼°Linuxϵͳϱê×¼µÄ±à¼Æ÷£¬ËüµÄÇ¿´ó²»Ñ·É«ÓÚÈκÎ×îеÄÎı¾±à¼Æ÷£¬ÕâÀïÖ»ÊǼòµ¥µØ½éÉÜÒ»ÏÂËüµÄÓ÷¨ºÍһС²¿·ÖÖ¸Áî¡£ÓÉÓÚ¶Ô
Unix¼°LinuxϵͳµÄÈκΰ汾£¬vi±à¼Æ÷ÊÇÍêÈ«ÏàͬµÄ£¬Òò´ËÄú¿ÉÒÔÔÚÆäËûÈκνéÉÜviµÄµØ·½½øÒ»²½Á˽âËü¡£ViÒ²ÊÇLinuxÖÐ×î»ù±¾µÄÎı¾±à¼
Æ÷£¬Ñ§»áËüºó£¬Äú½«ÔÚLinuxµÄÊÀ½çÀ ......
¹ØÓÚWindowsÆô¶¯¹ý³Ì½éÉܵÄÎÄÕ¿Éν¶àÈçţ룬¶ø¶ÔÓÚLinuxµÄ½éÉÜÈ´ÊÇ·ïë÷ë½Ç¡£·²ÊÇÔø¾Ê¹ÓùýLinuxµÄÓû§¿ÉÄܶ¼»á×¢Òâµ½£¬µ±¼ÆËã»úÆô¶¯Ê±£¬ÆÁÄ»ÉÏ»á³öÏֺܶàÐÅÏ¢¡£Ò»°ãÇé¿öÏ£¬ÕâЩÐÅÏ¢ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔϵÄÃüÁî¿´µ½£º
¡¡¡¡
¡¡¡¡cat /var/log/dmesg | more
¡¡¡¡
¡¡¡¡
¡¡¡¡
¡¡¡¡ÕâЩÐÅÏ¢¾¿¾¹ÓÐʲôº¬Ò壿Õâ¸öÎÊÌâ¿´Æð ......
env setup
linux(ubuntu)ÏÂruby¿ª·¢»·¾³´î½¨£¬°üÀ¨Ò»Ð©³£¼ûÎÊÌâ½â¾ö
×¢Ò⣬±¾ÎÄÖ»ÊÇÎÒÔڴrubyѧϰ»·¾³Ê±µÄһЩ±Ê¼Ç£¬ÒòΪÊÇÓÃgedit±à¼µÄ£¬ËùÒÔ¸ñʽ»¯²»ÊǺܺã¬ÁíÍ⣬ֻÊDZ¸Íü¶øÒÑ¡£
2010.1.19
1. install ruby
$ tar xzf ruby-1.8.7-p248.tar.gz
$ mv ruby-1.8.7-p248 ruby187
$ cd ruby187/
$ ./configure
......
×î½üÔÚkernel ÀïÃæ coding, ÕÒÀ´Ò»Ð©×ÊÁÏ Ë³ÊÖÌùÀ´£¬·½±ã²éÕÒ¡££¨¸ÐлÔ×÷ÕßµÄŬÁ¦£¬ÈôÓаæȨÎÊÌ⣬ÇëÁªÏµ£©
ÓÐʱºòÐèÒªÔÚLinux kernel££´ó¶àÊÇÔÚÐèÒªµ÷ÊÔµÄÇý¶¯³ÌÐò££ÖжÁдÎļþÊý¾Ý¡£ÔÚkernelÖвÙ×÷ÎļþûÓбê×¼¿â¿ÉÓã¬ÐèÒªÀûÓÃkernelµÄһЩº¯Êý£¬ÕâЩº¯ÊýÖ÷ÒªÓУº filp_open() fi ......