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

LinuxÉ豸Çý¶¯ÖеIJ¢·¢¿ØÖÆ

²¢·¢Ó뾺̬
½â¾ö¾ºÌ¬ÎÊÌâµÄ;¾¶ÊDZ£Ö¤¶Ô¹²Ïí×ÊÔ´µÄ»¥³â·ÃÎÊ¡£
·ÃÎʹ²Ïí×ÊÔ´µÄ´úÂëÇøÓò³ÆΪÁÙ½çÇø£¬ÁÙ½çÇøÐèÒªÒÔijÖÖ»¥³â»úÖƼÓÒÔ±£»¤¡£ÖжÏÆÁ±Î¡¢Ô­×Ó²Ù×÷¡¢×ÔÐýËøºÍÐźÅÁ¿µÈÊÇLinuxÉ豸Çý¶¯ÖпɲÉÓõĻ¥³â;¾¶¡£
ÖжÏÆÁ±Î
ÖжÏÆÁ±Î½«Ê¹µÃÖжÏÓë½ø³ÌÖ®¼äµÄ²¢·¢²»ÔÙ·¢Éú£¬¶øÇÒ£¬ÓÉÓÚLinuxÄں˵Ľø³Ìµ÷¶ÈµÈ²Ù×÷¶¼ÒÀÀµÖжÏÀ´ÊµÏÖ£¬ÄÚºËÇÀÕ¼½ø³ÌÖ®¼äµÄ²¢·¢Ò²¾ÍµÃÒÔ±ÜÃâÁË¡£µ«ÊÇ£¬ÐèҪעÒâÊǵÄÊdz¤Ê±¼äµÄÖжÏÊÇΣÏյģ¬ÓпÉÄܵ¼ÖÂÊý¾Ý¶ªÊ§»ò×Åϵͳ±ÀÀ£¡£
local_irq_disable()ºÍlocal_irq_enable()¶¼Ö»ÄܽûÖ¹ºÍʹÄܱ¾CPUÄÚµÄÖжϣ¬²»Äܽâ¾öSMP¶àCPUÒý·¢µÄ¾ºÌ¬¡£
local_irq_save(flags)³ýÁ˽øÐнûÖ¹ÖжϲÙ×÷ÒÔÍ⣬»¹±£´æÄ¿Ç°CPUµÄÖжÏλÐÅÏ¢£¬local_irq_restore(flags)½øÐÐÏà·´µÄ²Ù×÷¡£
Èç¹ûÖ»Ïë½ûÖ¹Öжϵĵװ벿£¬Ó¦Ê¹ÓÃlocal_bh_disable(),ʹÄܵװ벿ʹÓÃlocal_bh_enable()¡£
Ô­×Ó²Ù×÷
Ô­×Ó²Ù×÷Ö¸µÄÊÇÔÚÖ´Ðйý³ÌÖв»»á±»±ðµÄ´úÂë·¾¶ËùÖжϵIJÙ×÷¡£
LinuxÄÚºËÌṩÁËһϵÁк¯ÊýÀ´ÊµÏÖÄÚºËÖеÄÔ­×Ó²Ù×÷£¬ÕâЩº¯ÊýÓÖ·ÖΪÁ½À࣬·Ö±ðÕë¶ÔλºÍÕûÐͱäÁ¿½øÐÐÔ­×Ó²Ù×÷¡£
 ÕûÐÍÔ­×Ó²Ù×÷
 1. ÉèÖÃÖµ void atomic_set(atomic_t *v,int i); Atomic_t v = ATOMIC_INT(0);
2. »ñÈ¡Öµ atomic_read(atomic_t *v);
3. ¼Ó¼õ void atomic_add(int i,atomic_t *v); void atomic_sub(int i,atomic_t *v);
4. ×ÔÔö×Ô¼õ void atomic_inc(atomic_t *v); void atomic_dec(atomic_t *v);
5. ²Ù×÷²âÊÔ int atomic_inc_and_test(atomic_t *v); int atomic_dec_and_test(atomic_t *v); int atomic_sub_and_test(int i, atomic_t *v);
²Ù×÷ºó²âÊÔÆäÖµÊÇ·ñΪ0£¬Îª0·µ»Øtrue£¬·ñÔò·µ»Øfalse¡£
6. ²Ù×÷·µ»Øint atomic_inc_and_return(atomic_t *v); int atomic_dec_and_return(atomic_t *v); int atomic_sub_and_return(int i, atomic_t *v); int atomic_add_and_return(int i, atomic_t *v);
²Ù×÷ºó·µ»ØÐÂÖµ¡£
 Î»Ô­×Ó²Ù×÷
 1. ÉèÖÃλ void set_bit(nr,void *addr); ÉèÖÃaddrµØÖ·µÄµÚnr룬¼´½«Î»Ð´1¡£
2. Çå³ýλ void clear_bit(nr,void *addr); ½«Î»Ð´Îª0¡£
3. ¸Ä±äλ void change_bit(nr,void *addr); ½«Î»½øÐз´Öá£
4. ²âÊÔλtest_bit(nr,void *addr); ·µ»ØµÚnrλ¡£
5. ²âÊÔ²Ù×÷int test_and_set_bit(nr,void *addr); int test_and_clear_bit(nr,void *addr); int test_and_change_bit(nr,void *a


Ïà¹ØÎĵµ£º

LinuxÄÚºËÅäÖÃÎĵµ(make menuconfig)

Ò»¡¢ÒýÑÔ£º
    ±¾ÎĵµµÄÄÚÈݴ󲿷ÝÄÚÈݶ¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´£¬È»ºóÅäºÏһЩеĽØͼ£¨Äں˰汾£ºV2.4.19£©¡£ÔÚÿһÅäÖÃÏîºó»áÓÐÒ»¸öÑ¡ÔñÖ¸ÄϵIJ¿·Ý£¬ÓÃÀ´Ö¸µ¼´ó¼ÒÔõôÑù¸ù¾Ý×Ô¼ºµÄÇé¿öÀ´×öÏàÓ¦µÄÑ¡Ôñ£»»¹ÓÐÔÚÿһ¸ö´óÏîºÍÎĵµµÄ×îºó»áÓÐÒ»¸ö¾­Ñé̸£¬ËüÊÇһЩ¸ßÊÖÃÇÔÚÓ¦¶ÔÎÊÌâºÍ´¦ÀíÌØÓÐÓ²¼þʱµÄһЩ¾­Ñ飨Õâ¸ö»¹µ ......

Linux²Ù×÷ϵͳÖ÷»úÃû(hostname)¼ò˵£¨v0.1b£©


×÷Õߣº±±ÄÏÄϱ±
À´×Ô£ºLinuxSir.Org
ÕªÒª£º±¾ÎÄÊǹØÓÚLinux²Ù×÷ϵͳÖ÷»úÃû(hostname)µÄÎĵµ£¬¶ÔÖ÷ÒªÅäÖÃÎļþ/etc/hosts½øÐмòÒªµÄ˵Ã÷ £»ÁíÍâ¶Ô»ùÅä¾ß¹¤¾ßhostnameÒ²½øÐÐÁ˾ÙÀý˵Ã÷£» »¶Ó­¸ßÊÖ¸«Õý£¬Ð»Ð»£»
Ŀ¼
 
2.1 Ö÷»úÃûÅäÖÃÎļþ /etc/hosts½â˵£»
2.2 Ö÷»úÃû(hostname)ºÍÓòÃû(Domain£©µÄÇø±ð£»
......

Linux ÄÚºËÆô¶¯·ÖÎö£¨×ª£©

Linux ÄÚºËÆô¶¯·ÖÎö
1.       ÄÚºËÆô¶¯µØÖ·
1.1.   Ãû´Ê½âÊÍ
ZTEXTADDR
½âѹ´úÂëÔËÐеĿªÊ¼µØÖ·¡£Ã»ÓÐÎïÀíµØÖ·ºÍÐéÄâµØÖ·Ö®·Ö£¬ÒòΪ´ËʱMMU´¦ÓڹرÕ״̬¡£Õâ¸öµØÖ·²»Ò»¶¨Ê±RAMµÄµØÖ·£¬¿ÉÒÔÊÇÖ§³Ö¶ÁдѰַµÄflashµÈ´æ´¢Öн顣
Start address of decompressor. here's no point ......

Linux/Unix環¾³ÏµÄmakeºÍmakefile詳½â

無論ÊÇÔÚLinux還ÊÇÔÚUnix環¾³ÖУ¬make¶¼ÊÇÒ»個·Ç³£ÖØÒªµÄ編譯Ö¸Áî¡£
²»¹ÜÊÇ×Ô¼º進ÐÐ項Ä¿開發還ÊÇ°²裝應ÓÃ軟體£¬ÎÒ們¶¼經³£ÒªÓõ½make»òmake install¡£ÀûÓÃmake¹¤¾ß£¬ÎÒ們¿ÉÒÔ將´óÐ͵Ä開& ......

ÎÒµÄlinuxûÓÐÉùÒôÁË

Ç°Ì쿪»úʵȻûÓÐÉùÒôÁË£¬ÔõôŪҲ²»ÐУ¬ÔÚÂÛ̳¹ÒÁËÒ»¸öÌû×Ó£¬µ½ÏÖÔÚҲûÓÐÈ˻ظ´¡£×òÌìÂèÂè¹ýÉúÈÕÎÒ»ØÂè¼ÒÈ¥ÁË£¬½ñÌì²Å»ØÀ´¡£ÎÒ´ò¿ª»úÆ÷ÅÎÍûÄܺÃÆðÀ´£¬½á¹û»¹ÊÇûÓÐÉùÒô¡£
1¡¢ÔÚ¿ØÖÆ̨ÏÂÓÐÉùÒô
 control+alt+f1Çл»µ½¿ØÖÆ̨£¬Ö®ºómplayer /mnt/wine/music/*.mp3   ½á¹ûÓÐÉùÒô
2¡¢´´½¨ÐÂÓû§ÓÐÉùÒô
useradd - ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ