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!
Ïà¹ØÎĵµ£º
×¼±¸¹¤×÷:
¡¡¡¡Óõ½µÄperl À©Õ¹×é¼þ(modules)ÔÚÉÏÆªÌù³ö.( win32::odbc Ä£¿é
)ÏÂÔØ×é¼þºó°´ÕÕReadmeÎļþ°²×°µ¹ÏìӦĿ¼.ÅäÖúÃÏàÓ¦µÄodbcÊý¾ÝÔ´.
¡¡¡¡
¡¡¡¡³ÌÐòʵÏÖ:
¡¡¡¡Ê¹ÓÃ
¡¡¡¡use
Win32::ODBC;
¡¡¡¡
¡¡¡¡Óï¾ä°üº¬Ó¦Ê¹ÓõÄÄ£¿éÊÇwin32::odbc,д³öÊý¾Ý¿â
Á¬½Ó×Ö·û´®
¡¡¡¡
¡¡¡¡$DSN = "DSN =
My DSN ......
ÔÚLinuxÉϽ»²æ±àÒëpppd 2.4.4
1. ÏÂÔØpppd 2.4.4µÄÔ´´úÂë
ftp://ftp.samba.org/pub/ppp/
2. Ö±½Ó±àÒë
#./configure
#make clean
#make
3. ½»²æ±àÒë
ÐÞ¸Ä./pppd-2.4.4/pppd/Makefile, ×¢ÊÍÁ½ÐУº
#wenxy comment #LIBS += -lpcap
#wenxy comment #CFLAGS += -DPPP_FILTER
cross compile
......
1¡¢Linux »ù´¡
°²×°Linux²Ù×÷ϵͳ
LinuxÎļþϵͳ
Linux³£ÓÃÃüÁî
LinuxÆô¶¯¹ý³ÌÏê½â
ÊìϤLinux·þÎñÄܹ»¶ÀÁ¢°²×°Linux²Ù×÷ϵͳ
Äܹ»ÊìÁ·Ê¹ÓÃLinuxϵͳµÄ»ù±¾ÃüÁî
ÈÏʶLinuxϵͳµÄ³£Ó÷þÎñ°²×°Linux²Ù×÷ϵͳ
Linux»ù±¾ÃüÁîʵ¼ù
ÉèÖÃLinux»·¾³±äÁ¿
¶¨ÖÆLinuxµÄ·þÎñ Shell ±à³Ì»ù´¡Ê¹ÓÃvi±à¼Îļþ
ʹÓÃEmac ......
Sun·¢²¼µÄJDK/JREÓÐÁ½ÖÖ°æ±¾£¬Ò»ÖÖÊÇ.rpm.bin¸ñʽµÄ£¬ÁíÒ»ÖÖÔòÊÇ.bin¸ñʽµÄ£¬Ç°ÕßÎÒûÓÐÊÔ£¬µ«ÊÇÎÒÏëÓ¦¸ÃÊÇÊʺÏÓÚrpmµÄ£¬¿ÉÄܻᰲװµ½/usrÀïÃæÈ¥£¬¶øÇÒ×Ô¶¯»¯³Ì¶È¿ÉÒÔ¸ßһЩ¡£ºóÕßÔòÍêÈ«ÊÇÂÌÉ«Èí¼þ£¬Ö»ÊÇ×öÒ»¸ö½âѹµÄ¶¯×÷¡£ÏÂÃæÎÒ¾ÍÀ´½²ºóÕߵݲװȫ¹¥ÂÔ¡£
1¡¢Ê×ÏÈÎÒÃÇÒªµ½SunµÄÍøÕ¾ÉÏÈ¥ÏÂÔØJDK/JRE£¨µãÕâÀï½øÈ룩£¬×îе ......