Embedded Linux framework of understanding

In embedded linux work for years, if you count the self-study during college, it can be considered an engineer. He wrote bottom bootloader, kernel driver and upper application period. For the interior of the chip module are college with verilog fpga's played, so for the whole embedded frame can be considered a little bit to understand, today we come together to talk about. If the deviation, please let me know!

First look at the whole framework still.

Speaks well understood, embedded Linux framework

 

About bootloader

1, when a power board, because the chip has a boot function will automatically transfer boot code from the flash and performs processing. The code here is actually the first stage of the bootloader. In fact, that has a boot bootloader and loarder functions. Boot Code is conveyed, the guide, loarder driving each load is required.

2, bootloader first stage to do, specifically what has been done can see the figure.

 

Speaks well understood, embedded Linux framework

 

 

3, the first stage of the bootloader mainly compiled code followed by a second phase of the code is substantially c. Here it is mainly initialized peripheral equipment required, such as network card driver, serial driver and so on, and then start the kernel.

4, start the kernel can boot from the network, it can also sd / emmc card starts. The main kernel code is to loard into the DDR, and then executed.

Bootloader memory distributed as follows:

Speaks well understood, embedded Linux framework

 

IP core on the chip (each module controller)

For some IP cores within chips, that is, each module controller, in fact, are achieved through the FPGA. It is a field programmable gate array FPGA. Take for example I2C controller, for example. SDA and SCL I2C mainly the two lines, to realize the function is to transfer data. Inside the IP core logic can achieve a lot, for example, when a device address to be transmitted, with the main bit register, the state machine module acquires this data and then transmits the data line SDA is the slave address of the device, then the device will respond from a low level, then the SDA line of this module With this low level, then you can know the address of the sending device correctly. And we do not need to know the internal IP core is how to deal with, just need to configure the data to a register, then the module will be handled accordingly. Of course, the simulation method may be used, so it is the role of the IP core, with a register to implement the functions to hide the internal operation timing of the package well.

As for the other modules are also the same principle.

About Core

Speaks well understood, embedded Linux framework

 

When the bootloader the kernel code loard into the DDR, then we would start the kernel. Start simple kernel as follows:

 

Speaks well understood, embedded Linux framework

 

 

When the kernel startup is complete, it will call the user's init daemons.

About linux file system

When the kernel calls to the linux file system, then you can run the program you want the console terminal. Concrete and linux operating system without much difference.

About android file system

When found the android init program. The following chart good analysis of the startup process of android.

From the above we can know we have to use a cell phone or pad in the end is how to achieve. In fact, embedded linux also the stuff, but to learn these, there are still a lot of the need to accumulate and learning.

Guess you like

Origin www.cnblogs.com/ct20150811/p/11277221.html