<Android development> Android kernel system development - detailed explanation of the startup process (Part 1 init.rc syntax details)

<Android development> Android kernel system development - detailed explanation of the startup process (Part 1 init.rc syntax details)

Foreword:
The detailed explanation process of the android system development code, etc., all take Qualcomm 8155 as an example, and the code is based on the LA 1.1 baseline code open to manufacturers as an example (the baseline code, etc., only Qualcomm authorized manufacturers have the right to download).
The startup of an Android device must go through three stages, including bootloader, Linux Kernel, and Android system services. Each stage has its corresponding startup interface. It can be seen from the process of the startup phase that the Android system is actually a series of "service processes" running on the Linux kernel, and is not an "operating system" in a complete sense. These "service processes" are the key to maintaining the normal operation of the device, and the "ancestor" of these processes is the init process, which is the first process started by the Linux kernel.
init is the first process to be started, and its process PID value is 0; the process init builds the initial running form of the system by parsing the init.rc script; most system services in android are started by init.rc . Therefore, the writing and implementation of init.rc is a sharp sword for each manufacturer to control the startup state of its own R&D equipment.
Before familiarizing yourself with the contents of init.rc in detail, let's take a look at the syntax format of the ".rc" file. So this section mainly explains the syntax of init.rc.

Syntax of init.rc

In Qualcomm's LA1.1 baseline code, there are few comments on init.rc, and there is a document "system\core\init\README.md" in the source code directory to analyze the source code.
A complete init.rc script consists of 4 types of declarations, namely:
* Actions (action)
* Commands (command)
* Service (service)
* Op

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324492960&siteId=291194637