


Linux Driver Development with Raspberry Pi - Practical Labs Embedded systems have become an integral part of our daily life. They are deployed in mobile devices, networking infrastructure, home and consumer devices, digital signage, medical imaging, automotive infotainment and many other industrial applications. The use of embedded systems is growing exponentially. Many of these embedded systems are powered by an inexpensive yet powerful system-on-chip (SoC) that is running a Linux operating system. The BCM2837 from Broadcom is one of these SoCs, running quad ARM Cortex A53 cores at 1.2GHz. This is the SoC used in the popular Raspberry Pi 3 boards. This book follows the learning by doing approach, so you will be playing with your Raspberry Pi since the first chapter. Besides the Raspberry Pi board, you will use several low-cost boards to develop the hands-on examples. In the labs, it is described what each step means in detail so that you can use your own hardware components adapting the content of the book to your needs. You will learn how to develop Linux drivers for the Raspberry Pi boards. You will start with the simplest ones that do not interact with any external hardware, then you will develop Linux drivers that manage different kind of devices: Accelerometer, DAC, ADC, RGB LED, Buttons, Joystick controller, Multi-Display LED controller and I/O expanders controlled via I2C and SPI buses. You will also develop DMA drivers, USB device drivers, drivers that manage interrupts and drivers that write and read on the internal registers of the SoC to control its GPIOs. To ease the development of some of these drivers, you will use different types of Linux kernel subsystems: Miscellaneous, LED, UIO, USB, Input and Industrial I/O. More than 30 kernel modules have been written (besides several user applications), which can be downloaded from the book's GitHub repository. This book uses the Long Term Support (LTS) Linux kernel 5.4, which was released on November 2019 and will be maintained until December 2025. The Linux drivers and applications developed in the labs have been ported to three different Raspberry Pi boards: Raspberry Pi 3 Model B, Raspberry Pi 3 Model B+ and Raspberry Pi 4 Model B. This book is a learning tool to start developing drivers without any previous knowledge about this field, so the intention during its writing has been to develop drivers without a high level of complexity that both serve to reinforce the main driver development concepts and can be a starting point to help you to develop your own drivers. And, remember that the best way to develop a driver is not to write it from scratch. You can reuse free code from similar Linux kernel mainline drivers. All the drivers written throughout this book are GPL licensed, so you can modify and redistribute them under the same license. Note: The Linux kernel 5.4 in this book has been compiled using Ubuntu 20.04 LTS. Ubuntu versions other than 20.04 LTS have not been tested and the build of the Linux kernel 5.4 with these versions may generate different compilation problems.
| Asin | B096LPVG1X |
| Dimensions | 7.5 x 1.46 x 9.25 inches |
| Isbn 13 | 979-8516120688 |
| Item Weight | 2.79 pounds |
| Language | English |
| Print Length | 648 pages |
| Publication Date | June 6, 2021 |
| Publisher | Independently published |
K**R
Book is full of labs to control hardware, ie GPIO, I2C and SPI
I have only had the book for a few and it is going to take some time to get through it but I wanted to give a first impression since this is a new book and has little to no history yet.I have developed a fair amount of software, mostly under DOS and Windows for PC applications. Many of those applications were to control some type of hardware either a test instrument or some type of module controlling lower level hardware (GPIO or SPI) using a USB interface. I have also created a variety of boards that use GPIO and SPI (have not tried I2C yet) to build test systems. I have been intrigued with the Raspberry Pi and Beaglebone platforms for some time and have been looking for some good books to help out with the issues of Linux and controlling the hardware without having the assistance of high level drivers. This book seems to fit that need. I will know more after I start building code and toggling bit. Speaking of toggling bits, I had previously build my own board LED driver board where I can light up 15 LEDs using open collector transistors (2N3904) and developed some code using libgpiod.In the preface of the book it lists 9 development boards which are required to perform the hardware labs. This is a step up from the build your own breadboard circuits listed in most books. However, be aware that purchasing all 9 of these boards will run somewhere in the neighborhood of $250 by the time you add tax and shipping. Also, you will need 2 of the pushbutton boards for at least one of the labs. As I mentioned earlier, I have built several boards and was looking for some good board projects to do. I think it would be feasible to build a project board to implement the functionality of 6 or 7 of the 9 boards listed. I was already looking for a similar type of project to help with developing my own code. I am interested if anyone else has thoughts on this.I am giving 4 stars based only on first impression. The cost of the boards is a big concern but they are all useful boards and they can (mostly) be used on various projects for years to come. The Microchip board (I do like Microchip and have several of their boards) tend to have a lifespan of the current operating system. USB boards tend to only work under the operating system they were developed under. I have some Windows XP and Windows 7 boards that are totally useless under Windows 10. Maybe someone else out there knows how to make them work.This book does not teach you how to program (most of the code is written in C. I did see one reference to Python). It also does not teach you Linux. If you need help with those, buy another book. This book shows you how to use the hardware of the Raspberry Pi to connect to the outside world and do something useful. The code you develop by going through these labs will allow you to control just about any hardware you can imagine. The one thing that may be missing from a hardware perspective (I have not seen it yet but it may be in there) Is warnings about the potential to damage the hardware if things are connected improperly. Some of this potential has been mitigated by the use of development boards but they can be wired incorrectly and cause damage to either the Raspberry Pi or the development board itself. I can't speak to how much damage can be caused to either but this is a warning that is usually present in most books.Have fun with your hardware and I look forward to reading the reviews of others. I will potentially come back later and add reviews of specific chapters or topics as I get through them.
D**N
Lot's or problems with this book
This book is filled with errors, inconsistencies, and omissions. Although I find the helpful overall, I find that there are a lot of things that can be improved. There may be a lot of questions that could be resolved with an errata, but none exists for this book (other titles from this author have errata).First, the book describes downloading and compiling kernel 5.4 but this error completes very early (I've compiled multiple version of linux kernel and have never seen an early failure like this). I had much better luck with with the 5.15 kernel but I'm not sure if there will be inconsistencies or variations required with this kernel.Second, the book doesn't mention that it was written explicitly for the Raspberry Pi 3. If you are using different hardware, you still have access to the books platform specific source code (device tree, etc.) but you are on your own to ensure that the mods work with you hardware and kernel. This is a real problem for books that can support multiple version of hardware but it should at least be noted that different versions are available.One of the most annoying parts of the book is the steps for testing the labs. The messages it suggests are displayed only appear in the 'dmesg' log (you can change how this is displayed but that is not discussed). Also, there is no explanation of what each step is trying to accomplish. Then, there a quite a few of the commands that require superuser privileges but this is never mentioned (use sudo <cmd> of sudo -i to enter an interactive superuser shell).Overall, I find this book useful, but only if you have a LOT of experience with linux and a modest amount of kernel experience.
J**N
No color on my book, too expensive
A bit disappointed no colors, only grey scale. For the price, I was expecting a full color book and better paper.About the content, is really good the book. Also a good introduction for Linux Driver development.
K**D
e-book version is incompatible
Don't buy the e-book version, it can't be read on a kindle paperwhite and everywhere else it's just a PDF that you have to zoom in to read. Can't speak to the content yet
Trustpilot
1 month ago
2 weeks ago