当前位置:网站首页>Analysis of uboot directory structure
Analysis of uboot directory structure
2022-04-23 01:06:00 【Nine threshold】
Version number changes
2008 year 8 Month and before , Name it by version number :u-boot-1.3.4.tar.bz2(2008 year 8 Monthly update )
2008 year 8 After the month is named by the date . The latest version :u-boot-2011.06.tar.bz2(2011 year 6 Monthly update )
Directory structure changes
u-boot Directory structure mainly experienced 2 Changes ,u-boot For the first time, the version came from u-boot-1.3.2 It's starting to change , Mainly increased api The content of ; The biggest change is the second time , from 2010.6 Version start .
u-boot-2010.03 And previous versions
├── api Deposit uboot Interface functions provided
├── board Customized code according to different development boards , There's a lot of code
├── common Common code , It covers all aspects , It has been processed on the command line
├── cpu Architecture related code ,uboot The play of
├── disk Disk partition related code
├── doc file , a pile README Opening file
├── drivers drive , Very rich , Each type of device driver occupies a subdirectory
├── examples The sample program
├── fs file system , Support common file system of embedded development board
├── include The header file , The general header file is the main one
├── lib_【arch】 Common library files related to architecture
├── nand_spl NAND Memory related codes
├── net Network related code , Small protocol stack
├── onenand_ipl
├── post Power on self test program
└── tools Auxiliary program , For compiling and checking uboot Target file
from u-boot-2010.06 Version begins to merge architecture related content , The original cpu And lib_arch All the contents are included in arch in , And it adds inlcude Folder ; Separate the general library file lib.
u-boot-2010.06 And later versions
├── api Deposit uboot Interface functions provided
├── arch Architecture related code ,uboot The play of
├── board Customized code according to different development boards , There's a lot of code
├── common Common code , It covers all aspects , It has been processed on the command line
├── disk Disk partition related code
├── doc file , a pile README Opening file
├── drivers drive , Very rich , Each type of device driver occupies a subdirectory
├── examples The sample program
├── fs file system , Support common file system of embedded development board
├── include The header file , The general header file is the main one
├── lib General library files
├── nand_spl NAND Memory related codes
├── net Network related code , Small protocol stack
├── onenand_ipl
├── post Power on self test program
└── tools Auxiliary program , For compiling and checking uboot Target file
The directory involved in the migration work
from uboot Code root , It can be seen that it is already very large , It's also very functional .
The most important thing for porting is to look at the corresponding processor and development board code ,2010.06 After the release, processor related code is concentrated in arch、board Catalog .( Previous versions were mainly in cpu and board Catalog )
Have a look first arch Catalog :
arch
├── arm
├── avr32
├── blackfin
├── i386
├── m68k
├── microblaze
├── mips
├── nios2
├── powerpc
├── sh
└── sparc
arch The contents of the directory are cleaner than the previous versions , Each subdirectory represents a processor type , The subdirectory name is the type name of the processor .
We transplanted mips The processor of , So for reference arch/mips Catalog :
arch/mips
├── cpu
├── include
└── lib
arch/mips There are three directories in the directory , It's the same structure in other processor directories :
cpu Subdirectories correspond to different product models or series of a processor ;
include Subdirectories are header files used by the processor ;
lib Directory pairs apply to code common to processors ;
Let's see below. cpu Below ,arch/mips/cpu Contents under the directory :
arch/mips/cpu
├── asc_serial.c
├── asc_serial.h
├── au1x00_eth.c
├── au1x00_serial.c
├── au1x00_usb_ohci.c
├── au1x00_usb_ohci.h
├── cache.S
├── config.mk
├── cpu.c
├── incaip_clock.c
├── incaip_wdt.S
├── interrupts.c
├── Makefile
└── start.S Whole uboot Code entry point
The latest version (2011.6 Version start ) in cpu Create in directory mips32 Catalog , hold incaip and au1x00 It's also classified into different categories .
u-boot.lds yes ld The program is the script file of the connector , This file describes how to connect to the target file ,ld According to the instructions of this file, the program will connect different object files together according to the requirements to generate the program for burning to the development board .
The document is placed in board In the corresponding directory .
u-boot working process
U-Boot The process of starting the kernel can be divided into two stages , The functions of the two stages are as follows :
(1) The function of the first stage
Ø Hardware device initialization
Ø load U-Boot Phase two code to RAM Space
Ø Set up the stack
Ø Jump to the second phase code entry
(2) The function of the second stage
Ø Initialize the hardware devices used in this phase
Ø Detect system memory mapping
Ø Take the kernel from Flash Read RAM in
Ø Set the boot parameters for the kernel
Ø Call kernel
Reproduced in :https://blog.csdn.net/ccccdddxxx/article/details/6800135
https://blog.csdn.net/AndroidBBC/article/details/50961163
版权声明
本文为[Nine threshold]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221042177731.html
边栏推荐
- Improvement of ref and struct in C 11
- 员工公寓楼建设项目电力监控系统的研究与应用
- On the soft test, these common questions must be understood
- Free trial for the first three months! Borui data alarm platform onealert is in progress
- Function encapsulation such as addition, deletion, modification and query of linked list (summary)
- 为企业出海“搭桥”,汇量科技靠什么出圈?
- Android development interview questions collection and sorting (including answers), [work perception]
- 【以太网交换安全】--- 交换机流量控制/DHCP Snooping/IP Source Guard
- 留给给5月的文章
- L2-023 graph coloring problem (25 points)
猜你喜欢

Shenkaihong News Studio opened for the first time to witness the whole process of the growth of the times

Yunrong technology joined the dragon dragon dragon community to help the digital transformation of the financial industry

Hardware IIC analysis and configuration process of imx6ull bare metal development

How does zhiting connect Xiaomi smart speakers?

API IX JWT auth plug-in has an error. Risk announcement of information disclosure in response (cve-2022-29266)

体育训练中心项目电力监控系统的研究与应用

Soochow securities x kangaroo cloud: the data is easily available and has millisecond response ability. What did Soochow securities do right?

为企业出海“搭桥”,汇量科技靠什么出圈?

Enterprises choose to privatize the deployment of IM instant messaging software to fully protect information security!

200. Number of islands
随机推荐
L2-013 red alarm (25 points)
Multi surveyor Xiao sir_ Senior gold medal lecturer_ Interview questions
C language guessing game and trickery game
2.60 - suppose we number the bytes in a W-bit word from 0 (lowest bit) to w / 8 - 1 (highest bit). Write the code of the following C function, which will return an unsigned value, in which byte I of p
DCB“一哥”先瑞达,靠什么拉升价值曲线?
Shenkaihong News Studio opened for the first time to witness the whole process of the growth of the times
Comp1011 programming solution
leetcode 134. gas station
Secret of 66% performance surge: AMD 25000 yuan 768mb 3D cache Xiaolong opened the cover for the first time
Yyds dry goods counting flag variable rule
Lightly: a new generation of go IDE
Elk setup (IV): monitor MySQL slow query and error log
Three technical solutions of ant group were selected as "typical solutions for information technology application and innovation in 2021"
【蓝桥杯国赛真题18】Scratch加法选择题 青少年组 scratch蓝桥杯国赛真题和答案讲解
Application of safe electricity management platform in Jingbian Museum safe electricity management system
Mobile Jingdong Mall
[server data recovery] data recovery case of server crash after the hard disk of the server is flooded
曦智科技沈亦晨入选2022达沃斯世界经济论坛“全球青年领袖”
Redis forgets the password and resets the password
[HCTF 2018]admin