linuxÄÚºËÄ£¿éÖⶻñÖжϵÄÒ»¸öÀý×Ó
Ö±½ÓÉÏÀý×Ó°É¡£Ö»ÊDz¶»ñij¸öÉ豸µÄÖж϶øÒÑ¡£¡£¡£
¸ÃÎļþµÄÃû×ÖÊÇirq.c
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#define DEBUG
#ifdef DEBUG
#define MSG(message, args...) printk(KERN_DEBUG "irq:" message, ##args)
#else
#define MSG(message, args...)
#endif
MODULE_LICENSE("GPL");
MODULE_AUTHOR("silence1214");
int irq;
char *interface;
// ÏÂÃæÕâ2¸ö²ÎÊýͨ¹ý²åÈëÄÚºËÄ£¿éµÄʱºò¸³ÖµµÄ...
module_param(irq, int, 0644);
module_param(interface, charp, 0644);
// Öжϲ¶»ñµÄʱºòµÄ´¦Àíº¯Êý
int irq_handle_function(int irq, void *device_id)
{
static int count = 1;
MSG("[%d]receive the irq at %ld...\n", count, jiffies);
count++;
return IRQ_NONE;
}
int init_module()
{
// ×¢²áÖжϲ¶»ñ£¬µÚÈý¸ö²ÎÊýµÄÒâ˼ÊǺÍÆäËûÉ豸¹²Ïí¸ÃÖжϺţ¬×îºóÒ»¸ö²ÎÊýÊÇÉ豸µÄid£¬Æäʵ¶ÔÓÚ¹²ÏíϵÄÉ豸Õâ¸öºÅÂë¾Ý˵ÊÇËæ±ãд£¬Ò»°ã¶¼Ð´irqµÄÁË¡£
//ֻҪע²á³É¹¦¾Í¿ÉÒԵȴý¶ÔÓ¦É豸µÄ¸ÃÖжϺŵĵ½À´ ¾Í¿ÉÒÔ´¦Àí»Øµ÷º¯ÊýÁË¡£¡£
if(request_irq(irq, irq_handle_function, IRQF_SHARED, interface, (void *)&irq))
{
MSG("regist irq failure...\n");
return -EIO;
}
MSG("interface=%s and irq=%d...\n", interface, irq);
MSG("regist irq success...\n");
return 0;
}
void cleanup_module()
{
free_irq(irq, &irq);
MSG("unregist irq...\n");
}
¶ÔÓ¦µÄmakefileµÄÄÚÈÝÊÇ
obj-m:=irq.o
default:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules
Îҵĵ±Ç°Äں˰汾Ϊ£º2.6.27.5-117.fc10.i686
Ö´Ðв½Ö裺
1£ºÊ×ÏÈmakeÒ»ÏÂÉú³Éirq.ko
2£º²é¿´ cat /proc/interrupts
ÎҵĴòÓ¡½á¹ûÊÇ£º
Õâ¸ö19¾ÍÊÇÎÒÐèҪʹÓõÄÖжϺţ¬eth0Æäʵ¾ÍÊÇÍø¿¨£¨µÚÒ»¿é£¬ÎÒÒ²¾ÍÕâôһ¿é£©¡£¡£¡£
È»ºóÎÒʹÓòåÈëÄÚºËÄ£¿éµÄÃüÁîÊÇ£º
2.1£ºinsmod irq.ko interface=eth1 irq=19
Èç¹ûûÓб¨ÈκÎÐÅÏ¢¾ÍÊDzåÈëÕýÈ·ÁË£¬
½Ó×Å
2.2£ºÊäÈë dmesg »Ø³µ¡£¡£¾Í»á¿´µ½ÈçϽØͼµÄÐÅÏ¢ÁË¡£¡£¾ÍÊÇÎÒÃdzÌÐòÖдòÓ¡µÄÐÅÏ¢¡£¡£
ºÃÁËÕâ¾ÍÊÇËã³É¹¦ÁË¡£¡£¡£
2.3£ºÔÀí¾ÍÊÇ£¬£¬×¢²áÁËÒ»¸ö²¶»ñÖжϺÅΪ19µÄ³ÌÐò¡£¡£¡£È»ºóµ±·¢³ö19µÄÖжϺŵÄÉ豸·¢³ö
Ïà¹ØÎĵµ£º
µ±LinuxÄÚºËÔÚÌåϵ½á¹¹²îÒì½Ï´óµÄƽ̨֮¼äÒÆֲʱ£¬»á²úÉúÓëÊý¾ÝÀàÐÍÏà¹ØµÄÎÊÌâ¡£
.ÔÚ±àÒëÄÚºËʱʹÓà -Wall -W strict-prototypes Ñ¡Ïî, ¿ÉÒÔ±ÜÃâºÜ¶à´íÎóµÄ·¢Éú
.ÄÚºËʹÓõĻù±¾Êý¾ÝÀàÐÍÖ÷ÒªÓÐ:
int ±ê×¼CÓïÑÔÕûÊýÀàÐÍ
&n ......
1.°²×°Ê±ÒªÖ´ÐÐÁ½¸ö½Å±¾£¬root.shÊÇÆäÖÐÒ»¸ö¡£
ÐèÒªÓÃrootÓû§Ö´ÐÐroot.shÈ¥Éú³É/etc/oratabÎļþ¡£————1.dbcaÖв»»áÓÐɾ³ýÑ¡Ïî(ÒòΪÔËÐÐʱÐèÒª/etc/oratab)
& ......
£¨±¾ÎÄÕÂÖ÷ÒªÊǸöÈËÈÝÒ×ÕÒ×ÊÁ϶øתµÄ£¬±¾ÎÄÀ´´Ë http://hackang.javaeye.com/blog/234000£©
Ò»¡¢Ê×ÏȲ鿴ÓÐûÓа²×°cvs
rpm -qa|grep cvs
Èç¹ûûÓа²×°£¬È¥downÒ»¸örpm°ü°²×°Ò»°Ñ rpm -i cvs-1.11.22-5.el5.i386.rpm
¶þ¡¢Ìí¼Ócvs×éºÍÓû§
groupadd cvs
useradd -g cvs -s / ......
ʹÓÃVMware ×Ô´øµÄVMware tools¿ÉÒÔÓÃÀ´ÊµÏÖwindowsºÍlinuxÖ®¼äµÄ¹²Ïí×ÊÔ´¡£
²½ÖèÈçÏ£º
1. °²×°ÍêVMwareÐéÄâ»úºÍÐéÄâlinux ºó¡£
2. ´ò¿ªVMware ÐéÄâ»ú ²Ëµ¥À¸µÄVM ——> intall VMware tools £¨»á³öÏÖ¹ ......
vi Öйرճö´í bell ÉùÒô
http://blog.csdn.net/coolrocky/archive/2001/06/05/8080.aspx
È¥³ýÐéÄâ»úLinuxµÄ±¨¾¯Éù
http://hi.baidu.com/zjd168/blog/item/c8300846b5a6ec0e6a63e5d8.html
¹Ø±ÕÖ÷°å±¨¾¯Òô
http://linux.chinaunix.net/techdoc/install/2009/05/16/1112897.shtml
linuxÖйرձ¨¾¯ÒôºÍÐ޸ķֱæÂÊ
http ......