How to learn linux device driver
To learn device driver development, like any other new knowledge, the bestapproach for me is to learn first the theory and then to do some practice.
If you don't know about operating systems, I recommend "Willam Stalling's OS book" [1]. This book has a more hardware oriented approach unlike other OS books that focused more on the algorithms and data structures used in operating systems.
After having a high level overview of operating systems, you have to learn aboutLinux kernel development. Robert Love's book [2] is for me the best one on thesubject. You can learn not only about Linux kernel development, but also themotivations behind the technical decisions that lead to the design.
Then you have to learn about device drivers development on Linux, two books that are very good are "Linux Device Drivers" [3] and "Essential Linux Device Drivers" [4].This two books are complementary. The former teaches how to write virtual devicedrivers for memory based devices, so you can try the examples without the need ofspecial hardware. While the latter shows you how device drives for real devices are actually written. I maintain an up-to-date repository with all LDD3 examples so you can compile and test on recent kernels [5].
Once you have the theory you can begin with the practice by writing real device drivers. You need a hardware that still is not supported on Linux. The good news is that you probably already have one of these devices. With the popularity of the Android platform, is very likely that you own an Android device.
Even when Android is a Linux-based operating system, Google by a design decision forked the Linux kernel and added some APIs [6] that don't exist on the Linux kernel. These APIs are used by device drivers and for that reason, a developer has to choose whether to write a device driver for Android or Linux.
So, porting Android device drivers to Linux is an excellent opportunity to learn device driver development skills, the Linux kernel development process and how to work with the Linux community while doing something useful.
[1]: http://williamstallings.com/OS/
[2]: http://blog.rlove.org/2010/07/li...
[3]: http://lwn.net/Kernel/LDD3/
[4]: http://elinuxdd.com/
[5]: https://github.com/martinezjavier/ldd3
[6]: http://lwn.net/Articles/416690/
How to learn linux device driver的更多相关文章
- linux device driver —— 环形缓冲区的实现
还是没有接触到怎么控制硬件,但是在书里看到了一个挺巧妙的环形缓冲区实现. 此环形缓冲区实际为一个大小为bufsize的一维数组,有一个rp的读指针,一个wp的写指针. 在数据满时写进程会等待读进程读取 ...
- Linux Device Driver 学习(1)
Linux Device Driver 学习(1) 一.搭建虚拟机开发环境 1.选择虚拟机VirtualBox,官网下载.deb包安装: VirtualBox Linux 5.1.6 下载fedora ...
- how to write your first linux device driver
how to write your first linux device driver 0. environment-ubuntu 1804 64bit 1. apt-get install linu ...
- Linux Device Driver && Device File
catalog . 设备驱动程序简介 . I/O体系结构 . 访问设备 . 与文件系统关联 . 字符设备操作 . 块设备操作 . 资源分配 . 总线系统 1. 设备驱动程序简介 设备驱动程序是内核的关 ...
- <<linux device driver,third edition>> Chapter 4:Debugging Techniques
Debugging by Printing printk lets you classify messages accoring to their severity by associating di ...
- <<linux device driver,third edition>> Chapter 3:Char Drivers
The Internal Representation of Device Numbers Within the kernel,the dev_t type(defined in linux/type ...
- linux device driver —— ioctl
实现了应用程序和设备驱动通过ioctl通信.还是对设备驱动没什么感觉,贴一下代码吧. 在Ubuntu 16.04 64bit中测试通过 ioctldemo.c #include <linux/m ...
- linux device driver —— 字符设备
现在对linux设备驱动还没有什么认识,跟着书上敲了一个字符驱动,这里把代码贴一下. 测试环境是 Ubuntu 16.04 64bit 驱动程序: #include <linux/fs.h> ...
- <<linux device driver,third edition>> Chapter 2: Building and Running Modules
Kernel Modules Versus Applications Kernel modules programming is similar to event driven programming ...
随机推荐
- CSS3 transition 属性 过渡效果
<!DOCTYPE html> <html> <head> <style> div { width:100px; height:100px; backg ...
- 敏捷开发之道(三)极限编程XP续
上次的博文敏捷开发之道(二)极限编程XP中,我们了解了XP的实践中的其中四个,今天我们来一起学习一下剩余的实践. --接上文 5).结对编程 结对编程就是由结对的开发人员使用同一台电脑共同完成一项任务 ...
- 微软职位内部推荐-Senior SDE for Windows App Experience
微软近期Open的职位: Job posting title: Senior Software Development Engineer Location: China, Beijing Divisi ...
- UAP如何根据DeviceFamily显示不同的页面
背景 微软推出UAP 推荐使用响应式的UI,但是难免遇到一些特殊情况需要使用不同的Page来在不同的设备显示. 微软目前最新的VS2015在10074上安装后能够支持这个功能特性,只是暂时没有文档介绍 ...
- 《Dive into Python》Chapter 4 笔记
自省:Python中万物皆对象,自省是指代码可以查看内存中以对象形式存在的其它模块和函数,获取它们的信息,并对它们进行操作.用这种方法,可以定义没有名称的函数,不按函数声明的参数顺序调用函数,甚至引用 ...
- [algorithm]求最长公共子序列问题
最直白方法:时间复杂度是O(n3), 空间复杂度是常数 reference:http://blog.csdn.net/monkeyandy/article/details/7957263 /** ** ...
- mysql安装篇
装了vps,环境又要自己配置.mysql比较难装上. 1.安装MySQL 5.5.x的yum源:rpm -Uvh http://repo.webtatic.com/yum/centos/5/lates ...
- linux 下载并安装Memcache服务器端
1.下载并安装Memcache服务器端 服务器端主要是安装memcache服务器端. 下载:http://www.danga.com/memcached/dist/memcached-1.2.2.ta ...
- linux下MySQL 5.6源码安装
linux下MySQL 5.6源码安装 1.下载:当前mysql版本到了5.6.20 http://dev.mysql.com/downloads/mysql 选择Source Code 2.必要软件 ...
- 【BZOJ】【1026】【SCOI2009】Windy数
数位DP cxlove基础数位DP第三题 = =预处理是个很有用的东西!然后就是分类讨论! /***************************************************** ...