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

ǶÈëʽ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
Öеģ¬½ø


Ïà¹ØÎĵµ£º

[תÌû]LinuxÇý¶¯¿ª·¢Ñ§Ï°µÄһЩ±ØÒª²½Öè

 1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......

LinuxÏÂOpenEv±àÒë°²×°

 °ÑGDAL°²×°Ä¿Â¼ÏµÄ../bin/gdal-config¸´ÖƵ½/usr/bin/Ï£¬·ñÔò³öÏÖ“ÕÒ²»µ½gdal-config”
°Ñproj4°²×°Ä¿Â¼ÏµÄ../include/proj_api.h¸´ÖƵ½GDAL°²×°Ä¿Â¼ÖеÄincludeÖУ¬·ñÔò³öÏ֓䶨Òåproj_api.h”»òÕßÖ±½Ó°Ñproj4°²×°µ½Ä¬ÈÏ·¾¶£¬·ñÔò»áÌáʾ“ÕÒ²»µ½ -lproj”¡£ ......

Linux Kernel Threads in Device Drivers

 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ÏÂÔØ£¬°²×° £¬Ê¹ÓÃ)

 linuxÏÂÏë½âѹrarÎļþ ±ØÐë°²×°Èí¼þ£¬ÎÒʹÓõ½ÊÇrarlinux  
ÏÂÃæÊÇÏÂÔصØÖ·
rarlinux¹Ù·½ÍøÕ¾ÏÂÔصØÖ·
http://www.rarsoft.com/download.htm
°²×°                                  ......

²é¿´linux°æ±¾ÃüÁî

1. ²é¿´Äں˰汾ÃüÁ
1) [root@q1test01 ~]# cat /proc/version
Linux version 2.6.9-22.ELsmp (bhcompile@crowe.devel.redhat.com) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Mon Sep 19 18:00:54 EDT 2005
2) [root@q1test01 ~]# uname -a
Linux q1test01 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ