linux×Ö·ûÉ豸Çý¶¯Ñ§Ï°
½ñÌìѧϰÁËÔÚlinux2.6ƽ̨Ï嵀 char drvier £¬ÔÚlinuxÏÂÍƼöʹÓõÄÊÇcdev½á¹¹ÌåÀ´ÊµÏÖ¶ÔcharacterÉ豸µÄÃèÊö£¬´úÂëÈçÏÂ
/*This module is desired for sunplusapp s3c2440_board */
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/cdev.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/errno.h>
#include <mach/regs-gpio.h>
#include <mach/hardware.h>
#include <linux/platform_device.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <asm/io.h>
#include <asm/system.h>
#define DEVICE_NAME "LED_S3C2440"
struct LED_dev{
struct cdev cdev;
char name[10];
/*...*/
}*LED_devp;
static dev_t LED_device_num;
static struct class *LED_class;
//struct class *LED_class;
static unsigned long LED_table[]={
S3C2410_GPG0,
S3C2410_GPG1,
S3C2410_GPG2,
};
static unsigned int LED_cfg_table[]={
S3C2410_GPG0_OUTP,
S3C2410_GPG1_OUTP,
S3C2410_GPG2_OUTP,
};
int LED_open(struct inode *inode, struct file *filp)
{
/*½«É豸½á¹¹ÌåÖ¸Õ븳ֵ¸øÎļþ˽ÓÐÊý¾ÝÖ¸Õë*/
filp->private_data = LED_devp;
printk("Open OK\n");
return 0;
}
/*ÎļþÊͷź¯Êý*/
int LED_release(struct inode *inode, struct file *filp)
{
printk("Release OK\n");
return 0;
}
static ssize_t LED_write(struct file *filp,const char __user *buf,size_t size,loff_t *f_pos)
{
unsigned char buff = 0;
int ret;
int i;
/*Óû§¿Õ¼ä->Äں˿ռä*/
if (copy_from_user(&buff, buf, size))
ret = - EFAULT;
printk("write:buff=0x%x,buff=0x%x,count=%d\n", buff, buf, size);
buff-=0x30;
for(i=0;i<3;i++)
{
if(i==buff)
s3c2410_gpio_setpin(LED_table[i],1);
else
s3c2410_gpio_
Ïà¹ØÎĵµ£º
Èí¼þÏÂÔصØÖ·£º
pcre£ºhttp://www.pcre.org/
Nginx£ºhttp://nginx.net/
spawn-fcig: http://redmine.lighttpd.net/projects/spawn-fcgi/news
ÀûÓà wget ÃüÁîÏÂÔØÏàÓ¦µÄ °²×°°ü
²½Öè
1¡¢°²×°pcre
ngnix ÐèÒª°²×°pcre¿â£º
wget http://sourceforge.net ......
LinuxÈ«¹¥ÂÔ--yum·þÎñÆ÷ÅäÖÃ
Yum£¨È«³ÆΪ Yellow dog Updater, Modified£©ÊÇÒ»¸öÔÚFedoraÖеÄshellÇ°¶ËÈí¼þ°ü¹ÜÀíÆ÷¡£»ùÓÚrpm°ü¹ÜÀí£¬Äܹ»´ÓÖ¸¶¨µÄ·þÎñÆ÷×Ô¶¯ÏÂÔØRPM°ü²¢ÇÒ°²×°£¬¿ÉÒÔ×Ô¶¯´¦Àí ÒÀÀµÐÔ¹Øϵ£¬²¢ÇÒÒ»´Î°²×°ËùÓÐÒÀÀµµÄÈíÌå°ü£¬ÎÞÐë·±ËöµØÒ»´Î´ÎÏÂÔØ¡¢°²×°¡£
¡¡¡¡ÈíÌå°üÀ´Ô´
¿É¹©YumÏÂÔصÄÈíÌå°ü°üÀ¨fedora ......
shell ±à³ÌÖÐʹÓõ½µÃifÓï¾äÄÚÅжϲÎÊý
–b µ±file´æÔÚ²¢ÇÒÊÇ¿éÎļþʱ·µ»ØÕæ
-c µ±file´æÔÚ²¢ÇÒÊÇ×Ö·ûÎļþʱ·µ»ØÕæ
-d µ±pathname´æÔÚ²¢ÇÒÊÇÒ»¸öĿ¼ʱ·µ»ØÕæ
-e µ±pathnameÖ¸¶¨µÄÎļþ»òĿ¼´æÔÚʱ·µ»ØÕæ
-f µ±file´æÔÚ²¢ÇÒÊÇÕý¹æÎļþʱ·µ»ØÕæ
-g µ±ÓÉpathnameÖ¸¶¨µÄÎļþ»òĿ¼´æÔÚ²¢ÇÒÉèÖÃÁËSGIDλʱ·µ»ØÎ ......
http://www.zhetao.com/content.dep?m=news&id=1235137892661247
·¢²¼ÈÕÆÚ 2009-2-20 21:51:32
Linux
ϵͳµÄ
SNMP
·þÎñÉèÖÃ
1)
°²×°
SNMP
ÂÔ£¬Çë²ÎÔÄ
LINUX
ϵͳ
SNMP
°²×°ËµÃ÷£¬Ò»°ãÇé¿öÏÂ
Linux
ÖеľùÒѾ×Ô¶¯°²×°ÁË
SNMP
·þÎñ¡£ÒÔÏÂÃüÁî¿ÉÒÔ¼ì²â
SNMP
·þÎñÊÇ·ñ°²×°ÒÔ¼°°²×°µÄÎļþ°ü¡£
[ ......
1¡¢LinuxÎļþϵͳÊÇ´Ó/¿ªÊ¼µÄ£»
ÔÚLinux²Ù×÷ϵͳµÄÎļþ¹ÜÀíÖУ¬ÃüÁîÐÐģʽ£¨ÔÚ¿ØÖÆ̨»òÖÕ¶ËÏ£©µÄÎļþ»òĿ¼¹ÜÀí£¬ÒªÉ漰·¾¶ÕâÒ»¸ÅÄÕâÊÇLinuxÃüÁîÐвÙ×÷µÄ×î»ù´¡µÄ»ù´¡¡£Èç¹ûÎÒÃÇÁ˽âÁË·¾¶µÄ¸ÅÄ¾Í¿ÉÒÔËæÐÄËùÓûµÄ½øÈëÈκÎĿ¼£¬½øÐÐÎÒÃÇÏëµÄ¹¤×÷¡£
Linux Îļþϵͳ£¬ÊÇÒ»¸ö³ÊÊ÷Ðνṹ£¬ÊÇ´Ó/×öΪÈë¿Ú£¬/£¨Ò²±»³ÆΪ¸ ......