Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering Embedded Linux Development

You're reading from   Mastering Embedded Linux Development Craft fast and reliable embedded solutions with Linux 6.6 and The Yocto Project 5.0 (Scarthgap)

Arrow left icon
Product type Paperback
Published in May 2025
Publisher Packt
ISBN-13 9781803232591
Length 710 pages
Edition 4th Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Frank Vasquez Frank Vasquez
Author Profile Icon Frank Vasquez
Frank Vasquez
Chris Simmonds Chris Simmonds
Author Profile Icon Chris Simmonds
Chris Simmonds
Arrow right icon
View More author details
Toc

Table of Contents (28) Chapters Close

Preface 1. Part 1: Elements of Embedded Linux
2. Starting Out FREE CHAPTER 3. Learning about Toolchains 4. All about Bootloaders 5. Configuring and Building the Kernel 6. Building a Root Filesystem 7. Part 2: Building Embedded Linux Images
8. Selecting a Build System 9. Developing with Yocto 10. Yocto under the Hood 11. Part 3: System Architecture and Design Decisions
12. Creating a Storage Strategy 13. Updating Software in the Field 14. Interfacing with Device Drivers 15. Prototyping with Add-On Boards 16. Starting Up – The init Program 17. Managing Power 18. Part 4: Developing Applications
19. Packaging Python 20. Deploying Container Images 21. Learning about Processes and Threads 22. Managing Memory 23. Part 5: Debugging and Optimizing Performance
24. Debugging with GDB 25. Profiling and Tracing 26. Real-Time Programming 27. Index

Selecting hardware for embedded Linux

If you are designing or selecting hardware for an embedded Linux project, what do you look out for?

  • First, a CPU architecture that is supported by the kernel – unless you plan to add a new architecture yourself of course! Looking at the source code for Linux 5.15 there are 23 architectures each represented by a subdirectory in the arch/ directory. They are all 32-or 64-bit architectures, most with an MMU, but some without. The ones most often found in embedded devices are Arm, RISC-V, PowerPC, MIPS, and x86 each in 32-and 64-bit variants all of which have Memory Management Units (MMUs).
  • Most of this book is written with this class of processor in mind. There is another group that doesn’t have an MMU and that runs a subset of Linux known as a microcontroller Linux or uClinux. These processor architectures include ARC (Argonaut RISC Core), Blackfin, MicroBlaze, and Nios. I will mention uClinux from time to time, but I will not go into detail because it is a rather specialized type.
  • Second, you will need a reasonable amount of RAM. 16 MB is a good minimum, although it is quite possible to run Linux using half of that. It is even possible to run Linux with 4 MB if you are prepared to go to the trouble of optimizing every part of the system. It may even be possible to get lower, but there comes a point at which it is no longer Linux.
  • Third, there is non-volatile storage, usually flash memory. 8 MB is enough for a simple device such as a webcam or basic router. As with RAM, you can create a workable Linux system with less storage if you really want to, but the lower you go the harder it becomes. Linux has extensive support for flash storage devices, including raw NOR and NAND flash chips, and managed flash in the form of SD cards, eMMC chips, USB flash memory, and so on.
  • Fourth, a serial port is very useful, preferably a UART-based serial port. It does not have to be fitted on production boards but makes board bring-up, debugging, and development much easier.
  • Fifth, you need some means of loading software when starting from scratch. Many microcontroller boards are fitted with a Joint Test Action Group (JTAG) interface for this purpose. Modern SoCs can also load boot code directly from the removable media, especially SD and microSD cards, or serial interfaces such as QSPI or USB.

In addition to these basics, there are interfaces to the specific bits of hardware your device needs to get its job done. Mainline Linux comes with open source drivers for many thousands of different devices, and there are drivers available (of variable quality) from the SoC manufacturer and from the OEMs of third-party chips that may be included in the design.

Remember my comments on the commitment and ability of some manufacturers. As a developer of embedded systems, you will find that you spend quite a lot of time evaluating and adapting third-party code, if you have it, or liaising with the manufacturer if you don’t. Finally, you will have to write the device support for the interfaces that are unique to the device or find someone to do it for you.

You have been reading a chapter from
Mastering Embedded Linux Development - Fourth Edition
Published in: May 2025
Publisher: Packt
ISBN-13: 9781803232591
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime