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

How to write a Linux driver

1. wrote driver function file(s) .
2. stored in the proper folder, eg: character driver stored in folder  drivers/char/
3. modified Makefile in this folder(eg: drivers/char/)
        -added configuration at somewhere: type like that "obj-$(CONFIG_TESTDRIVER) += testdriver.o"
4. modified config.in in the same folder
        -added configuration at somewhere: type like that "bool 'Mytestdriver' CONFIG_TESTDRIVER"
5. modified mem.c in the same folder
        -added initial function of my driver into mem.c with same rule within it.
5. added device node in Makefile in folder vendors/Samsung/4510B
        -added parameters(same as command mknod's parameters) in DEVICES section, eg: test, c, 254, 0, which stands for the register driver name, device type(char), major device number, minor device number
6. used command make menuconfig at linux root folder(eg: uClinux-dist) to let my driver choice available
7. re-compiled linux with some commands
That's all!


Ïà¹ØÎĵµ£º

ÍêÉÆLinuxϵͳ

 
ÍêÉÆLinuxϵͳ
1.¿ª»ú×Ô¶¯¹ÒÔØwindow·ÖÇø
   
fedora10ËäÈ»ÄÜ×Ô¶¯¹ÒÔØ,µ«ÊǹÒÔØµÄ·ÖÇøÓÐʱ»á²»ÈϺº×ÖÎļþ¼Ð
 
 ´ÓÖÕ¶ËÓÃvi»ògedit´ò¿ª/etc/fstab£¬ÔÚÆäÖÐÌí¼Ó£º
 /dev/sda1 /mnt/1 ntfs default 0 0
 ×¢£ºµÚÒ»ÏîÊÇ·ÖÇøÇý¶¯µØÖ·
   ......

6)Linux³ÌÐòÉè¼ÆÈëÃÅ

6)Linux³ÌÐòÉè¼ÆÈëÃÅ--ÏûÏ¢¹ÜÀí
ǰÑÔ:LinuxϵĽø³ÌͨÐÅ(IPC)
LinuxϵĽø³ÌͨÐÅ(IPC)
POSIXÎÞÃûÐźÅÁ¿
System VÐźÅÁ¿
System VÏûÏ¢¶ÓÁÐ
System V¹²ÏíÄÚ´æ
1¡£POSIXÎÞÃûÐźÅÁ¿ Èç¹ûÄãѧϰ¹ý²Ù×÷ϵͳ,ÄÇô¿Ï¶¨ÊìϤPV²Ù×÷ÁË.PV²Ù×÷ÊÇÔ­×Ó
²Ù×÷.Ò²¾ÍÊDzÙ×÷ÊDz»¿ÉÒÔÖжϵÄ,ÔÚÒ»¶¨µÄʱ¼äÄÚ,Ö»Äܹ»ÓÐÒ»¸ö½ø³ÌµÄ´ ......

ǶÈëʽlinux½Ìѧ´ó¸Ù

1¡¢Linux »ù´¡
°²×°Linux²Ù×÷ϵͳ
LinuxÎļþϵͳ
Linux³£ÓÃÃüÁî
LinuxÆô¶¯¹ý³ÌÏê½â
ÊìϤLinux·þÎñÄܹ»¶ÀÁ¢°²×°Linux²Ù×÷ϵͳ
Äܹ»ÊìÁ·Ê¹ÓÃLinuxϵͳµÄ»ù±¾ÃüÁî
ÈÏʶLinuxϵͳµÄ³£Ó÷þÎñ°²×°Linux²Ù×÷ϵͳ
Linux»ù±¾ÃüÁîʵ¼ù
ÉèÖÃLinux»·¾³±äÁ¿
¶¨ÖÆLinuxµÄ·þÎñ Shell ±à³Ì»ù´¡Ê¹ÓÃvi±à¼­Îļþ
ʹÓÃEmac ......

LinuxϵÄjdk°²×°

Sun·¢²¼µÄJDK/JREÓÐÁ½ÖÖ°æ±¾£¬Ò»ÖÖÊÇ.rpm.bin¸ñʽµÄ£¬ÁíÒ»ÖÖÔòÊÇ.bin¸ñʽµÄ£¬Ç°ÕßÎÒûÓÐÊÔ£¬µ«ÊÇÎÒÏëÓ¦¸ÃÊÇÊʺÏÓÚrpmµÄ£¬¿ÉÄܻᰲװµ½/usrÀïÃæÈ¥£¬¶øÇÒ×Ô¶¯»¯³Ì¶È¿ÉÒÔ¸ßһЩ¡£ºóÕßÔòÍêÈ«ÊÇÂÌÉ«Èí¼þ£¬Ö»ÊÇ×öÒ»¸ö½âѹµÄ¶¯×÷¡£ÏÂÃæÎÒ¾ÍÀ´½²ºóÕߵݲװȫ¹¥ÂÔ¡£
1¡¢Ê×ÏÈÎÒÃÇÒªµ½SunµÄÍøÕ¾ÉÏÈ¥ÏÂÔØJDK/JRE£¨µãÕâÀï½øÈ룩£¬×îе ......

rhel5 ¹ÒÔØ·ÇLinux·ÖÇøµÄ·½·¨

·½·¨Ò»
mount -o iocharset=cp936 /dev/hda5  /mnt/d
·½·¨¶þ
rhel5 ¹ÒÔØ·ÇLinux·ÖÇøµÄ·½·¨
½ñÌìÖÕÓÚ°²×°ºÃÁËrhel5 client,ÔÚÅäÖÿª·¢»·¾³µÄʱºòÓöµ½Á˵ÚÒ»¸öÎÊÌ⣺µÇ¼ºó×ÀÃæÉÏûÓжÁµ½ÎÒµÄWindowsÎļþ·ÖÇø¡£ºÜ
¶à¹¤¾ß¶¼ÔÚÄÇÀï´æ×Å£¬ËùÒÔ£¬Ò»¶¨Òª°ÑËüÕÒ³öÀ´¡£
ÏÈÊÇÔÚÊéÉÏÕÒµ½Á˹ÒÔØÆäËü·ÖÇøµÄ·½·¨£¬ÔÚÖÕ¶ËÄÚÓà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ