Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¿éÉ豸Çý¶¯ÏòLINUXÒÆÖ²µÄ³£¹æ²½Öè¼°INITRDµÄʹÓÃ

 ÕâÀïÌáµ½µÄ¿éÉ豸·ºÖ¸¸÷ÖÖ¿ÉÒÔʵÏ̶ֹ¨´óСÊý¾ÝËæ»ú´«ÊäµÄÉ豸£¬ÈçFLASH¡¢SD Card¡¢RAMDISKµÈ£¬¿éÉ豸Çý¶¯ÒÆÖ²µÄ¹ý³Ìʵ¼ÊÉÏÊǽ«Ó²¼þ³§ÉÌÌṩµÄµ×²ãÇý¶¯´úÂëÓëLINUXϵͳ¼¯³ÉÆðÀ´µÄ¹ý³Ì¡£
ÔÚLINUXÖУ¬¿éÉ豸Äܹ»ÒÔÎļþϵͳµÄÐÎʽΪOSËù·ÃÎÊ£¬Æä´óÌå¼Ü¹¹ÈçÏ£º
LINUX Application
---------------------------------- system call
LINUX VFS
----------------------------------
File System (vfat/ext2/cramfs..)
----------------------------------
Block Device Driver
---------------------------------- <-- Our working scope
LLD from vendor
----------------------------------
Hardware
ÒÆÖ²µÄ³£¹æ¹ý³ÌΪ£º
1. ÀûÓÃmodule_initºê½«É豸µÄ³õʼ»¯º¯Êýmydev_init×¢²áµ½kernel¾µÏñµÄ.init¶Î¡£µ±È»£¬»¹ÒªÀûÓÃmodule_exitºê×¢²áÈ¥³õʼ»¯º¯Êýmydev_cleanup¡£(ref: linux/init.h)
2. Ìî³ä³õʼ»¯º¯Êýmydev_init£¬Íê³ÉÒÔÏÂÈýÏ×÷
2.1 ʹÓÃregister_blkdev×¢²á¿éÉ豸ºÅºÍÉ豸Ãû¡£¡¡(ref: drivers/block/genhd.c)
2.2 ÉèÖÃqueue£ºÖ÷ÒªÊÇ»ñÈ¡queue²¢ÉèÖÃrequestº¯Êý£¬ÉèÖÃsector´óСµÈ¡£¡¡(ref: drivers/block/ll_rw_blk.c)
2.3 Ìí¼Ódisk£ºadd_disk¡£ (ref: drivers/block/genhd.c)
Éæ¼°µ½µÄÊý¾Ý½á¹¹°üÀ¨£º
a) struct request_queue (ref: linux/blkdev.h)£¬ 2.2ÖеÄqueue½á¹¹
b) struct gendisk (ref: linux/genhd.h)£¬ 2.3ÖеÄdisk½á¹¹£¬¹Ø×¢³ÉÔ± ->
major/first_minor/minors <- É豸ºÅ;
fopsÖ¸Õë <- ¿éÉ豸²Ù×÷º¯ÊýÖ¸Õë×é
queueÖ¸Õë <- 2.2ÖеÄqueue
private_dataÖ¸Õë <- ´æ´¢Óë¾ßÌåÉ豸Ïà¹ØµÄÊý¾Ý½á¹¹
c) struct mydev_dev,¼´b)ÖеľßÌåÉ豸Ïà¹ØµÄÊý¾Ý½á¹¹£¬Í¨³£°üº¬³ÉÔ±
size <- É豸ÖÐsectorµÄÊýÄ¿
users <- ʹÓÃÉ豸µÄÓû§ÊýÄ¿
media_change <- media change񈬀
lock <- ×ÔÐýËø
queue Ö¸Õë <- É豸µÄstruct request_queueÖ¸Õë
disk Ö¸Õë <- É豸µÄstruct gendiskÖ¸Õë
3. LINUX¿éÉ豸Çý¶¯µÄ²Ù×÷º¯ÊýÖ¸Õë×é
open: É豸´ò¿ªÊ±±»µ÷Óã¬Ö÷Òª¹¦ÄÜΪ³õʼ»¯µ×²ãÉ豸£»»òÈ¡µ×²ãÉ豸ÐÅÏ¢
release: É豸¹Ø±Õʱ±»µ÷Óá£
ioctl: ʵÏÖioctlϵͳµ÷Óõĺ¯Êý£¬ÓÉÓÚ´óÁ¿µÄ±ê×¼ÇëÇóΪÉϲã½ØÈ¡£¬Ò»°ã¿éÉ豸µÄioctl±È½Ï¶ÌС¡£
media_changed: Äں˵÷Óøú¯ÊýÒÔ¼ì²éÓû§ÊÇ·ñ¸ü»»ÁËÇý¶¯Æ÷ÄڵĽéÖÊ£¬Èç¹ûÓû§¸ü»»ÁË£¬ÄÇô·µ»ØÒ»¸ö·ÇÁãµÄÖµ¡£ÕâÊÇÕë¶Ô¿ÉÒƶ¯½éÖʵġ£
revalidate_dis


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

¹Ø±ÕÔÚLINUXÖÕ¶Ëϵݴ¼ü¾¯±¨Éù

 Ö´ÐÐÏÂÁдúÂ룬²»ÐèҪȫִÐУ¬ÈÎÒâÒ»ÐоͿÉÒÔÁË¡£
setterm -bleng 0
setterm -blength 0
xset b off
===========
ÏÂÃæÁíÒ»ÖÖ·½·¨
ÁÙʱµÄ·½°¸
sudo rmmod pcspkr
¶ÔÓÚDebian/UbuntuµÄÓû§À´Ëµ£¬Ö»Òª´ò¿ªÄãµÄÖÕ¶ËÅÜÒ»ÏÂÉÏÊöµÄÃüÁî¾Í¿ÉÒÔÁË¡£¶ÔÓÚCentOS/Redhat/RHEL/FedoraµÄLinuxÓû§£¬ÔòÐèÒªÒÔrootÉí·ÝµÇ¼Ȼº ......

ÔÚlinux»·¾³Ï±àÒëavrµ¥Æ¬»ú³ÌÐò

¿´µ½¹«Ë¾µÄÀÏÍⶼÊÇÓÃLinux±àÒëAVRµÄ³ÌÐò£¬¸Ð¾õºÜÇ¿£¬¶øÇÒ±¾ÈËÒ²ºÜϲ»¶linux£¬ËùÒÔ¾ö¶¨½øÐÐѧϰ£¬ÏּǼһÏÂѧϰ¹ý³Ì£º
1.±àÒëÎÒÃǵÄËã·¨Îļþ£¬Ò²¾ÍÊÇÀÏÍâÒÔÇ°·¢¸øÎÒÃÇÕâ±ßµÄ¹ØÓÚËã·¨µÄ.oÎļþ¡£Óöµ½Ð¡À§ÄÑ£¬Ìáʾfor' loop initial declaration used outside C99 mode
   £¬ ......

linux CentOS 5.3 yumÔ´ÅäÖùý³ÌÏê½â

Ô­Îļû
http://hi.baidu.com/dilijia1002/blog/item/405d8e19407cdc73dab4bd18.html 
1.ÒÔrootÓû§½øÈëCentOSϵͳ¡£
[root@xuxy ~]# cd /etc/yum.repos.d
2.±¸·Ýrepo
[root@xuxy yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
3.½¨Á¢ÐµÄCentOS-Base.repoÎļþ£º£¨ÒÔCentOS 5.3ΪÀý£©
[root@xuxy yum ......

Linux¸öÈË·À»ðǽµÄÉè¼ÆÓëʵÏÖ


Linux¸öÈË·À»ðǽµÄÉè¼ÆÓëʵÏÖ
http://netsecurity.51cto.com/  2006-02-16 11:25    ¼ÆËã»ú°²È«  ÎÒÒªÆÀÂÛ()
ÕªÒª£º±¾ÎÄÉè¼ÆµÄÊÇÒ»¸ö»ùÓÚLinuxÖ÷»úµÄ°ü¹ýÂËÐ͸öÈË·À»ðǽ£¬ËüʵÏֵŦÄܺÍÏÖ½ñÊг¡ÉÏÁ÷ÐеķÀ»ðǽÓо޴ó²î¾à¡£Ëæ׿¼ÊõµÄ²»¶Ï·¢Õ¹£¬·À»ðǽҲ´¦ÓÚ²»¶ÏµÄ±ä»¯Ö®ÖС£·À»ðǽ¼¼Êõ¾­ÀúÁË°ü¹ý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ