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

Ubuntu8.04ϱàÒëlinuxÄÚºË

½ñÌì¿´µ½Ê¦ÐÖ¹¤Î»ÉÏÓб¾Linux Kernel In a Nutshell£¬»¹ÊÇȫӢµÄÓ°Ó¡°æ£¬ËùÒԾͽè¹ýÀ´¿´¿´£¬·¢ÏÖÏÖÔÚ¿´Ó¢ÎĵÄÊé½¥½¥ÊÊÓ¦ÁË£¬»¹ÊDZȽÏÈÝÒ׵ģ¬ÊéÖпªÊ¼½éÉÜÈçºÎ±àÒëLinuxÄںˣ¬LinuxÄں˴óÈýµÄʱºòҲѧ¹ý±àÒë¹ý£¬µ«Êǵ±Ê±±àÒë±È½Ï¼òµ¥£¬Õâ´Î¾ö¶¨ÔÙÖØÍ·µ½Î²ºÃºÃ±àÒëһϣ¬Ê×ÏÈÏÂÔØlinux kernel£¬ÔÙÓÃsecureCRTÉÏ´«µ½Ubuntu 8.04ÖУ¬½Ó×Å¿ªÊ¼±àÒë¡£
1£¬tar -xzvf linux-2.6.***
2£¬cd linux-2.6.***
3£¬make menuconfig
Ö´ÐÐÕâÌõÃüÁîʱ£¬³öÏÖÁËÎÊÌ⣬ºóÀ´ÉÏÍø²é£¬²éµ½ÁËÎÊÌ⣬´ð°¸ÈçÏ£º
hi. 
It's your distribution. Ubuntu doesn't come with the gcc headers installed. You can't even compile the simplest c application. 
All you have to do is to download the headers from the internet. The easisest way would be to use synaptic and to download 
the build-essential package. 
bye
http://forum.kernelnewbies.org/read.php?10,18,528
Ô­À´±ØÐë°²×°build-essential£¬°²×°ºÃºó£¬ÎÊÌâ½â¾ö¡£
4£¬Ö´ÐÐ make ÃüÁԴ´úÂë½øÐбàÒë
5£¬make modules_install install
6£¬


Ïà¹ØÎĵµ£º

linux¶¨Ê±Æ÷ÉèÖÃ

10.5.2 ¾«Í¨¶¨Ê±Æ÷ÉèÖÃ
º¯ÊýalarmÉèÖõĶ¨Ê±Æ÷Ö»Äܾ«È·µ½Ã룬¶øÒÔϺ¯ÊýÀíÂÛÉÏ¿ÉÒÔ¾«È·µ½Î¢Ã
#include  <sys/select.h>
#include  <sys/itimer.h>
int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval
*value, struct itimerval *ovalue ......

Linux GCC makeÎļþµÄд·¨2

ÎļþÔÚÁ½¸öÎļþ¼Ð£º
inc/hello.h
main/hello.c, main.c, Makefile
ÎļþÄÚÈÝ£º
hello.h
void hello(char name[]);

hello.c
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}

main.c
#include <stdio.h>
#include "../inc/hello.h"
// The second
int main( ......

Linux GCC makeÎļþµÄд·¨4 ÇåÎú°æ

°üº¬3¸öÎļþ¼Ð£¬ºÍÒ»¸öÎļþMakefile
Ŀ¼×éÖ¯½á¹¹ÈçÏ£º
Makefile
inc/hello.h
main/main.c
src/hello.c
MakefileÎļþÔÚÍâÃæ£¬ÕâÑùÉú³ÉµÄ.oºÍ¿ÉÖ´ÐÐÎļþ¶¼ÔÚÍâÃæ£¬cleanÖ®ºó»áºÜ¸É¾»£¬½á¹¹ÇåÎú
ÎļþÄÚÈÝÈçÏ£º
Makefile(Ö®ËùÒÔÓôóд£¬ÒòΪmake¿ÉÒÔʶ±ðMakefileºÍmakefile£¬Óôóд¿ÉÒÔÏÊÃ÷һЩ)::
# String declar ......

LinuxÄں˵Äͬ²½»úÖÆ

ÔÚ½øÈëÕýÎÄǰÏÈ¿´Ò»ÏÂÎÒÔÚÍøÉÏ¿´µ½µÄÌû×Ó£º
ÎÊ£ºatomic_set(v,i)µÄ¶¨ÒåÊÇÕâÑùµÄ:
#define atomic_set(v,i) v->counter=i
µ«ÊÇ£¬ÔÚi386Ìåϵ½á¹¹ÖУ¬²»ÄÜÖ±½Ó°ÑÒ»¸öÄÚ´æ²Ù×÷Êýͨ¹ýÒ»ÌõmovÖ¸Áî´æµ½ÁíÒ»¸öÄÚ´æ²Ù×÷ÊýÖУ¬
±ÈÈçÒª°Ñint32ÀàÐ͵ıäÁ¿ i ÉèÖÃ³É j£¬±ØÐë¾­¹ýÁ½ÌõÖ¸Áî:
mov eax,j
mov i,eax
Èç¹ûÕâÑùÀ ......

googleÔõÑùʹÓÃlinux£¨Äںˣ©


googleÔõÑùʹÓÃlinux£¨Äںˣ©
½ñÄêµÄlinuxÄں˿ª·¢´ó»áÉÏ£¬googleµÄ¿ª·¢ÈËÔ±Ò²ÉĮ̈×öÁËÃûΪ“how google use linux"µÄÑݽ²¡£ÎÒ¶·µ¨·­Òë×¢½âÒ»·¬——À¨ºÅÄÚΪע½â£¬»¶Ó­¶ÁÕ߸«Õý¡£
£¨Ç°Ã漸¶Î½²google¶Ôlinux kernel´úÂëµÄ¹ÜÀí¼°¸ú½ø£¬Æ«Ï¸Ë飬²»·­ÒëÁË£©
ÔÚgoogleΪlinux¼ÓÈëµÄ´úÂëÖУ¬3/4ÊǶÔÄں˺ËÐÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ