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系统
1.开机自动挂载window分区
fedora10虽然能自动挂载,但是挂载的分区有时会不认汉字文件夹
从终端用vi或gedit打开/etc/fstab,在其中添加:
/dev/sda1 /mnt/1 ntfs default 0 0
注:第一项是分区驱动地址
......
在这之前jdk已经安装OK
1.把tomcat传到linux服务器上
2.gunzip tomcat-6.0.20.tar.gz
3.tar -zxvf tomcat-6.0.20.tar
4.得到Tomcat的所有文件.然后把它拷贝到你要安装的位置,如/usr/local/tomcat-6.0.20/
5.在/etc/profile文件中加入如下两行
export JAVA_HOME=/usr ......
linux 下集成 svn 至 eclipse 全过程
因为 java 跨平台,而 eclipse 是个纯 java 开发项目,所以此集成安装过程同样适用于 windows 系统.
第一步:下载集成 svn 至 eclipse 所需的包 site-1.6.5.zip(可以去官网 http://subclipse.tigris.org/ 下载,也可以去作者的 csdn 资源里下载 site-1.6.5.zip 插件)
第二步:将 si ......
Oracle 10g支持在命令行下用静默模式(Silent)安装,给那些没有安装图形界面的Linux系统提供了极大的便利。
下面以Fedora Core 6为例,介绍在命令行下安装OracleOracle 10g的方法。
1 安装前的准备
准备工作要用登录为root用户来进行。
1.1 选择安装环境的语言
Oracle安装时可以通过环境变量LANG指定安装语言,如果Linu ......
嵌入式Linux下串口编程
一、配置内核
在嵌入式Linux下进行串口编程之前,先在内核中配置串口部分,如下:
Device Drivers--->
character devices--->
Serial drivers--->
&nb ......