ǶÈëʽLinuxÖ®Kernel£¨²Ã¼õÒÆÖ²£©Æô¶¯µ÷ÊÔ¼¼Êõ
ǶÈëʽϵͳ´î½¨¹ý³ÌÖУ¬¶ÔÓÚϵͳƽ̨´î½¨¹¤³ÌʦÔÚÍê³ÉBootloader
µÄµ÷ÊÔÖ®ºó¾Í½øÈëKernel
²Ã¼õÒÆÖ²µÄ½×¶Î£¬ÆäÖÐ×îÖØÒªµÄÒ»²½ÊÇKernel
Æô¶¯µÄµ÷ÊÔ£¬ÔÚµ÷ÊÔKernel
¹ý³ÌÖÐͨ³£Óöµ½×î³£¼ûµÄÎÊÌâÊÇÆô¶¯Òì³£:
Uncompressing Linux............................................................
...........................
done, booting the kernel.(
¹ÒËÀÔÚ´Ë´¦)
µ¼ÖÂÇý¶¯Òì³££¨Æô¶¯¹ÒËÀ£©µÄÔÒòÓкܶ࣬Èç»ùÓÚEVM
°åµÄ
Ó²¼þ×öÁËÐ޸ģ¨Èç¸ü¸ÄÁËFLASH
¿Õ¼ä´óС¡¢µØÖ·ºÍÐͺţ¬¸ü¸ÄÁËSDRAM
¡¢DDR SDRAM
¿Õ¼ä´óС¡¢µØÖ·ºÍÐͺţ¬¸ü¸ÄÁ˾§ÕñƵÂʵȣ©£¬°å¿¨IDºÅ²»Ö§³ÖµÈ¡£ÄÇôÈçºÎ½øÐе÷ÊÔÄÇ£¬ÆäʵÓÐÁ½ÖÖµ÷ÊÔ¼¼Êõ±È½ÏÓÐЧ¡£
Kernel
Æô¶¯µ÷ÊÔ¼¼Êõ-
ʹÓÃprintascii()
º¯Êý¸ú×Ùstart_kernel()
ÓÐûÔËÐÐ
£¬ÔÚbooting the kernel
Ö®ºóKernel
×îÏÈÖ´ÐеÄÊÇstart_kernel()
º¯Êý£¬È·ÈÏstart_kernel()
ÓзñÖ´ÐоÍÊÇÔÚÆ俪ʼ´úÂë¶ÎÌí¼Óprintascii("start_kernel
…")
£¬Èç¹û´®¿ÚûÓдòÓ¡³östart_kernel
…£¬ËµÃ÷start_kernel()
ûÓÐÔËÐУ¬ÄÇô¿ÉÄܵÄÔÒòÓÐBootloader
ÅäÖõÄÆô¶¯²ÎÊý´íÎó¡¢
Kernel
¼ÓÔص½(DDR) SDRAM
µÄµØÖ·²»ÕýÈ·£¬
Kernel
±àÒëʱָ¶¨µÄ(DDR) SDRAM
ÔËÐеØÖ·²»ÕýÈ·µÈ¡£ÕâÑù¾ÍÐèÒªÒ»ÏîÒ»ÏîÅŲé´íÎ󣬵±´íÎó±»ÅŲéÍê±Ï£¬Í¨³£´òÓ¡³ö
start_kernel
…ÊÇÖÖ±ØÈ»£¬Èç¹û´òÓ¡³öÕâÒÇÐÅϢ˵Ã÷
KernelÒÑ
½øÈëµ½start_kernel()
Ö´ÐУ¬Èç¹û´ËʱÓд®¿ÚÆô¶¯´òÓ¡¾Í±È½Ï³É¹¦ÁË£¬Èç¹ûÈÔȻûÓдòÓ¡Æô¶¯ÐÅÏ¢£¬¾ÍÐèÒªÁíÍâÒ»ÖÖµ÷ÊÔ¼¼Êõ¡£
¸½´úÂëÐ޸ģºinit/main.c
<<-
…
extern void printascii(const char*);
//
Modify
asmlinkage void __init
start_kernel(void)
{
char *
command_line;
extern struct
kernel_param __start___param[], __stop___param[];
printascii("start_kernel
…");
//
Modify
smp_setup_processor_id();
…
->>
Kernel
Æô¶¯µ÷ÊÔ¼¼Êõ-
ʹÓÃprintascii()
º¯Êý´òÓ¡printk()
»º´æÐÅÏ¢
£¬Èç¹ûKernelÒѽøÈëµ½start_kernel()
Ö´ÐУ¬ÈÔȻûÓÐÆô¶¯ÐÅÏ¢´òÓ¡³öÀ´£¬ËµÃ÷´®¿Ú²¨ÌØÂʳöÎÊÌâµÄ¿ÉÄÜÐԱȽϴó£¬Æô¶¯ÐÅÏ¢ÊÇÔÝʱ»º´æµ½ÁÙʱbuffer--printk_buf
Öеģ¬½ø
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
Purpose
This examples shows how to create and stop a kernel thread.
The driver is implemented as a loadable module. In the init_module() routine five kernel threads are created. This kernel threads sleep one second, wake up, print a message and fall asleep again. On unload of the module (cle ......
linuxÏÂÏë½âѹrarÎļþ ±ØÐë°²×°Èí¼þ£¬ÎÒʹÓõ½ÊÇrarlinux
ÏÂÃæÊÇÏÂÔصØÖ·
rarlinux¹Ù·½ÍøÕ¾ÏÂÔصØÖ·
http://www.rarsoft.com/download.htm
°²×° ......
1.¸ÅÄîºÍÇø±ð£º
¾²Ì¬¿â¾ÍÊÇÔÚ±àÒë¹ý³ÌÖÐһЩĿ±êÎļþµÄ¼¯ºÏ¡£¾²Ì¬¿âÔÚ³ÌÐòÁ´½ÓµÄʱºòʹÓã¬Á´½ÓÆ÷»á½«³ÌÐòÖÐʹÓõ½º¯ÊýµÄ´úÂë´Ó¿âÎļþÖп½±´µ½Ó¦ÓóÌÐòÖС£Ò»µ©Á´½ÓÍê³É£¬ÔÚÖ´ÐгÌÐòµÄʱºò¾Í²»ÐèÒª¾²Ì¬¿âÁË¡£
ÓÉÓÚÿ¸öʹÓþ²Ì¬¿âµÄÓ¦ÓóÌÐò¶¼ÐèÒª¿½±´ËùÓú¯ÊýµÄ´úÂë£¬Ë ......
×î½ü¿ªÊ¼×ªÏòLinux¿ª·¢£¬ÐèÒªÓõ½¶àÏ̡߳£ÉÏÍøÒ»²é£¬ÓеÄÈË˵LinuxûÓÐÏß³ÌÖ»Óнø³Ì£¬ÓеÄÈË˵Linuxµ±È»ÓÐỊ̈߳¬Ã»ÓÐÏß³Ìpthread¿âÊǸÉÂðµÄ£¿NPTLÓÖÊǸÉÂïÓã¿
¸öÈ˾õµÃ£¬Òª¿´´ÓÄĸö½Ç¶ÈÀ´¿´Õâ¸öÎÊÌâ¡£¶ÔÓÚÒ»°ãÓ¦ÓÃÈí¼þ¿ª·¢ÈËÔ±µÄ½Ç¶ÈÀ´¿´£¬¼ÈÈ»ÄÜÓÃpthread¿âÀ´´´½¨Ị̈߳¬ÒÔ¼°¿ÉÒÔ´¦ÀíÏ̼߳äµÄͨÐÅ£¬µ±È»¿ÉÒÔÈÏΪÔÚL ......