万本电子书0元读

万本电子书0元读

顶部广告

Linux Device Driver Development Cookbook电子书

售       价:¥

9人正在读 | 0人评论 9.8

作       者:Rodolfo Giometti

出  版  社:Packt Publishing

出版时间:2019-05-31

字       数:42.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Over 30 recipes to develop custom drivers for your embedded Linux applications. Key Features * Use Kernel facilities to develop powerful drivers * Via a practical approach, learn core concepts of developing device drivers * Program a custom character device to get access to kernel internals Book Description Linux is a unified kernel that is widely used to develop embedded systems. As Linux has turned out to be one of the most popular operating systems used, the interest in developing proprietary device drivers has also increased. Device drivers play a critical role in how the system performs and ensures that the device works in the manner intended. By offering several examples on the development of character devices and how to use other kernel internals, such as interrupts, kernel timers, and wait queue, as well as how to manage a device tree, you will be able to add proper management for custom peripherals to your embedded system. You will begin by installing the Linux kernel and then configuring it. Once you have installed the system, you will learn to use the different kernel features and the character drivers. You will also cover interrupts in-depth and how you can manage them. Later, you will get into the kernel internals required for developing applications. Next, you will implement advanced character drivers and also become an expert in writing important Linux device drivers. By the end of the book, you will be able to easily write a custom character driver and kernel code as per your requirements. What you will learn * Become familiar with the latest kernel releases (4.19+/5.x) running on the ESPRESSObin devkit, an ARM 64-bit machine * Download, configure, modify, and build kernel sources * Add and remove a device driver or a module from the kernel * Master kernel programming * Understand how to implement character drivers to manage different kinds of computer peripherals * Become well versed with kernel helper functions and objects that can be used to build kernel applications * Acquire a knowledge of in-depth concepts to manage custom hardware with Linux from both the kernel and user space Who this book is for This book will help anyone who wants to develop their own Linux device drivers for embedded systems. Having basic hand-on with Linux operating system and embedded concepts is necessary.
目录展开

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Kernel and logging messages

File modifications

Serial and network connections

Other conventions

Sections

Getting ready

How to do it…

How it works…

There's more…

See also

Get in touch

Reviews

Installing the Development System

Technical requirements

Setting up the host machine

Getting ready

How to do it...

See also

Working with the serial console

Getting ready

How to do it...

See also

Configuring and building the kernel

Getting ready

How to do it...

See also

Setting up the target machine

Getting ready

How to do it...

Adding Debian files

Adding the kernel

Setting up the booting variables

Setting up the networking

See also

Doing native compiling on foreign hardware

Getting ready

How to do it...

Installing and configuring schroot

Configuring the emulated OS

See also

A Peek Inside the Kernel

Technical requirements

Adding custom code to the sources

Getting ready

How to do it...

How it works...

See also

Using kernel messages

Getting ready

How to do it...

How it works...

There's more...

Filtering kernel messages

See also

Working with kernel modules

Getting ready

How to do it...

How it works...

See also

Using module parameters

Getting ready

How to do it...

How it works...

See also

Working with Char Drivers

Technical requirements

Creating the simplest char driver

Getting ready

How to do it...

How it works...

There's more...

See also

Exchanging data with a char driver

Getting ready

How to do it...

How it works...

There's more...

See also

Using the “Everything Is a File” abstraction

Getting ready

How to do it...

How it works...

Using the Device Tree

Technical requirements

Using the device tree compiler and utilities

Getting ready

How to do it...

How it works...

There's more...

Reverting a binary device tree into its source

See also

Getting application-specific data from a device tree

Getting ready

How to do it...

How it works...

There's more...

See also

Using a device tree to describe a character driver

Getting ready

How to do it...

How it works...

There's more...

How device files are created in /dev

Downloading the firmware

Getting ready

How to do it...

How it works...

There's more

See also

Configuring CPU pins for specific peripherals

How to do it...

How it works...

See also

Managing Interrupts and Concurrency

Technical requirements

Implementing an interrupt handler

Getting ready

How to do it...

How it works...

There's more...

See also

Deferring work

Getting ready

How to do it...

Tasklets

Workqueues

There's more...

Tasklets

Workqueues

See also

Managing time with kernel timers

Getting ready

How to do it...

How it works...

There's more...

Legacy kernel timers

See also

Waiting for an event

Getting ready

How to do it...

Waitqueues

Completions

How it works...

Waitqueues

Completions

There's more...

Waitqueues

Completions

See also

Performing atomic operations

Getting ready

How to do it...

Mutexes

Spinlocks

How it works...

Mutexes

Spinlocks

There's more...

Mutexes

Spinlocks

The atomic data type

See also

Miscellaneous Kernel Internals

Technical requirements

Using kernel data types

Getting ready

How to do it...

How it works...

There's more...

See also

Managing helper functions

Getting ready

How to do it...

There's more...

See also

Dynamic memory allocation

How to do it...

There's more...

See also

Managing kernel linked lists

Getting ready

How to do it...

There's more...

See also

Using kernel hash tables

Getting ready

How to do it...

There's more...

See also

Getting access to I/O memory

Getting ready

How to do it...

How it works...

See also

Spending time in the kernel

Getting ready

How to do it...

There's more...

See also

Advanced Char Driver Operations

Technical requirements

Going up and down within a file with lseek()

Getting ready

How to do it...

How it works...

There's more...

See also

Using ioctl() for custom commands

Getting ready

How to do it...

How it works...

There's more...

See also

Accessing I/O memory with mmap()

Getting ready

How to do it...

How it works...

There's more...

See also

Locking with the process context

How to do it...

How it works...

See also

Locking (and syncing) with the interrupt context

Getting ready

How to do it...

How it works...

There's more...

See also

Waiting for I/O operations with poll() and select()

Getting ready

How to do it...

There's more...

See also

Managing asynchronous notifications with fasync()

Getting ready

How to do it...

There's more...

See also

Additional Information: Working with Char Drivers

Exchanging data with a char driver

Additional Information: Using the Device Tree

Device tree internals

Using the device tree compiler and utilities

Obtaining a source form of a running device tree

Notes on the device tree utilities

Getting application-specific data from a device tree

Using a device tree to describe a character driver

How to manage different device types

How to add sysfs properties to devices

Configuring the CPU pins for specific peripherals

The Armada 3720

The i.MX7Dual

The SAMA5D3

Using a device tree to describe a character driver

Additional Information: Managing Interrupts and Concurrency

Deferring work

The shared work queue

The container_of() macro

Notifiers

Kernel timers

Additional Information: Miscellaneous Kernel Internals

Dynamic memory allocation

Kernel doubly linked lists

Kernel hash tables

Getting access to I/O memory

Spending time in the kernel

Additional Information: Advanced Char Driver Operations

Technical requirements

Going up and down within a file with lseek()

Using ioctl() for custom commands

Accessing I/O memory with mmap()

Locking with the process context

Waiting for I/O operations with poll() and select()

Managing asynchronous notifications with fasync()

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部