Salary Increase Secrets for Embedded Linux Development

    Follow and star the public account for direct access to exciting content

Source: Online Materials

As the saying goes, the beginning is always the hardest. When you first start, do you find yourself completely unsure of how to begin? Searching online leads to a jumble of new terms that leave you lost. Even going to the library for books doesn’t provide direction. With terms like ARM, Linux, and U-Boot, it can be overwhelming, and you might not know where to start.

Let’s follow my journey of learning to become an embedded engineer!
In simple terms, we will progress from basic knowledge of ARM to bare-metal programming, from uCOSII to Linux, from basic Linux commands to shell programming, from U-Boot to file systems, and finally to Linux drivers. The learning path goes from simple to complex, from basic to advanced.

01

Phase One: Basics of Embedded Hardware and Bare-Metal Programming

1. Knowledge Points:
(1) Basics of ARM processors, operating modes, registers, interrupts and exceptions, addressing modes, assembly instruction set
(2) Familiarity with the ADS integrated development environment in preparation for bare-metal programming
(3) Bare-metal programming: LED, serial port, LCD, touchscreen, NAND FLASH, IIC, IIS, DMA, etc.
2. Process and Purpose:
This phase of learning mainly focuses on familiarizing oneself with embedded hardware to lay the foundation for future Linux drivers. Since the main processor architecture in embedded systems is ARM, we will focus our studies on ARM. First, we will learn the basic knowledge and then practice on development boards. The materials used in this phase mainly include:
(1) “ARM Embedded Basics Tutorial” – This book covers the fundamentals of ARM. Although it discusses ARM7, the basic instruction set and model are the same across ARM architectures.
(2) “Complete Manual for Embedded Linux Application Development” – This book mainly covers the S3C2410 interface module, which is necessary for understanding hardware when experimenting with bare-metal programming.
3. Time Taken:Approximately two months.

02

Phase Two: Basics of Linux and Shell Programming

1. Knowledge Points:
(1) Basic knowledge of Linux
(2) Installation and usage of Linux
(3) Common Linux commands
(4) Using vi editor
(5) Basic shell programming
2. Process and Purpose:
This phase focuses on becoming familiar with Linux, being able to install it, and understanding its basic concepts. It is recommended to install Linux on a virtual machine initially, and for development boards, Fedora9 is recommended. Follow the instructions that come with the development board step by step, and practice various commands on it.
The main resource for this phase is “The Linux Command Line” by William Shotts. This book has an electronic version and doesn’t need to be read in its entirety; focus on the sections that describe the basic knowledge of Linux and fundamental commands. It’s sufficient to understand the commands, as it’s impossible to memorize them all; you can look them up as needed in the future. The main goal of this phase is to gain an overall understanding of Linux, at least to know some basic concepts and be able to perform some basic operations.
3. Time Taken:Approximately one month.

03

Phase Three: Basics of Linux Application Development

1. Knowledge Points:
(1) Basics of GCC, GDB, and Make
(2) File and time programming
(3) Multi-process and multi-thread programming
(4) Inter-process communication
2. Process and Purpose:
This phase focuses on understanding the writing and debugging of Linux applications, which are also fundamental concepts. The main goal is still to become familiar with Linux. During this phase, I mainly referred to “Standard Tutorial for Embedded Linux Application Development,” which provides detailed explanations on writing applications on Linux, and it is not very difficult. The classic book “Advanced Programming in the UNIX Environment” is more in-depth and can be challenging for beginners, so it’s best to start with simpler materials. After learning application programming, it’s not mandatory to stay in application development; however, it is a fundamental skill for those in the embedded Linux industry.
3. Time Taken:Approximately one month

04

Phase Four: Learning the uCOSII Operating System

1. Knowledge Points:
(1) Concepts and basic knowledge of embedded real-time operating systems
(2) Reading the source code of the uCOSII operating system
(3) Porting uCOSII
(4) Application programming for the uCOSII operating system
2. Process and Purpose:
This phase focuses on understanding the basics of embedded real-time operating systems, as uCOSII is open-source and its code can be studied. It provides an intuitive understanding of task scheduling and resource management in operating systems. Reading its source code can improve one’s programming ability and standardize coding practices. Although there are provided porting versions of uCOSII, performing the actual porting oneself leads to a deeper understanding.
This operating system is relatively simple, so writing application programs becomes crucial, and implementing several functions will aid in understanding the system. The main resource for this phase is the book “Embedded Real-Time Operating System uCOS-II” translated by Shao Beibei, which includes detailed analysis of the source code. After thoroughly reviewing this book, one will gain a deep understanding of uCOSII.
The main goal of this phase is to understand operating system concepts such as task scheduling, concurrency, and race conditions. Another goal is to enhance programming skills. Reading an introduction to operating system principles can be dull, so I find that studying the source code of an operating system is much more beneficial than reading numerous introductory books.
3. Time Taken:Approximately one month

05

Phase Five: Learning Bootloader

1. Knowledge Points:
(1) Basics of bootloaders
(2) Basics and commands of U-Boot
(3) Porting U-Boot
2. Process and Purpose:
The bootloader is an essential part of a Linux embedded system. This phase of learning mainly focuses on understanding the role of bootloaders and knowledge of the generic bootloader, U-Boot. Initially, one should learn to use various commands in U-Boot, then analyze the boot process of U-Boot, the Makefile, and the process of U-Boot loading the kernel.
Next, follow others’ steps to port the kernel step by step, repeating several times to become familiar with the process. Once comfortable with U-Boot, independently complete the porting of U-Boot and make modifications. The primary reference materials for this phase are the U-Boot porting reference manual that comes with the disc and various online articles. I feel that online resources for U-Boot porting are quite abundant.
3. Time Taken:Approximately one month

06

Phase Six: Learning the File System

1. Knowledge Points:
(1) Types and functions of Linux file systems
(2) Familiarity with the use of BusyBox and the Linux system startup process
(3) Building your own root file system
2. Process and Purpose:
The file system is also an indispensable part of a Linux embedded system. This phase focuses on familiarizing oneself with the role and basic knowledge of the root file system, and building your own root file system. The book “Building Embedded Linux Systems” provides a detailed explanation of all elements of embedded Linux, including the file system.
Here, the focus is mainly on the file system section. I also referenced some online articles. First, familiarize yourself with the basic Linux file systems, then learn to use BusyBox and the Linux startup process, and finally follow others’ steps to build your own file system.
3. Time Taken:Approximately half a month

07

Phase Seven: Embedded Graphical User Interface (GUI)

1. Knowledge Points:
(1) Types and characteristics of embedded graphical user interfaces (GUIs)
(2) Basics of MiniGUI
(3) Porting MiniGUI and programming
2. Process and Purpose:
As an upper-level system component, embedded graphical user interfaces (GUIs) also need to be understood. I only studied MiniGUI, as QT requires knowledge of C++, which I have not learned. Therefore, I only focused on the relevant knowledge of MiniGUI. The purpose of this phase is mainly to familiarize oneself with the development process of embedded graphical interfaces, as I do not plan to engage in application development.
It suffices to port MiniGUI to the board and run a hello program. There is no need to delve deeper into other aspects. Through porting MiniGUI, I gained a new understanding of software and function libraries running on Linux, as well as the principles of program operation and the compiler.
3. Time Taken:Approximately half a month

08

Phase Eight: Basics of Linux Driver Programming

1. Knowledge Points:
(1) Read “Linux Device Drivers” – except for the chapters on network drivers, tty drivers, and block drivers, all others must be read thoroughly.
(2) Experiment with all examples in the book, carefully analyze the results, and understand the related knowledge points.
(3) Even for examples, programming habits must be standardized, and documentation must be regulated.
2. Process and Purpose:
The goal of this phase is to lay the groundwork for Linux drivers. “Linux Device Drivers” (3rd edition), also known as LDD3, is the classic book on Linux drivers and must be read multiple times. The first reading can be challenging, as it may seem obscure. However, after several readings, it will become clearer. After reading the book, experiment with the examples in the book.

3. Time Taken:Approximately two months

09

Phase Nine: Practical Linux Driver Development

1. Knowledge Points:
(1) Understand the registration and implementation of miscellaneous character devices through LED drivers, and master the IO operation process of MINI2440.
(2) Understand basic interrupt implementation methods through button driver programs.
(3) Master PWM driver programming.
(4) Understand the implementation of the input device model through touchscreen driver programs.
(5) Master the design of ADC driver programs.
(6) Master the design of watchdog and RTC driver programs.
(7) Analyze the implementation of the platform device model through LCD driver programs.
2. Process and Purpose:
This phase focuses on mastering the implementation of simple driver programs and analyzing the differences from LDD3. Through this phase of learning, one will gain a deeper understanding of Linux driver programs and enhance the ability to read vast amounts of code. The main work during this phase is to read code, experiment, read code, and experiment, learning through observation.
3. Time Taken:Approximately one month

10

Phase Ten: In-Depth Study of the Linux Kernel and USB Subsystem

Having completed the first nine phases, I feel that I have entered the world of embedded Linux. It is now time to plan for the tenth phase. This phase will help determine my future development direction. Since USB is a standard interface in embedded systems, learning USB-related knowledge is highly competitive. Those who work on drivers should have a certain understanding of the kernel, so “Understanding the Linux Kernel” is essential.
This phase mainly involves studying the USB protocol, reading all the code of the Linux USB subsystem, deepening understanding of USB through code reading, and then familiarizing oneself with various USB class protocols, writing and porting USB drivers. USB is the direction I have chosen, as I believe that specializing in a specific area will yield better results than spreading oneself too thin. Therefore, I have decided to pursue work related to USB in embedded systems. This phase of study is currently ongoing, as I navigate through the vast code of the Linux USB subsystem.
Copyright Statement:This article is sourced from the internet, freely conveying knowledge. All rights belong to the original author. If there are any copyright issues regarding the work, please contact me for removal.

‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧ END ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧

Follow my WeChat public account, reply "Join Group" to join the technical exchange group according to the rules.

Click "Read the original text" for more sharing, feel free to share, bookmark, like, and view.

Leave a Comment