[ת]LinuxÄÚºËMakefileÎļþ£¨¶þ£©
=== 6 ÌåϵMakefileÎļþ
ÔÚ¿ªÊ¼½øÈë¸÷¸öĿ¼±àÒë֮ǰ£¬¶¥²ãMakefileÎļþÉèÖñàÒë»·¾³ºÍ×öЩ׼±¸¹¤×÷¡£¶¥²ãMakefileÎļþ°üº¬Í¨Óò¿·Ö£¬arch/$(ARCH) /Makefile°üº¬¸ÃÌåϵ¼Ü¹¹ËùÐèµÄÉèÖá£Òò´Ëarch/$(ARCH)/Makefile»áÉèÖÃһЩ±äÁ¿ºÍÉÙÁ¿µÄÄ¿±ê¡£
µ±±àÒëʱ½«°´ÕÕÒÔÏ´ó¸Å²½ÖèÖ´ÐУº
1) ÅäÖÃÄÚºË => ²úÉú .configÎļþ
2) ±£´æÄں˰汾µ½include/linux/version.hÎļþÖÐ
3) ·ûºÅÁ´½Óinclude/asm to include/asm-$(ARCH)
4) ¸üÐÂËùÓÐÄ¿±ê¶ÔÏóµÄÆäËüǰÌáÎļþ
- ¸½¼ÓǰÌáÎļþ¶¨ÒåÔÚarch/$(ARCH)/MakefileÎļþÖÐ
5) µÝ¹é½øÈëinit-* core* drivers-* net-* libs-*ÖеÄËùÓÐ×ÓĿ¼ºÍ±àÒëËùÓеÄÄ¿±ê¶ÔÏó
- ÉÏÃæ±äÁ¿Öµ¶¼ÒýÓõ½arch/$(ARCH)/MakefileÎļþ¡£
6) Á´½ÓËùÓеÄobjectÎļþÉú³ÉvmlinuxÎļþ£¬vmlinuxÎļþ·ÅÔÚ´úÂëÊ÷¸ùĿ¼Ï¡£
×ʼÁ´½ÓµÄ¼¸¸öobjectÎļþÁоÙÔÚarch/$(ARCH)/MakefileÎļþµÄhead-y±äÁ¿ÖС£
7) ×îºóÌåϵMakefileÎļþ¶¨Òå±àÒëºóÆÚ´¦Àí¹æÔòºÍ½¨Á¢×îÖÕµÄÒýµ¼Ó³Ïñbootimage¡£
- °üÀ¨´´½¨Òýµ¼¼Ç¼
- ×¼±¸initrdÓ³ÏñºÍÏà¹Ø´¦Àí
--- 6.1 ±äÁ¿ÉèÖÃ
LDFLAGS $(LD)Ò»°ãÑ¡Ïî
Ñ¡ÏîʹÓÃÓÚÁ´½ÓÆ÷µÄËùÓе÷ÓÃÖС£Í¨³£¶¨Òåemulation¾Í¿ÉÒÔÁË¡£
Example:
#arch/s390/Makefile
LDFLAGS := -m elf_s390
×¢Òâ: EXTRA_LDFLAGSºÍLDFLAGS_$@¿ÉÒÔ½øÒ»²½¶©ÖÆÊ¹ÓÃÑ¡ÏÇë²Î¿¼µÚ7Õ¡£
LDFLAGS_MODULE $(LD)Á´½ÓÄ£¿éµÄÑ¡Ïî
LDFLAGS_MODULEͨ³£ÉèÖÃ$(LD)Á´½ÓÄ£¿éµÄ.koÑ¡ÏĬÈÏΪ"-r"¼´¿ÉÖØ¶¨Î»Êä³öÎļþ¡£
LDFLAGS_vmlinux $(LD)Á´½ÓvmlinuxÑ¡Ïî
LDFLAGS_vmlinux¶¨ÒåÁ´½Ó×îÖÕvmlinuxʱÁ´½ÓÆ÷µÄÑ¡Ïî¡£LDFLAGS_vmlinuxÖ§³ÖʹÓÃLDFLAGS_$@¡£
Example:
#arch/i386/Makefile
LDFLAGS_vmlinux := -e stext
OBJCOPYFLAGS objcopyÑ¡Ïî
&
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâÆª·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´Ë×ªÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨ÕâÆª²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......
¹ÒÔØÎļþϵͳ£ºmount
¸ñʽ£ºmount [-²ÎÊý] [É豸Ãû³Æ] [¹ÒÔØµã]
³£ÓõIJÎÊý£º
¡¡¡¡ -t Ö¸¶¨É豸µÄÎļþϵͳÀàÐÍ£¬³£¼ûµÄÓУº
¡¡¡¡ minix linux×îÔçʹÓõÄÎļþϵͳ
¡¡¡¡ ext2 linuxĿǰ³£ÓõÄÎļþϵͳ
¡¡¡¡ msdos MS ......
Õª×Ôoldlinux£º
ÉϵçÖ´ÐеĵÚÒ»Ìõ´úÂëÊÇÔÚÄÚ´æÀïÂð£¿
“·ÃÎʵÄF000h : FFF0hÊÇÄÚ´æµÄµØÖ·»¹ÊÇ´æ·ÅbiosµÄromµØÖ·¡¡”¡¡
¡¡¡¡Õâ¸öÊÇÓɱ±ÇÅÄÚµÄÒ»¸ö¼Ä´æÆ÷ÉèÖõ썾ßÌåµÄ×ÊÁÏÄã¿ÉÒÔÈ¥ÕÒһЩоƬ×éµÄ×ÊÁÏ£©¡£µ±±±ÇÅÊÕµ½£Ã£Ð£ÕÍⲿµÄµØÖ·×ÜÏßÉϵÄÐźÅʱ£¬»á¸ù¾ÝÕâ¸ö¼Ä´æÆ÷ÄÚµÄÖµÀ´¾ö¶¨ÊÇ´ÓÄÚ´æÀïÈ¡ÄÚÈÝ»¹ÊǰÑÕâ¸öµØ ......