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

linux driver net

http://www.cublog.cn/u/2108/showart_223258.html
LinuxÄÚºËÊý¾Ý°ü´¦ÀíÁ÷³Ì£­Êý¾Ý°ü½ÓÊÕ
ÓëÆä˵ÕâƪÎÄÕ·ÖÎöÁËÍø¿¨Çý¶¯ÖÐÖÐÊý¾Ý°üµÄ½ÓÊÕ£¬»¹²»Èç˵ÊÇÒÔe100ΪÀý£¬¶ÔÍø¿¨Çý¶¯±àдµÄÒ»¸ö˵Ã÷¡£
µ±È»£¬¶ÔÊý¾Ý°üµÄ½ÓÊÕ˵µÄºÜÇå³þ¡£
תÔØ
Êý¾Ý°üµÄ½ÓÊÕ
×÷Õߣºkendo
Kernel£º2.6.12
Ò»¡¢´ÓÍø¿¨ËµÆð
Õâ²¢·ÇÊÇÒ»¸öÍø¿¨Çý¶¯·ÖÎöµÄרÃÅÎĵµ£¬Ö»ÊǶÔÍø¿¨´¦ÀíÊý¾Ý°üµÄÁ÷³Ì½øÐÐÒ»¸öÖصãµÄ·ÖÎö¡£ÕâÀïÒÔIntelµÄe100Çý¶¯ÎªÀý½øÐзÖÎö¡£
´ó¶àÊýÍø¿¨¶¼ÊÇÒ»¸öPCIÉ豸£¬PCIÉ豸¶¼°üº¬ÁËÒ»¸ö±ê×¼µÄÅäÖüĴæÆ÷£¬¼Ä´æÆ÷ÖУ¬°üº¬ÁËPCIÉ豸µÄ³§ÉÌID¡¢É豸IDµÈµÈÐÅÏ¢£¬Çý¶¯
³ÌÐòʹÓÃÀ´ÃèÊöÕâЩ¼Ä´æÆ÷µÄ±êʶ·û¡£ÈçÏ£º
CODE:
struct pci_device_id {
        __u32 vendor, device;                /* Vendor and device ID or PCI_ANY_ID*/
        __u32 subvendor, subdevice;        /* Subsystem ID's or PCI_ANY_ID */
        __u32 class, class_mask;        /* (class,subclass,prog-if) triplet */
        kernel_ulong_t driver_data;        /* Data private to the driver */
};
ÕâÑù£¬ÔÚÇý¶¯³ÌÐòÖУ¬³£³£¾Í¿ÉÒÔ¿´µ½¶¨ÒåÒ»¸östruct pci_device_id ÀàÐ͵ÄÊý×飬¸æËßÄÚºËÖ§³Ö²»Í¬ÀàÐ͵Ä
PCIÉ豸µÄÁÐ±í£¬ÒÔe100Çý¶¯ÎªÀý£º
#define INTEL_8255X_ETHERNET_DEVICE(device_id, ich) {\
        PCI_VENDOR_ID_INTEL, device_id, PCI_ANY_ID, PCI_ANY_ID, \
        PCI_CLASS_NETWORK_ETHERNET << 8, 0xFFFF00, ich }
       
static struct pci_device_id e100_id_table[] = {
        INTEL_8255X_ETHERNET_DEVICE(0x1029, 0),
        INTEL_8255X_ETHERNET_DEVICE(0x1030, 0),
        INTEL_8255X_ETHERNET_DEVICE(0x1031, 3),
……/*ÂÔ¹ýÒ»´ó¶ÑÖ§³ÖµÄÉ豸*/
        { 0, }
};
ÔÚÄÚºËÖУ¬Ò»¸öPCIÉ豸£¬Ê¹ÓÃstruct pci_driver½á¹¹À´ÃèÊö£¬
struct pci_driver {
        struct list_head node;
        char *name;
&


Ïà¹ØÎĵµ£º

ºó¼ÌÎÞÈË£ºLinuxºËÐÄά»¤ÈËÔ±ÈÕ½¥²ÔÀÏ

    Ò»ÄêÒ»¶ÈµÄLinux¿ª·¢Õß´ó»áÉÏÖÜÔھɽðɽ¾ÙÐУ¬»áÉÏLinux»ù½ð»áÖ´ÐÐÀíÊÂJim Zemlin±íʾ£¬µÃÒæÓÚÔƼÆËãÒÔ¼°ÆäËü¿Æ¼¼³±Á÷µÄ³öÏÖ£¬LinuxµÄÊг¡µØλʮ·ÖÎȹ̣¬È»¶øһЩÖ÷ÒªµÄά»¤ÈËÔ±ÒѾ­ÈÕ½¥²ÔÀÏ£¬ºó¼ÌÕßÈ´»¹Ã»ÓгÉÊì¡£
   sysfsÄÚºË×Óϵͳά»¤ÕßGrey Kroah-HartmanÖ¸³ö£º“ÉϲãµÄÈËÔ±ÈÔȻà ......

Ïê½âLinuxÏÂOracleµÄ¾²Ä¬°²×°


ÔÚijЩÌØÊâµÄÇé¿öÏ£¬ÈçÒòΪÍøÂç»òÕßXÅäÖõĹØϵÎÞ·¨Á¬½Óµ½X server»òÕßÖ÷»úÉÏûÓÐX£¬¾Í¿ÉÒÔʹÓþ²Ä¬°²×°µÄ·½Ê½°²×°Êý¾Ý¿â£¬Í¬ÑùÈç¹ûÐèÒª´ó¹æÄ£²¿Êð£¬Ôò¾²Ä¬°²×°½«»á´ó´ó¼õÇáDBAµÄÖظ´ÀͶ¯Á¦£¬¶øÇÒ¾²Ä¬°²×°²»ÐèÒªX£¬´Ó°²×°Ð§ÂÊ  
ÔÚijЩÌØÊâµÄÇé¿öÏ£¬ÈçÒòΪÍøÂç»òÕßXÅäÖõĹØϵÎÞ·¨Á¬½Óµ½X server»òÕßÖ÷»úÉÏûÓÐX£ ......

linuxÆô¶¯¹ý³Ì

linuxÆô¶¯Á÷³Ì£º
ϵͳԤ´¦Àí³ÌÐò->GRUB  (´Ë½×¶Î¿ÉÒÔÀí½âΪbootloader½×¶Î)
->kernel   (´Ë½×¶ÎΪkernel)
->initrd->initÆô¶¯->inittab->rc.sysinit->functions(PATH)->modules->rcX.d(¶ÁÅäÖÃÎļþ)
1.->×Ö·ûģʽ->tty->bash
2.->ͼÐÎģʽ->½øÈëX Window-> ......

linux convertͼÏñ´¦ÀíÃüÁî

¡¡¼¸¸ö¼òµ¥µÄÓ¦Óá£
¡¡¡¡1¡¢ÅúÁ¿Í¼Ïñ¸ñʽת»»
¡¡¡¡Èç¹ûÏ뽫ijĿ¼ÏµÄËùÓÐjpgÎļþת»»ÎªpngÎļþ£¬Ö»ÒªÔÚÃüÁîÐÐģʽÏÂÊäÈë:
¡¡¡¡for %f in (*.jpg) do convert “%f” “%~nf.png”
¡¡¡¡2¡¢¶ÔËùÓÐͼÏñ½øÐÐͬһ²Ù×÷
¡¡¡¡Æ©È磬ÅúÁ¿Éú³ÉijĿ¼ÏÂËùÓÐPNGͼÏñÎļþµÄËõÂÔͼ(´óСΪ80×40):
¡¡¡¡fo ......

LINUX쵀iptables

Ô­Ìû£ºhttp://www.cnscn.org/read.php?tid-44684.html
iptablesÓÐÈýÖÖÁ´
1£ºINPUT (½øÀ´µÄÁ´)
2£ºOUTPUT(³öÈ¥µÄÁ´)
3£ºFORWARD(ת·¢µÄÁ´)
iptables -A INPUT -p icmp -j DROP
-A(Ìí¼ÓÒ»¸öÁ´) -p ЭÒé -j(Ìí¼Ó¶¯×÷) ˵Ã÷Ìí¼ÓÒ»¸ö½øÀ´µÄÁ´¡£Ð­ÒéÊÇicmp¶¯×÷¾Ü¾ø¡£
iptables -L -n (ÓÃÊ÷ÐνṹÀ´¿´Ò»ÏÂiptablesµÄÉèÖÃ)
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ