Embedded Linux Learning (Day N)-Summary of Linux System Knowledge

Make complaints

Emmmm first talked about it, and I do not recommend the book "Detailed Explanation of ARM Embedded Linux System Development". The first one is old and the knowledge is too old. Linux is developing rapidly, and many are not doing that... For example, there is no introduction in the device tree that I want to see, because this is the technology of the last 10 years...(10 years...you can imagine how out this game should be)...The second point is that this game should be in order. Pit... I quickly read the entire book... My brain hurts... I don’t feel that it helps much... So this is the end of my column. Summarize the key points of my rapid reading and understand the Linux operating system architecture. . I think I understand a little bit, so I can go to see Petalinux. That uses a cross-compilation software, Petalinux is Xilinx, and an emmmm of the Zynq series I think it is to quickly build a cross-compilation software suitable for the platform operating system.

BootLoader

BootLoader is the first link in the development of embedded software. It closely connects the software and hardware of the embedded system. BootLoader initializes the target hardware, the embedded operating system provides hardware resource information, and loads the system.
Introduce a startup procedure based on U-boot (a software for configuring BootLoader)
Insert picture description here

The Start label sets global variables for starting the program. The U-boot image is copied from the Flash memory to the memory.
Reset label configuration register
Cpu_init_crit label refresh cache and TLB
Lowlevel_init copy SMRDATA to memory
Relocate label load uboot Stage2 from Flash to memory
Start_armboot initialize ARM system hardware and environment variables
main_loop mainly includes initializing the limit on the number of startups, setting the software version number, and printing startup information , Parsing commands, etc.

Analyze the Linux kernel

http://www.kernel.org is the official site of the linux kernel code. On Linux systems, the kernel usually contains
several important Linux kernel files in the /usr/src directory.
vmlinux: only contains a minimal function kernel
initrd: the memory disk initialized by BootLoader
System.map: is the kernel symbol table, corresponding to a kernel vmlinux image

Embedded Linux startup process

Insert picture description here
Insert picture description here

Cross-compilation tool chain (not tried...no board...a brief introduction)

Cross-compilation is to compile a system on one platform that can run on another platform with a different structure. For example, x86 compiles a system that can run on arm (the two instruction sets are different), but it cannot run on x86.
Tools include cross-compiled compilers, linkers, object libraries, etc... The most famous on Win is ADS. The Armcc compiler provided by ADS can easily generate executable code for ARM CPU.
The gcc compiler will be used on Linux systems.
When running gcc, name it according to the prescribed format: CPU-PLATFORM-OS, because gcc will only find the application path with the correct name. For ARM, it is arm-linux-gnu.
3 ways to build a cross-compilation chain
1. Step-by-step manual compilation
2. Compiling by script
3. Directly obtaining the
source code of the cross-compilation chain
1. Linux kernel code
2. glibc library
3. Common user tools such as binutils
4. Kernel thread package
5. , The
specific operation of the compiler gcc is slightly (to build a compilation environment)...because I use Petalinux...after learning

Guess you like

Origin blog.csdn.net/u010594449/article/details/105847670
Recommended