{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Linux设备驱动开发详解:基于最新的Linux 4.0内核

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Linux设备驱动开发详解:基于最新的Linux 4.0内核

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

历时8年,三次重构,内容愈加炉火纯青。

全部代码更新至全新的Linux 4.0版本。

全面讲解ARM Linux新版本内核架构,如设备树等。

不仅仅注重知识和程序的讲解,更注重程序的思想、演变、架构和算法

对于嵌入式工程师来说,进入更高阶段后,学习Linux设备驱动开发无疑就是职业生涯的一次“重生”。这是因为Linux设备驱动开发不仅仅涉及操作系统的转换,开发方式的转换,更重要的是思维上的转变。对于Linux这样一个复杂系统,如何从复杂的代码中抓住设备驱动开发的关键是任何一个Linux设备驱动开发者入门时需要面对的挑战。除了知识、工具之外,往往还需要思路上的指导。本书不但帮助Linux设备驱动开发的初学者厘清必要的概念,还从具体的实例、设备驱动开发的指导原则循序渐进地引导读者渐入学习佳境。为了让读者能够达到Linux设备驱动开发的至臻境界,作者更是从软件工程的角度抽象出设备驱动开发的一般思想。毫无疑问,本书将成为读者学习Linux设备驱动开发过程中的一座“灯塔”。

Content Description

《Linux设备驱动开发详解:基于最新的Linux 4.0内核》介绍了Linux设备驱动开发理论、框架与实例,详细说明了自旋锁、信号量、完成量、中断顶/底半部、定时器、内存和I/O映射以及异步通知、阻塞I/O、非阻塞I/O等Linux设备驱动理论,以及字符设备、块设备、tty设备、I2c设备、LCD设备、音频设备、USB设备、网络设备、PCI设备等Linux设备驱动架构中各个复杂数据结构和函数的关系,并讲解了Linux驱动开发的大量实例,使读者能够独立开发各类Linux设备驱动。

Author Description

宋宝华,Linux布道者,知名嵌入式系统专家,《Essential Linux Device Drivers》译者。作为最早从事Linux内核与设备驱动研究的专家之一,他在众多国内外知名企业开展Linux技术培训。他也是一位活跃的Linux开发者和深度实践者,为Linux官方内核贡献了大量的Linux源码并承担代码审核工作。至今已向Linux官方内核提交逾数万行代码和几百个补丁。他的《Linux设备驱动开发详解》系列书在嵌入式Linux开发者中有口皆碑,是众多Linux书籍中为数不多的畅销书。

Comments

★理解软件一定是从某个逻辑起点开始,通过逻辑的延伸和数据的堆叠,首先在框架上获知软件是如何解决目标问题的。然后通过这个框架性的理解来进一步熟知程序中更加小的细节以添加新功能或修复已遇到的问题。我之前想,如果有一本书能在讲解程序之前先详细地介绍此程序的思想、演变、架构和主要算法,然后再遍历评论程序实现的代码,那绝对是秘籍。现在终于有了,谢谢@宋宝华即将带给我们的绝学圣典!

—— CSR(Cambridge Silicon Radio)平台软件高级经理刘永生


★“宋宝华老师的这本书是国内少有的可与《Linux Device Driver》和《Linux Kernel Development》相媲美的Linux内核类书籍,甚至在所有技术类图书中都是精品之作。相比国内大量技术类图书的呆板教条和抄袭,以及让人读来困倦,不知所云,该书文风生动而不失深刻,知识点全面精炼。书中不但介绍各常见驱动的架构,更深入剖析内核相关的底层实现机制,“授人以鱼”更“授人以渔”,让读者真正领会和学习内核社区大牛们的设计思想和技巧,从而快速提升自己的能力。愿本书的读者通过学习能够真正实现从“码农”到"内核大牛”的华丽转变。”

—— 中科院上海微系统所朱军


★“Linux内核的书籍不少,可是为什么好书少,与时俱进的好书更加少。这是因为Linux内核每到两三个月就更新一次,不断有新的技术、新的框架加入。试问有哪个作者可以一直坚持写作关于Linux内核最新的变化和技术。就连国外的经典之作《Linux Device Driver》、《Understanding Linux Kernel》都早就没有更新的作品了,可是宋宝华老师一直在用他独特的视角和一线Linux内核开发的工作实践不断地给大家带来最新最好的《Linux设备驱动开发详解》。希望每一位Linux内核的开发者和爱好者都能好好学习宋老师的新作,同时学习他坚持不懈的精神,多为Linux内核社区提供好的技术和作品。”

—— NVIDIA高级系统软件工程师伍鹏 (Bryan Wu)

Catalogue

赞誉

推荐序一

推荐序二

前言

第1章Linux设备驱动概述及开发环境构建 1

1.1设备驱动的作用 1

1.2无操作系统时的设备驱动 2

1.3有操作系统时的设备驱动 4

1.4Linux设备驱动 5

1.4.1设备的分类及特点 5

1.4.2Linux设备驱动与整个软硬件系统的关系 6

1.4.3Linux设备驱动的重点、难点 7

1.5Linux设备驱动的开发环境构建 8

1.5.1PC上的Linux环境 8

1.5.2QEMU实验平台 11

1.5.3源代码阅读和编辑 13

1.6设备驱动Hello World:LED驱动 15

1.6.1无操作系统时的LED驱动 15

1.6.2Linux下的LED驱动 15

第2章驱动设计的硬件基础 20

2.1处理器 20

2.1.1通用处理器 20

2.1.2数字信号处理器 22

2.2存储器 24

2.3接口与总线 28

2.3.1串口 28

2.3.2I2C 29

2.3.3SPI 30

2.3.4USB 31

2.3.5以太网接口 33

2.3.6PCI和PCI-E 34

2.3.7SD和SDIO 36

2.4CPLD和FPGA 37

2.5原理图分析 40

2.6硬件时序分析 42

2.6.1时序分析的概念 42

2.6.2典型的硬件时序 43

2.7芯片数据手册阅读方法 44

2.8仪器仪表使用 47

2.8.1万用表 47

2.8.2示波器 47

2.8.3逻辑分析仪 49

2.9总结 51

第3章Linux内核及内核编程 52

3.1Linux内核的发展与演变 52

3.2Linux 2.6后的内核特点 56

3.3Linux内核的组成 59

3.3.1Linux内核源代码的目录结构 59

3.3.2Linux内核的组成部分 60

3.3.3Linux内核空间与用户空间 64

3.4Linux内核的编译及加载 64

3.4.1Linux内核的编译 64

3.4.2Kconfig和Makefile 66

3.4.3Linux内核的引导 74

3.5Linux下的C编程特点 75

3.5.1Linux编码风格 75

3.5.2GNU C与ANSI C 78

3.5.3do { } while(0) 语句 83

3.5.4goto语句 85

3.6工具链 85

3.7实验室建设 88

3.8串口工具 89

3.9总结 91

第4章Linux内核模块 92

4.1Linux内核模块简介 92

4.2Linux内核模块程序结构 95

4.3模块加载函数 95

4.4模块卸载函数 97

4.5模块参数 97

4.6导出符号 99

4.7模块声明与描述 100

4.8模块的使用计数 100

4.9模块的编译 101

4.10使用模块“绕开”GPL 102

4.11总结 103

第5章Linux文件系统与设备文件 104

5.1Linux文件操作 104

5.1.1文件操作系统调用 104

5.1.2C库文件操作 108

5.2Linux文件系统 109

5.2.1Linux文件系统目录结构 109

5.2.2Linux文件系统与设备驱动 110

5.3devfs 114

5.4udev用户空间设备管理 116

5.4.1udev与devfs的区别 116

5.4.2sysfs文件系统与Linux设备模型 119

5.4.3udev的组成 128

5.4.4udev规则文件 129

5.5总结 133

第6章字符设备驱动 134

6.1Linux字符设备驱动结构 134

6.1.1cdev结构体 134

6.1.2分配和释放设备号 136

6.1.3f?ile_operations结构体 136

6.1.4Linux字符设备驱动的组成 138

6.2globalmem虚拟设备实例描述 142

6.3globalmem设备驱动 142

6.3.1头文件、宏及设备结构体 142

6.3.2加载与卸载设备驱动 143

6.3.3读写函数 144

6.3.4seek函数 146

6.3.5ioctl函数 146

6.3.6使用文件私有数据 148

6.4globalmem驱动在用户空间中的验证 156

6.5总结 157

第7章Linux设备驱动中的并发控制 158

7.1并发与竞态 158

7.2编译乱序和执行乱序 160

7.3中断屏蔽 165

7.4原子操作 166

7.4.1整型原子操作 167

7.4.2位原子操作 168

7.5自旋锁 169

7.5.1自旋锁的使用 169

7.5.2读写自旋锁 173

7.5.3顺序锁 174

7.5.4读-复制-更新 176

7.6信号量 181

7.7互斥体 183

7.8完成量 184

7.9增加并发控制后的globalmem的设备驱动 185

7.10总结 188

第8章Linux设备驱动中的阻塞与非阻塞I/O 189

8.1阻塞与非阻塞I/O 189

8.1.1等待队列 191

8.1.2支持阻塞操作的globalf?ifo设备驱动 194

8.1.3在用户空间验证globalf?ifo的读写 198

8.2轮询操作 198

8.2.1轮询的概念与作用 198

8.2.2应用程序中的轮询编程 199

8.2.3设备驱动中的轮询编程 201

8.3支持轮询操作的globalf?ifo驱动 202

8.3.1在globalf?ifo驱动中增加轮询操作 202

8.3.2在用户空间中验证globalf?ifo设备的轮询 203

8.4总结 205

第9章Linux设备驱动中的异步通知与异步I/O 206

9.1异步通知的概念与作用 206

9.2Linux异步通知编程 207

9.2.1Linux信号 207

9.2.2信号的接收 208

9.2.3信号的释放 210

9.3支持异步通知的globalf?ifo驱动 212

9.3.1在globalf?ifo驱动中增加异步通知 212

9.3.2在用户空间中验证globalf?ifo的异步通知 214

9.4Linux异步I/O 215

9.4.1AIO概念与GNU C库AIO 215

9.4.2Linux内核AIO与libaio 219

9.4.3AIO与设备驱动 222

9.5总结 223

第10章中断与时钟 224

10.1中断与定时器 224

10.2Linux中断处理程序架构 227

10.3Linux中断编程 228

10.3.1申请和释放中断 228

10.3.2使能和屏蔽中断 230

10.3.3底半部机制 230

10.3.4实例:GPIO按键的中断 235

10.4中断共享 237

10.5内核定时器 238

10.5.1内核定时器编程 238

10.5.2内核中延迟的工作delayed_work 242

10.5.3实例:秒字符设备 243

10.6内核延时 247

10.6.1短延迟 247

10.6.2长延迟 248

10.6.3睡着延迟 248

10.7总结 250

第11章内存与I/O访问 251

11.1CPU与内存、I/O 251

11.1.1内存空间与I/O空间 251

11.1.2内存管理单元 252

11.2Linux内存管理 256

11.3内存存取 261

11.3.1用户空间内存动态申请 261

11.3.2内核空间内存动态申请 262

11.4设备I/O端口和I/O内存的访问 267

11.4.1Linux I/O端口和I/O内存访问接口 267

11.4.2申请与释放设备的I/O端口和I/O内存 268

11.4.3设备I/O端口和I/O内存访问流程 269

11.4.4将设备地址映射到用户空间 270

11.5I/O内存静态映射 276

11.6DMA 277

11.6.1DMA与Cache一致性 278

11.6.2Linux下的DMA编程 279

11.7总结 285

第12章Linux设备驱动的软件架构思想 286

12.1Linux驱动的软件架构 286

12.2platform设备驱动 290

12.2.1platform总线、设备与驱动 290

12.2.2将globalf?ifo作为platform设备 293

12.2.3platform设备资源和数据 295

12.3设备驱动的分层思想 299

12.3.1设备驱动核心层和例化 299

12.3.2输入设备驱动 301

12.3.3RTC设备驱动 306

12.3.4Framebuffer设备驱动 309

12.3.5终端设备驱动 311

12.3.6misc设备驱动 316

12.3.7驱动核心层 321

12.4主机驱动与外设驱动分离的设计思想 321

12.4.1主机驱动与外设驱动分离 321

12.4.2Linux SPI主机和设备驱动 322

12.5总结 330

第13章Linux块设备驱动 331

13.1块设备的I/O操作特点 331

13.2Linux块设备驱动结构 332

13.2.1block_device_operations结构体 332

13.2.2gendisk结构体 334

13.2.3bio、request和request_queue 335

13.2.4I/O调度器 339

13.3Linux块设备驱动的初始化 340

13.4块设备的打开与释放 342

13.5块设备驱动的ioctl函数 342

13.6块设备驱动的I/O请求处理 343

13.6.1使用请求队列 343

13.6.2不使用请求队列 347

13.7实例:vmem_disk驱动 349

13.7.1vmem_disk的硬件原理 349

13.7.2vmem_disk驱动模块的加载与卸载 349

13.7.3vmem_disk设备驱动的block_device_operations 351

13.7.4vmem_disk的I/O请求处理 352

13.8Linux MMC子系统 354

13.9总结 357

第14章Linux网络设备驱动 358

14.1Linux网络设备驱动的结构 358

14.1.1网络协议接口层 359

14.1.2网络设备接口层 363

14.1.3设备驱动功能层 367

14.2网络设备驱动的注册与注销 367

14.3网络设备的初始化 369

14.4网络设备的打开与释放 370

14.5数据发送流程 371

14.6数据接收流程 372

14.7网络连接状态 375

14.8参数设置和统计数据 377

14.9DM9000网卡设备驱动实例 380

14.9.1DM9000网卡硬件描述 380

14.9.2DM9000网卡驱动设计分析 380

14.10总结 386

第15章Linux I2C核心、总线与设备驱动 387

15.1Linux I2C体系结构 387

15.2Linux I2C核心 394

15.3Linux I2C适配器驱动 396

15.3.1I2C适配器驱动的注册与注销 396

15.3.2I2C总线的通信方法 397

15.4Linux I2C设备驱动 399

15.4.1Linux I2C设备驱动的模块加载与卸载 400

15.4.2Linux I2C设备驱动的数据传输 400

15.4.3Linux的i2c-dev.c文件分析 400

15.5Tegra I2C总线驱动实例 405

15.6AT24xx EEPROM的I2C设备驱动实例 410

15.7总结 413

第16章USB主机、设备与Gadget驱动 414

16.1Linux USB驱动层次 414

16.1.1主机侧与设备侧USB驱动 414

16.1.2设备、配置、接口、端点 415

16.2USB主机控制器驱动 420

16.2.1USB主机控制器驱动的整体结构 420

16.2.2实例:Chipidea USB主机驱动 425

16.3USB设备驱动 425

16.3.1USB设备驱动的整体结构 425

16.3.2USB请求块 430

16.3.3探测和断开函数 435

16.3.4USB骨架程序 436

16.3.5实例:USB键盘驱动 443

16.4USB UDC与Gadget驱动 446

16.4.1UDC和Gadget驱动的关键数据结构与API 446

16.4.2实例:Chipidea USB UDC驱动 451

16.4.3实例:Loopback Function驱动 453

16.5USB OTG驱动 456

16.6总结 458

第17章I2C、SPI、USB驱动架构类比 459

17.1I2C、SPI、USB驱动架构 459

17.2I2C主机和外设眼里的Linux世界 460

第18章ARM Linux设备树 461

18.1ARM设备树起源 461

18.2设备树的组成和结构 462

18.2.1DTS、DTC和DTB等 462

18.2.2根节点兼容性 468

18.2.3设备节点兼容性 470

18.2.4设备节点及label的命名 475

18.2.5地址编码 477

18.2.6中断连接 479

18.2.7GPIO、时钟、pinmux连接 480

18.3由设备树引发的BSP和驱动变更 484

18.4常用的OF API 490

18.5总结 493

第19章Linux电源管理的系统架构和驱动 494

19.1Linux电源管理的全局架构 494

19.2CPUFreq驱动 495

19.2.1SoC的CPUFreq驱动实现 495

19.2.2CPUFreq的策略 501

19.2.3CPUFreq的性能测试和调优 501

19.2.4CPUFreq通知 502

19.3CPUIdle驱动 504

19.4PowerTop 508

19.5Regulator驱动 508

19.6OPP 511

19.7PM QoS 515

19.8CPU热插拔 518

19.9挂起到RAM 522

19.10运行时的PM 528

19.11总结 534

第20章Linux芯片级移植及底层驱动 535

20.1ARM Linux底层驱动的组成和现状 535

20.2内核节拍驱动 536

20.3中断控制器驱动 541

20.4SMP多核启动以及CPU热插拔驱动 549

20.5DEBUG_LL和EARLY_PRINTK的设置 556

20.6GPIO驱动 557

20.7pinctrl驱动 560

20.8时钟驱动 572

20.9dmaengine驱动 578

20.10总结 580

第21章Linux设备驱动的调试 581

21.1GDB调试器的用法 581

21.1.1GDB的基本用法 581

21.1.2DDD图形界面调试工具 591

21.2Linux内核调试 594

21.3内核打印信息——printk() 596

21.4DEBUG_LL和EARLY_PRINTK 599

21.5使用“/proc” 600

21.6Oops 606

21.7BUG_ON()和WARN_ON() 608

21.8strace 609

21.9KGDB 610

21.10使用仿真器调试内核 612

21.11应用程序调试 613

21.12Linux性能监控与调优工具 616

21.13总结 618

Introduction

Linux从未停歇前进的脚步。Linus Torvalds,世界上最伟大的程序员之一,Linux内核的创始人,Git的缔造者,现在仍然在没日没夜地合并补丁、升级内核。做技术的人,从来没有终南捷径,拼得就是坐冷板凳的傻劲。

这是一个连阅读都被碎片化的时代,在这样一个时代,人们趋向于激进、浮躁,内心的不安宁使我们极难静下心来研究什么。我见过许多Linux工程师,他们的简历上写着“精通”Linux内核,有多年的工作经验,而他们的“精通”却只是把某个寄存器从0改成1,从1改成0的不断重复;我也见过许多Linux工程师,他们终日埋头苦干,敲打着自己的机器和电路板,却从未冷静下来思考,并不断重构和升华自己的知识体系。

这是要把“牢底”坐穿的程序员,这样“忙忙碌碌”的程序员,从来都不算是好程序员。

对于优秀的程序员,其最优秀的品质是能够心平气和地学习与思考问题,透析代码背后的架构、原理和设计思想。没有思想的代码是垃圾代码,没有思想的程序员,只是在完成低水平重复建设的体力活。很多程序员从不过问自己写的代码最后在机器里面是怎么跑的,很多事情莫名其妙地发生了,很多bug莫名其妙地消失了……他们永远都在得过且过。

由此,衍生出了本书的第一个出发点,那就是带给读者更多关于Linux开发思想的讲解,帮助读者奠定根基。本书呈现给读者的更多的是一种思考方法,而不是知识点的简单罗列。

本书除对基础理论部分进行了详细的讲解外,还加强了对驱动编程所涉及的Linux内核最底层机理的讲解,内容包括中断、定时器、进程生命周期、uevent、并发、编译乱序、执行乱序、等待队列、I/O模型、内存管理等。这些知识点非常重要,是真正证明程序员理解了Linux的部分内容,程序员只有打好根基,才能游刃有余。

本书没有大量描述各种具体驱动类型的章节,如Sound、PCI、MTD、tty等,而将更多的焦点转移到了驱动编程背后的内核原理,并试图从Linux内核的上百个驱动子系统中寻找出内部规律,以培养读者举一反三的能力。

Linux内核有上百个驱动子系统,这一点从内核的drivers子目录中就可以看出来:

好吧,傻子才会一个目录一个目录地去看,一个目录一个目录地从头学起。我们势必要寻找各种驱动子系统的共性,摸索规律。在本书中,我们将更多地看到各驱动子系统的类比,以及驱动子系统的层次化设计。

技术工作从来都不能一劳永逸。世界变化得太快,当前技术革新的速度数倍于我们父辈、祖辈、祖祖辈经历过的任何时代。证明你是“真球迷”还是“伪球迷”的时候到了,这个时代是伪程序员的地狱,也是真程序员的天堂。

从浩如烟海的知识体系、不断更新的软件版本中终生学习,不断攻克一个个挑战,获取新养分,寻找新灵感,这实在是黑暗的码农生涯中不断闪现的璀璨光芒。

Linux的内核版本不断更新,出现了Linux 3.0、Linux 3.1、Linux 3.2、…、Linux 3.19、Linux 4.0、Linux 4.1,变化的是软件的架构,不变的是Linus的热情。

这无疑也是本书的第二个出发点,更新Linux驱动编程的知识体系以迎合最新的时代需求。因此,本书有大量关于设备树、ARM Linux移植、Linux电源管理、GPIO、时钟、定时器、pinmux、DMA等内容。我们的操作平台也转移到了QEMU模拟的4核Cortex-A9电路板上,书中的实例基本都转移到了市面流行的新芯片上。

最近两三年,老是听许多程序员抱怨,市面上缺乏讲解新内核的资料、缺乏从头到尾讲解设备树的资料,但是我想说,这实在不是什么难点。难点仍然是本书基于第一个出发点要解决的问题,如果有好的基础,以优秀程序员极强的学习能力,应该很快就可以掌握这些新知识。机制没有变,变化的只是策略。

因此学习能力也是优秀程序员的又一个重要品质。没有人生下来就是天才,良好的学习能力也是通过后天的不断学习培养的。可以说,学得越多的人,学新东西的速度一定越快,学习能力也变得越强。因为,知识的共通性实在太多。

读者在阅读本书时,不应该企图把它当成一本工具书和查API的书,而是应该把它当作一本梳理理论体系、开发思想、软件架构的书。唯如此,我们才能适应未来新的变化。

时代的滚滚车轮推动着Linux内核的版本不断向前,也推动着每个人的人生。红尘滚滚,我不去想是否能够成功,既然选择了远方,便只顾风雨兼程。

最后,本书能得以出版,要感谢带领我向前的人生导师和我的众多小伙伴,他们或者在我人生的关键时刻改变了我,或者给我黑暗的程序生涯带来了无尽的快乐和动力。我的小伙伴,他们力挺我、鼓励我,也辱骂我、奚落我,这些都是真挚的友情。

谨以此书,致以对杨平先生、何昭然、方毅伟、李华毅、宋志武、杜向龙、叶祥振、刘昊、王榕、何晔、王立赛、曾过、刘永生、段丙华、章君义、王文琪、卢鹏、刘涛、徐西宁、吴赫、任桥伟、秦龙廷、胡良兵、张家旺、王雷、Bryan Wu、Eric Miao、Cliff Cai、Qipan Li、Guoying Zhang、陈健松、Haoyu Zhong、刘洪涛、季久峰、邴杰、孙志忠、吴国举、Bob Liu、赵小吾、EJ Zhao、贺亚锋、刘仕杰、Hao Yin等老师和小伙伴的深深感激;谨以此书,致以对我的父母大人、老婆大人、兄长和姐姐、伟大丈母娘的深深感激,本书的写作时间超过一年,其过程是一种巨大的肉体和精神折磨,没有他们的默默支持和不断鞭策,本书是不可能完成的;谨以此书,对为本书做出巨大贡献的编辑、策划老师,尤其是张国强老师致以深深的感激!

由于篇幅的关系,我没有办法一一列举我要感激的所有人,但是,这些年从你们那里获得的,远远大于我付出的,所以,在内心深处,唯有怀着对你们的深深感恩,不断前行。岁月如歌,吾歌狂行。

全书结构本书首先介绍Linux设备驱动的基础。第1章简要地介绍了设备驱动,并从无操作系统的设备驱动引出了Linux操作系统下的设备驱动,介绍了本书所基于的开发环境。第2章系统地讲解了Linux驱动工程师应该掌握的硬件知识,为工程师打下Linux驱动编程的硬件基础,详细介绍了各种类型的CPU、存储器和常见的外设,并阐述了硬件时序分析方法和数据手册阅读方法。第3章将Linux设备驱动放在Linux 2.6内核背景中进行讲解,说明Linux内核的编程方法。由于驱动编程也在内核编程的范畴,因此,这一章实质是为编写Linux设备驱动打下软件基础。

其次,讲解Linux设备驱动编程的基础理论、字符设备驱动及设备驱动设计中涉及的并发控制、同步等问题。第4、5章分别讲解Linux内核模块和Linux设备文件系统;第6~9章以虚拟设备globalmem和globalfifo为主线,逐步给其添加高级控制功能;第10、11章分别阐述Linux驱动编程中所涉及的中断和定时器、内核和I/O操作处理方法。

接着,剖析复杂设备驱动的体系结构以及块设备、网络设备驱动。该篇讲解了设备与驱动的分离、主机控制器驱动与外设驱动的分离,并以大量实例(如input、tty、LCD、platform、I2C、SPI、USB等)来佐证。其中第12章和第17章遥相呼应,力图全面地展示驱动的架构。Linux有100多个驱动子系统,逐个讲解和学习都是不现实的,授人以鱼不如授人以渔,因此我们将更多的焦点放在了架构讲解方面,以便读者可以举一反三。

本书最后4章分析了Linux的设备树、Linux移植到新的SoC上的具体工作以及Linux内核和驱动的一些调试方法。这些内容,对于理解如何从头开始搭建一个Linux,以及整个Linux板级支持包上上下下的关系尤为重要。

另外,本书的主要代码都引用自Linux源代码,为保留原汁原味,均延用了代码的英文注释,而其他非引用的代码则使用了中文注释或无注释,特此说明。

本书配套的相关素材和代码,读者均可从与本书相关的微信公众号中获得,相关公众号是:Linuxer,欢迎扫描二维码。

宋宝华2015年4月于上海浦东


Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book