Linux Çý¶¯¿ª·¢âÒ¶¡½âÅ£Ö®¶þ —— Ä£¿é±à³Ì
±¾ÎÄÊǽ¨Á¢ÔÚÇ°ÃæµÄ¿ª·¢»·¾³ÒѾ³É¹¦½¨Á¢µÄ»ù´¡Ö®Éϵġ£Èç¹ûûÓн¨Á¢ºÃ£¬Çë²ÎÕÕ¡¶ Linux Çý¶¯¿ª·¢âÒ¶¡½âÅ£Ö®Ò» —— ¿ª·¢»·¾³µÄ½¨Á¢¡·¡£
ÒѾÓкܶàÎĵµ½²ÊöÄ£¿é±à³Ì£¬¸öÈ˾õµÃ¡¶ The Linux kernel module programming guide ¡·ÊÇ×îÏ꾡µÄ¡£±¾ÎIJ»ÔÙÁ¢×ãÓÚ´ÓÀíÂÛÉÏÈ¥²ûÊöÄ£¿é±à³ÌµÄÏà¹ØÖªÊ¶£¬¶ø×ÅÖØ´Óʵ¼ùµÄ»ù´¡ÉÏÈ¥ÕÆÎÕÄ£¿é±à³Ì£¬ÁìÎòÄ£¿é±à³ÌµÄʵÖÊ¡£µ±È»£¬¾ß±¸×ã¹»µÄÀíÂÛ֪ʶ²ÅÄÜ´Óʵ¼ù³ö·¢£¬ËùÒÔ£¬±¾Îĵµ¾¡Á¿ÅäºÏ¡¶ Linux Device Driver ¡·µÚÈý°æµÄµÚ¶þÕ£¬ÒÔ¼°½²ÊöÄ£¿é±à³Ì×îÍêÉÆµÄÎĵµ¡¶ The Linux kernel module programming guide ¡·¡£ÏÂÃæ£¬ÎÒÃÇ´Óʵ¼ù¿ªÊ¼³ö·¢°É¡£
1. ÈËÖ®³õ£¨ hello world £©
/*
* hello.c - The first kernel module programming
*/
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_ALERT */
#include <linux/init.h>
MODULE_LICENCE( “ Dual BSD/GPL ” );
static int hello_init(void)
{
printk(KERN_INFO "Hello world\n");
/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}
static void hello_exit(void)
{
printk(KERN_INFO "Goodbye world\n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_AUTHOR(“dreamice, jyjiang2005@gmail.com ”);
MODULE_DESCRIPTION(“The first module program”);
MODULE_VERSION(“V1.0”);
MODULE_ALIAS(“Chinese: ren zhi chu”);
Makefile:
obj-m := hello.o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
clean:
$(RM) *.o *.ko *.mod.c Module.symvers
ÏÖÔÚ£¬ÎÒÃÇÒ»²½Ò»²½À´½âÎöÕâ¸ö×î¼òµ¥µÄhello world Ä£¿é³ÌÐò¡£
1£® /linux/module.h Õâ¸öÊDZØÐëµÄ¡£Õâ¸öÍ·Îļþ°üº¬Á˶ÔÄ£¿é½á¹¹µÄ¶¨ÒåÒÔ¼°Ïà¹ØÐÅÏ¢¡£
2£® module_init ºÍ module_exit ÕâÁ½¸öº¯ÊýÊDZØÐëµÄ¡£ module_init ¾ÍºÃ±ÈÓ¦ÓóÌÐòµÄ main º¯Êý£¬Ã»ÓÐ main º¯Êý£¬Ó¦ÓóÌÐò½«²»ÖªµÀ´ÓÄÄÀ↑ʼִÐС£
3£®¹ØÓÚ printk £¬ÔÚ ldd3 µÄµÚËÄÕÂÓÐÏêϸµÄ˵Ã÷£¬Õâ¸ö¿ÉÒÔ˵ÊÇÄں˵÷ÊÔµÄÒ»¸ö»ù±¾ÊֶΡ£
4£® MODULE_LICENCE £¬ MODULE_AUTHOR £¬ MODULE_DESCR
Ïà¹ØÎĵµ£º
¾¹ý¼è¿àµÄ·Ü¶·£¬ÖÕÓڸ㶨ÁËfedoraϵͳ´Ó°²×°µ½3DÌØÐ§(±¾È˰²×°µÄÊÇfedora
11)£¬ÎªÁË·½±ãºóÀ´µÄlinuxer£¬ÌØÁôϱ¾È˵ÄÈ«¹ý³ÌÒÔ¹©²Î¿¼¡£ÒÔϲ½ÖèÓеÄÀ´×ÔÓÚgoogleËÑË÷£¬Óв¿·ÖÀ´×ÔÓÚ¼ÎÓÓÖÐÎIJ©¿Í
£¨http://www.my-guides.net/en/content/view/164/26/£©£¬²¢¸Ðл¸÷·½Ç°±²µÄ±Ê¼£¡£
1.Ìí¼Órpm fusionÔ´
rpm -ivh
http://do ......
----------------------------------------------------------------------------------------------------------------------------------------
/**/
/*
********************************************************************************************************
* @Description:s3c2410µÄrtcÇý¶¯µÄʵ ......
½ñÌìÖÕÓÚ°ÑOmapL137µÄ°å×ÓÅÜÆðÁËLinuxºÍÆä´øµÄdemo¡£ºÏÖÚ´ï¶ÔÕâ¸ö°å×Ó¶«Î÷×öµÄºÜÉÙ£¬°Ñomapl137µÄÌØµã¶¼Ã»ÓÐչʾ³öÀ´¡£¿É¾Í¿àÁËÎÒÃÇÕâЩÏëÒªÓÃÕâ¸öƬ×ÓµÄÈËÁË¡£¹úÄÚÍæÕâ¸öµÄÈË»¹²»¶à£¬ËùÓÐ×ÊÁϾÍÓ²×ÅͷƤÂýÂýÄ¥°É¡£
ǰ¶Îʱ¼äubootÊÇÓÉdspÄDZßÓÃnandwrite¹¤³Ìд½øÀ´µÄ£¬ÆäУÑ鷽ʽºÍubootµÄeccУÑéËÆºõÓгåÍ»£¬ ......
ÎҵĵçÄÔ°²×°ÁË˫ϵͳ£¬WindowsºÍLinux£¬²»¹ýÓÉÓÚLinuxÔÚ×î½üÒ»¶Îʱ¼äÄÚ²»»áʹÓã¬ËùÒÔÎÒ´òËãɾ³ýLinux¡£
ɾ³ýLinux×îÐèҪעÒâµÄµØ·½£¬¾ÍÊÇMBR£¨Master Boot Record£©¡£ÔÚɾ³ýLinux·ÖÇøÇ°£¬ÎÒÃÇÐèÒª½«Æô¶¯WindowsµÄÒýµ¼ÐÅϢдÈëMBR£¬·ñÔò£¬MBRÖеÄLinuxÒýµ¼ÐÅÏ¢£¬µ±È»¾Í²»ÄÜÆô¶¯WindowsÏµÍ ......
oracle RAC 9.2.0.4Éý¼¶µ½9.2.0.8
²Ù×÷ϵͳƽ̨£ºRed Hat Enterprise Linux AS release 3
×¼±¸¹¤×÷£º
1. Check Tablespace Sizes and Set Parameter Values
&nb ......