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!
Ïà¹ØÎĵµ£º
¹¤×÷Öо³£ÐèÒªKill¶à¸ö½ø³Ì£¬Èç¹ûÕâЩ½ø³ÌÓй²Í¬µÄÌØµã£¬¾Í¿ÉÒÔÓÃÒ»ÌõÃüÁîKillµôËüÃÇ¡£
±ÈÈçÇå³ýOracleÊý¾Ý¿âµÄËùÓÐÔ¶³ÌÁ¬½Ó½ø³Ì£º
ps -efww|grep LOCAL=NO|grep -v grep|cut -c 9-15|xargs kill -9
¡¡¡¡¹ÜµÀ·û“|”ÓÃÀ´¸ô¿ªÁ½¸öÃüÁ¹ÜµÀ·û×ó±ßÃüÁîµÄÊä³ö»á×÷Ϊ¹ÜµÀ·ûÓÒ±ßÃüÁîµÄÊäÈë¡£ÏÂÃæËµËµÓà ......
Sun·¢²¼µÄJDK/JREÓÐÁ½ÖÖ°æ±¾£¬Ò»ÖÖÊÇ.rpm.bin¸ñʽµÄ£¬ÁíÒ»ÖÖÔòÊÇ.bin¸ñʽµÄ£¬Ç°ÕßÎÒûÓÐÊÔ£¬µ«ÊÇÎÒÏëÓ¦¸ÃÊÇÊʺÏÓÚrpmµÄ£¬¿ÉÄܻᰲװµ½/usrÀïÃæÈ¥£¬¶øÇÒ×Ô¶¯»¯³Ì¶È¿ÉÒÔ¸ßһЩ¡£ºóÕßÔòÍêÈ«ÊÇÂÌÉ«Èí¼þ£¬Ö»ÊÇ×öÒ»¸ö½âѹµÄ¶¯×÷¡£ÏÂÃæÎÒ¾ÍÀ´½²ºóÕߵݲװȫ¹¥ÂÔ¡£
1¡¢Ê×ÏÈÎÒÃÇÒªµ½SunµÄÍøÕ¾ÉÏÈ¥ÏÂÔØJDK/JRE£¨µãÕâÀï½øÈ룩£¬×îе ......
ΪÁ˸üºÃµÄ½â¾öÐéÄâ»úÓëÖ÷»úµÄ¹²ÏíÎÊÌ⣬VMware¹«Ë¾ÓÐÒ»¸öVMWare£tools£¬À´ÊµÏÖÎļþ¹²Ïí¡£ÕâÀïÖ÷Òª½²µÄÊÇÔÚWindowsÏÂÓà VmwareÐéÄâLinuxÀ´ÓëwindowsÀ´¹²Ïí¡£
¡¡¡¡1¡¢°²×°¿Í»§»úϵͳ£¬linuxÕâÀïÑ¡ÓÃCentOS5
¡¡¡¡2¡¢Æô¶¯ÐéÄâ»úÖеÄLinuxºó£¬£¨×¢Òâ±ØÐëÊÇÆô¶¯ÐéÄâ»úºó£©¡£Ñ¡Ôñ²Ëµ¥ÀïµÄVMÑ¡ÏÀïÃæÓÐÒ»¸ö×ÓÏîÊÇInstall VM ......
redhat linux ÏÂFTPÅäÖá£(vsftp)
1.Æô¶¯vsftp£º /sbin/service vsftpd start ±¸×¢d´ú±íÔÙºǫ́Æô¶¯¡£
2.²é¿´ÊÇ·ñÆô¶¯£¬¾ÍµÇ½µ½FTPÊÔÊÔ¡£ µÇ½FTP£ºftp localhost Í˳öFTP£ºbye
3.²é¿´Linux IP £ºifconfig
ÔÚ¿ØÖƹÜÀį́Ï¿ɿ´¼ûÈçÏ´úÂ룺¿ÉÒÔ¿´³ö£¬IP Address ÊÇ£º192.168.0.128
4.Èç¹û¾ÖÓòÍ ......
·½·¨Ò»
mount -o iocharset=cp936 /dev/hda5 /mnt/d
·½·¨¶þ
rhel5 ¹ÒÔØ·ÇLinux·ÖÇøµÄ·½·¨
½ñÌìÖÕÓÚ°²×°ºÃÁËrhel5 client,ÔÚÅäÖÿª·¢»·¾³µÄʱºòÓöµ½Á˵ÚÒ»¸öÎÊÌ⣺µÇ¼ºó×ÀÃæÉÏûÓжÁµ½ÎÒµÄWindowsÎļþ·ÖÇø¡£ºÜ
¶à¹¤¾ß¶¼ÔÚÄÇÀï´æ×Å£¬ËùÒÔ£¬Ò»¶¨Òª°ÑËüÕÒ³öÀ´¡£
ÏÈÊÇÔÚÊéÉÏÕÒµ½Á˹ÒÔØÆäËü·ÖÇøµÄ·½·¨£¬ÔÚÖÕ¶ËÄÚÓà ......