当前位置: 首页 > news >正文

cdev、udev

udev :应用层的守护进程,由启动脚本加载,负责建立热拨插的接点

cdev :建立字符设备接口

platform device :相关平台直接总线建立的设备,主要出现需要自己直接挂到平台的时候,因为很多驱动都挂到相应的总线上的 
------解决方案--------------------
如果没有udevd守护进程,那么/dev下的很多设备文件必须自己mknod

如果没有platform device也没有多少关系,看你的具体的硬件驱动挂那个子系统上,或者总线上

 

 

 


       在前面,我们看到了/devdevfsudevsysfs等概念,估计读者也会乱了思路了,下面这段文章摘自udev的说明文档,来理清一下它们之间的关系,这里我就不翻译了,我只在后面说明一下。

 

       On typical Linux-based systems, the /dev directory is used to store file-like device nodes which refer to certain devices in the system. Each node points to a part of the system (a device), which might or might not exist. Userspace applications can use these device nodes to interface with the systems hardware, for example, the X server will "listen to" /dev/input/mice so that it can relate the user's mouse movements to moving the visual mouse pointer.

      

       The original /dev directories were just populated with every device that might possibly appear in the system. /dev directories were typically very large because of this. devfs came along to provide a more manageable approach (noticeably, it only populated /dev with hardware that is plugged into the system), as well as some other functionality, but the system proved to have problems which could not be easily fixed.

 

       udev is the "new" way of managing /dev directories, designed to clear up some issues with previous /dev implementations, and provide a robust path forward. In order to create and name /dev device nodes corresponding to devices that are present in the system, udev relies on matching information provided by sysfs with rules provided by the user. This documentation aims to detail the process of rule-writing, one of the only udev-related tasks that must (optionally) be performed by the user.

 

       sysfs is a new filesystem to the 2.6 kernels. It is managed by the kernel, and exports basic information about the devices currently plugged into your system. udev can use this information to create device nodes corresponding to your hardware. sysfs is mounted at /sys and is browseable. You may wish to investigate some of the files stored there before getting to grips with udev. Throughout this document, I will use the terms /sys and sysfs interchangeably.

 

       我这里简单说明一下。在以前呢/dev存储的是linux可以认识的所有的文件设备名,无论这个设备有没有在系统里。为了解决/dev目录过大的问题,就产生了devfs,但devfs是基因内核的,有很多无法解决的问题(参考前面的文章),所以就出现了udev。而udev对设备在/dev目录下的命名依赖于sysfs所提供的规则信息,这些规则信息由用户提供。sysfs是在2.6内核时加进linux内核的。sysfs就是我们系统加载的/sys

 

转载于:https://www.cnblogs.com/Ph-one/p/5067771.html

相关文章:

  • 模拟电路创新设计
  • 设备模型之kobject,kset及其关系
  • 设备驱动基础1:设备模型之总线,驱动,设备
  • 位域“ :”
  • Kobject结构体分析
  • 2016年01月12号
  • 逻辑分析仪作用
  • make clean、make mrproer、make distclean
  • vim编辑器配置
  • 安装该设备时去现一个错误,系统找不到指定的文件
  • git提交代码步骤
  • 五线谱基础知识
  • make clean-kernel make kernel
  • git add 之后因为没提交正确文件需要撤销
  • synergy在Windows和ubuntu 多台PC共享一套键盘鼠标
  • @angular/forms 源码解析之双向绑定
  • 77. Combinations
  • Android 初级面试者拾遗(前台界面篇)之 Activity 和 Fragment
  • create-react-app项目添加less配置
  • Golang-长连接-状态推送
  • iOS 颜色设置看我就够了
  • Javascript基础之Array数组API
  • JavaScript类型识别
  • leetcode讲解--894. All Possible Full Binary Trees
  • MaxCompute访问TableStore(OTS) 数据
  • node入门
  • SpiderData 2019年2月16日 DApp数据排行榜
  • Stream流与Lambda表达式(三) 静态工厂类Collectors
  • 多线程事务回滚
  • 关于springcloud Gateway中的限流
  • 前端技术周刊 2019-02-11 Serverless
  • 浅谈Golang中select的用法
  • 深入浏览器事件循环的本质
  • 如何正确理解,内页权重高于首页?
  • ​【C语言】长篇详解,字符系列篇3-----strstr,strtok,strerror字符串函数的使用【图文详解​】
  • ​软考-高级-系统架构设计师教程(清华第2版)【第9章 软件可靠性基础知识(P320~344)-思维导图】​
  • #etcd#安装时出错
  • #QT(串口助手-界面)
  • #QT项目实战(天气预报)
  • #鸿蒙生态创新中心#揭幕仪式在深圳湾科技生态园举行
  • (1) caustics\
  • (6)STL算法之转换
  • (C++)八皇后问题
  • (delphi11最新学习资料) Object Pascal 学习笔记---第5章第5节(delphi中的指针)
  • (Ruby)Ubuntu12.04安装Rails环境
  • (zhuan) 一些RL的文献(及笔记)
  • (多级缓存)多级缓存
  • (附源码)计算机毕业设计ssm基于Internet快递柜管理系统
  • (教学思路 C#之类三)方法参数类型(ref、out、parmas)
  • (南京观海微电子)——I3C协议介绍
  • (企业 / 公司项目)前端使用pingyin-pro将汉字转成拼音
  • (切换多语言)vantUI+vue-i18n进行国际化配置及新增没有的语言包
  • (三)elasticsearch 源码之启动流程分析
  • (四)库存超卖案例实战——优化redis分布式锁
  • (转)chrome浏览器收藏夹(书签)的导出与导入