LinuxÄÚºËMakefiledzÎö£¨×ª
1£® ÅäÖÃϵͳµÄ»ù±¾½á¹¹
LinuxÄں˵ÄÅäÖÃϵͳÓÉÈý¸ö²¿·Ö×é³É£¬·Ö±ðÊÇ£º
Makefile£º·Ö²¼ÔÚ Linux ÄÚºËÔ´´úÂëÖÐµÄ Makefile£¬¶¨Òå Linux Äں˵ıàÒë¹æÔò£»
ÅäÖÃÎļþ£¨config.in£©£º¸øÓû§ÌṩÅäÖÃÑ¡ÔñµÄ¹¦ÄÜ£»
ÅäÖù¤¾ß£º°üÀ¨ÅäÖÃÃüÁî½âÊÍÆ÷£¨¶ÔÅäÖýű¾ÖÐʹÓõÄÅäÖÃÃüÁî½øÐнâÊÍ£©ºÍÅäÖÃÓû§½çÃ棨Ìṩ»ùÓÚ×Ö·û½çÃæ¡¢»ùÓÚ Ncurses ͼÐνçÃæÒÔ¼°»ùÓÚ Xwindows ͼÐνçÃæµÄÓû§ÅäÖýçÃ棬¸÷×Ô¶ÔÓ¦ÓÚ Make config¡¢Make menuconfig ºÍ make xconfig£©¡£
ÕâЩÅäÖù¤¾ß¶¼ÊÇʹÓýű¾ÓïÑÔ£¬Èç Tcl/TK¡¢Perl ±àдµÄ£¨Ò²°üº¬Ò»Ð©Óà C ±àдµÄ´úÂ룩¡£±¾ÎIJ¢²»ÊǶÔÅäÖÃϵͳ±¾Éí½øÐзÖÎö£¬¶øÊǽéÉÜÈçºÎʹÓÃÅäÖÃϵͳ¡£ËùÒÔ£¬³ý·ÇÊÇÅäÖÃϵͳµÄά»¤Õߣ¬Ò»°ãµÄÄں˿ª·¢ÕßÎÞÐëÁ˽âËüÃǵÄÔÀí£¬Ö»ÐèÒªÖªµÀÈçºÎ±àд Makefile ºÍÅäÖÃÎļþ¾Í¿ÉÒÔ¡£ËùÒÔ£¬ÔÚ±¾ÎÄÖУ¬ÎÒÃÇÖ»¶Ô Makefile ºÍÅäÖÃÎļþ½øÐÐÌÖÂÛ¡£ÁíÍ⣬·²ÊÇÉæ¼°µ½Óë¾ßÌå CPU Ìåϵ½á¹¹Ïà¹ØµÄÄÚÈÝ£¬ÎÒÃǶ¼ÒÔ ARM ΪÀý£¬ÕâÑù²»½ö¿ÉÒÔ½«ÌÖÂÛµÄÎÊÌâÃ÷È·»¯£¬¶øÇÒ¶ÔÄÚÈݱ¾Éí²»²úÉúÓ°Ïì¡£
2£® Makefile
2.1 Makefile ¸ÅÊö
Makefile µÄ×÷ÓÃÊǸù¾ÝÅäÖõÄÇé¿ö£¬¹¹Ôì³öÐèÒª±àÒëµÄÔ´ÎļþÁÐ±í£¬È»ºó·Ö±ð±àÒ룬²¢°ÑÄ¿±ê´úÂëÁ´½Óµ½Ò»Æð£¬×îÖÕÐÎ³É Linux Äں˶þ½øÖÆÎļþ¡£
ÓÉÓÚ Linux ÄÚºËÔ´´úÂëÊÇ°´ÕÕÊ÷Ðνṹ×éÖ¯µÄ£¬ËùÒÔ Makefile Ò²±»·Ö²¼ÔÚĿ¼Ê÷ÖС£Linux ÄÚºËÖÐµÄ Makefile ÒÔ¼°Óë Makefile Ö±½ÓÏà¹ØµÄÎļþÓУº
Makefile£º¶¥²ã Makefile£¬ÊÇÕû¸öÄÚºËÅäÖᢱàÒëµÄ×ÜÌå¿ØÖÆÎļþ¡£
.config£ºÄÚºËÅäÖÃÎļþ£¬°üº¬ÓÉÓû§Ñ¡ÔñµÄÅäÖÃÑ¡ÏÓÃÀ´´æ·ÅÄÚºËÅäÖúóµÄ½á¹û£¨Èç make config£©¡£
arch/*/Makefile£ºÎ»ÓÚ¸÷ÖÖ CPU ÌåϵĿ¼Ï嵀 Makefile£¬Èç arch/arm/Makefile£¬ÊÇÕë¶ÔÌض¨Æ½Ì¨µÄ Makefile¡£
¸÷¸ö×ÓĿ¼Ï嵀 Makefile£º±ÈÈç drivers/Makefile£¬¸ºÔðËùÔÚ×ÓĿ¼ÏÂÔ´´úÂëµÄ¹ÜÀí¡£
Rules.make£º¹æÔòÎļþ£¬±»ËùÓÐµÄ Makefile ʹÓá£
Óû§Í¨¹ý make config ÅäÖú󣬲úÉúÁË .config¡£¶¥²ã Makefile ¶ÁÈë .config ÖеÄÅäÖÃÑ¡Ôñ¡£¶¥²ã Makefile ÓÐÁ½¸öÖ÷ÒªµÄÈÎÎñ£º²úÉú vmlinux ÎļþºÍÄÚºËÄ£¿é£¨module£©¡£ÎªÁË´ïµ½´ËÄ¿µÄ£¬¶¥²ã Makefile µÝ¹éµÄ½øÈëµ½Äں˵ĸ÷¸ö×ÓĿ¼ÖУ¬·Ö±ðµ÷ÓÃλÓÚÕâЩ×ÓĿ¼ÖÐµÄ Makefile¡£ÖÁÓÚµ½µ×½øÈëÄÄЩ×ÓĿ¼£¬È¡¾öÓÚÄں˵ÄÅäÖá£ÔÚ¶¥²ã Makefile ÖУ¬ÓÐÒ»¾ä£ºinclude arch/$(ARCH)/Makefile£¬°üº¬ÁËÌض¨ CPU Ìåϵ½á¹¹Ï嵀 Makefile£¬Õâ¸ö Makefile Öаüº¬ÁËƽ̨Ïà¹ØµÄÐÅÏ¢¡£
λÓÚ¸÷¸
Ïà¹ØÎĵµ£º
LinuxϵĽø³ÌͨÐÅÊֶλù±¾ÉÏÊÇ´ÓUnixƽ̨ÉϵĽø³ÌͨÐÅÊֶμ̳жøÀ´µÄ¡£¶ø¶ÔUnix·¢Õ¹×ö³öÖØ´ó¹±Ï×µÄÁ½´óÖ÷Á¦AT&TµÄ±´¶ûʵÑéÊÒ¼°BSD£¨¼ÓÖÝ´óѧ²®¿ËÀû·ÖУµÄ²®¿ËÀûÈí¼þ·¢²¼ÖÐÐÄ£©ÔÚ½ø³Ì¼äͨÐÅ·½ÃæµÄ²àÖصãÓÐËù²»Í¬¡£Ç°Õ߶ÔUnixÔçÆڵĽø³Ì¼äͨÐÅÊֶνøÐÐÁËϵͳµÄ¸Ä½øºÍÀ©³ä£¬ÐγÉÁË“ ......
LinuxϵͳµÄSNMP·þÎñÉèÖÃ
1) °²×°SNMP
ÂÔ£¬Çë²ÎÔÄLINUXϵͳSNMP°²×°ËµÃ÷£¬Ò»°ãÇé¿öÏÂLinuxÖеľùÒѾ×Ô¶¯°²×°ÁËSNMP·þÎñ¡£ÒÔÏÂÃüÁî¿ÉÒÔ¼ì²âSNMP·þÎñÊÇ·ñ°²×°ÒÔ¼°°²×°µÄÎļþ°ü¡£
[root@idc ~]# rpm -qa |grep snmp
net-snmp-libs-5.1.2-11.EL4.7
net-snmp-5.1.2-11.EL4.7
2) ÅäÖÃSNMP
°´ÕÕÈçÏ·½Ê½ÐÞ¸Ä/etc ......
SBC2440Ñз¢°åϵÄLINUXµÄ°²×°
±¾ÎļþÊǶԓSBC2440ϵͳ°²×°ºÍ¸üÐÂÖ¸ÄÏ.pdf£¨ÔÚÑз¢°å¸½Ë͵ĹâÅÌϾÍÄÜÕÒµ½£©”µÄ²¹³ä˵Ã÷£¨ºìÉ«×ÖÌ岿·Ö£©¡£
Ê×ÏȽøÈëVIVIģʽ£º·½·¨ÊÇÏÈ´ò¿ªWINDOWSϵÄÖÕ¼«Öնˣ¬ÉèÖúø÷ÖÖ²ÎÊý£¨¾ßÌåÉèÖüû“SBC2440Ö®³õÌåÑé.pdf£¨ÔÚÑз¢°å¸½Ë͵ĹâÅÌϾÍÄÜÕÒµ½£©”£¬Ê¹COM1´¦ÔÚ× ......
ϵͳµ÷ÓÃÊÇÓ¦ÓóÌʽºÍ²Ù×÷ϵͳÄÚºËÖ®¼äµÄ¹¦Äܽӿڡ£ÆäÖ÷ҪĿµÄÊÇʹµÃÓû§
ÄÜʹÓòÙ×÷ϵͳÌṩµÄÓйØÉ豸¹ÜÀí¡¢ÊäÈë/ÊäÈëϵͳ¡¢ÎļþϵͳºÍ½ø³Ì¿ØÖÆ¡¢
ͨÐż°´æ´¢¹ÜÀíµÈ·½ÃæµÄ¹¦ÄÜ£¬¶ø²»±ØÁ˽âϵͳ³ÌʽµÄÄÚ²¿½á¹¹ºÍÓйØÓ²¼þϸ
½Ú£¬´Ó¶øÆðµ½¼õÇáÓû§¸ºµ£ºÍ±£»¤ÏµÍ³¼°Ìá¸ß×ÊÔ´ÀûÓÃÂʵÄ×÷Óᣠ......
1.ʱ¼ä±íʾ
ÔÚ³ÌÐòµ±ÖÐ,ÎÒÃǾ³£ÒªÊä³öϵͳµ±Ç°µÄʱ¼ä,±ÈÈçÎÒÃÇʹÓÃdateÃüÁîµÄÊä³ö½á¹û¡£Õâ¸öʱºòÎÒÃÇ¿ÉÒÔʹÓÃÏÂÃæÁ½¸öº¯Êý
time_t time(time_t *tloc); //ʱ¼ä¾«¶ÈΪÃë
char *ctime(const time_ ......