基于linux-2.6.35的class_create(),device_create解析
作者:苗老师,华清远见嵌入式学院讲师。从linux内核2.6的某个版本之后,devfs不复存在,udev成为devfs的替代。提醒一点,udev是应用层的,不要试图在内核的配置选项里找到它;加入对udev的支持很简单,以作者所写的一个字符设备驱动为例,在驱动初始化的代码里调用class_create为该设备创建一个class,再为每个设备...
linux2.6.35动态创建节点的变化总结
最近做linux驱动,遇到了个问题,由于linux版本变化太快和资料更新慢,有些函数发生变化,其中udev动态创建设备节点的函数也发生变化 在linux2.6某个版本之后 devfs不复存在,udev成为devfs的替代,可以用udev在/dev/下动态生成设备文件,其中2.6之后不同版本创建函数也...
error: unknown field 'ioctl' specified in initializer
error: unknown field 'ioctl' specified in initializer问题是由于2.6.36内核之后 去掉了原来的ioctl,添加两个新的成员,所以会出错long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 所...
Linux下find一次查找多个指定类型文件,指定文件或者排除某类文件
Linux下find一次查找多个指定文件或者排除某类文件,在 GREP 中匹配多个关键字的方法 (1)Linux下find一次查找多个指定文件: 查找a.html和b.htmlfind . -name "a.html" -name "b.html" find . -regex '.*\.txt\|.*\.doc\|.*\.mp3'...
S3C6410存储映射
1 存储系统块图 我们以行为单位来看,在每一行中,最前面的两列表示的是地址范围,后面的几列则是不同的存储控制器。在每一行中用粗边框标示出来的部分表示最前面两列的地址范围映射到这个区域当中。例如:最后两行的地址范围:0x50000000~0x5FFFFFFF和0x60000000~0x6FFFFFFFF分别映射到...
autotools工具的使用
root@jdqiu:/home/qjd/project# lsinclude lib main.croot@jdqiu:/home/qjd/project#root@jdqiu:/home/qjd/project# ls include/test.hroot@jdqiu:/home/qjd/project# ls lib/test.croot@jdqiu:/home/qjd/project#/* project/main.c */#include <stdio.h>#include "include/test.h"int main(){...
cannot find -lltdl
/usr/bin/ld: cannot find -lltdlcollect2: ld returned 1 exit statusmake[2]: *** [libcommon.la] Error 1make[2]: Leaving directory `/home/sources/tools/skyeye/common'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/home/sources/tools/skyeye'make: *** [all] Error 2解决方法:root...
SkyEye的安装
系统:10.04 lts server 64Bit 下载skyeye 1.3.4 rc1版本 安装skyeye的依赖包:sudo apt-get installlibgtk2.0-dev pkg-config libatk1.0-dev libpango1.0-devlibfreetype6-dev libglib2.0-dev libx11-devbinutils-dev libncurses5-dev libxpm-dev执行./autogen.sh.提示没有这个命令。安装su...
configure: error: C++ compiler cannot create executables
You need to install c++ on your computer. even if you installed gcc that doesn’t automatically install g++. Try to run one of the following commands that fit your Linux distribution best :)终端输入apt-get install g++
在Ubuntu中安装工具Autotools
autotools是个系列工具,首先确认你的Ubuntu系统是否安装了以下工具(可以通过which命令查看): aclocal autoscan autoconf autoheader automake 安装方法: lin@l...
Ubuntu下nfs配置与OK6410 NFS挂载
不管是TFTP传输,还是NFS挂载都要保证开发板能ping通虚拟机下的Ubuntu,否则,做再多的努力也是浪费时间。 1.操作系统平台,Ubuntu11.10( VMware ) 2.在Ubuntu上安装以下软件:#sudo apt-get installnfs-common nfs-kernel-server portmap...
Ubuntu10.10可用的源
vi /etc/apt/sources.list 添加如下deb http://old-releases.ubuntu.com/ubuntu maverick main universe restricted multiversedeb-src http://old-releases.ubuntu.com/ubuntu maverick main universe restricted multiversedeb http://old-releases.ubuntu.com/ubuntu maverick-security universe main mu...
CPSR寄存器
关于WS_CLIPCHILDREN和WS_CLIPSIBLINGS的理解(个人认为还是相当全面的)
我是个喜欢瞎琢磨的人。尤其是这几天心情非常郁闷。于是开始琢磨了…….琢磨的问题就是WS_CLIPCHILDREN和WS_CLIPSIBLINGS两种窗口样式的理解。1.求助MSDN我的第一步当然是求助MSDN。在MSDN里面有详细的解释。1.1 WS_CLIPCHILDRENWS_CLIPCHILDREN样式从字面上可以理...
MFC的窗口分割的设计与实现以及CSplitterWnd 类分析
1 引言 在MicrosoftVC++ 6.0 中,基于MFC 的应用程序一般分为以下几种:多文档界面(MDI)、单文档界面(SDI)以及基于对话框的应用程序。其中单文档又可分为单视图的和多视图的,一般情况下,单文档仅需要单视图就够了,如Windows 自带的记事本、画图程序等等,但在一些情况下,单文档需要多视图支持,比如...
undefined reference to `rpl_malloc'
编译tslib,执行make时提示undefined reference to `rpl_malloc' 是因为config.h.in文件中有 /* Define to rpl_malloc if the replacement function should be used. */#undef malloc 把#undef malloc注释掉重新make即可
tslib-1.4的安装与移植
1、下载tslib-1.4.tar.gz http://download.csdn.net/source/3177449 。 2、解压安装tslib # tar -zxvf tslib-1.4.tar.gz  ...
init/built-in.o: In function `do_one_initcall
init/built-in.o: In function `do_one_initcall': /home/sources/linux-2.6.29/init/main.c:694: undefined reference to `__gnu_mcount_nc' init/built-in.o: In function `init_post': /home/sources/linux-2.6.29/init/main.c:790: undefined reference to `__gnu_mcount_nc' init/built-in.o: In function `name_t...
vim复制,粘贴,删除,撤销,替换,光标移动等用法
我接触linux的时候,用的是nano这个文本编辑器,个人觉得他的最大优点就是方便,快速。打开文件,修改文件,到退出都十分的快速,简单。这一点上比vi,vim要强,但是nano不能显示彩色字,不能进行整行删除,编辑各种配置文件的时候,总感觉不是很方便。针对于nano的这些缺点,vim可以很好的解决,并且vim打开文件,里面...
drivers/video/console/vgacon.c:486: error: 'PCIMEM_BASE' undeclared
错误描述:drivers/video/console/vgacon.c: In function 'vgacon_startup':drivers/video/console/vgacon.c:486: error: 'PCIMEM_BASE' undeclared (first use in this function)drivers/video/console/vgacon.c:486: error: (Each undeclared identifier is reported only oncedrivers/video/console/vgacon.c:4...