Why do we need U-BOOT? Obviously, the operating system can be burned directly into the flash for execution, but it is indispensable for software upgrades and program patches.
U-BOOT directory structure analysis:
1. board: development board related directory
2. common: common command functions
3. cpu: directories related to specific CPU architectures, such as arm920t
4. doc: uboot development and usage documentation
5. drivers: device drivers supported by uboot, such as serial port, nandflash, network card
6. fs: supported file systems, Uboot now supports cramfs, fat, fdos, jffs2 and registerfs.
7. include: header files and development board configuration files. The configuration files of the development board are in the configs directory
. 8. lib_xxxx: library files related to the architecture. For example, libraries related to ARM are placed in lib_arm.
9. lib_generic: Generic library functions
10. net: various network protocols, TFTP protocol, NFS protocol, etc.
11. tools: uboot built-in tools
U-BOOT startup is divided into two stages
Phase 1: 1) Set the CPU working mode
2) Turn off the watchdog
3) Set the system clock
4) Turn off MMU and CACHE
5) Prepare RAM space for the second stage (borad/smdk2410/lowlevel_init.s)
6) Set up the stack
7) Jump to the second stage C entry point (lib_arm/board.c)
The second stage: 1) start_armboot function
init_sequence:
initialize CPU, set system clock, initialize timer, initialize environment parameters, initialize serial console, detect memory mapping
2) flash_init: initialize NORFLASH
3) env_relocate: initialize environment variables
4) initialize system peripherals
5) finally call main_loop (command/main.c) (download mode and boot mode are here)
U-BOOT does not have a graphical configuration interface, we can only configure it by manually modifying the file
1) A cross compiler is required for the porting process (I use arm_linux_gcc_3.3.2)
2) Specify the environment variable vi /etc/profile, specify the path, comment out the unused ones, then save and exit
3) Source /etc/profile to make it effective, then you can check the version arm-linux-gcc -v to see if it is the current version
4) vi cpu/arm920t/config.mk Comment out the soft floating point because we use hard floating point compilation PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
# -msoft-float /*Comment out*/
5) Modification
在smdk2410_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0
Plus
TX2440_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t TX2440 NULL s3c24x0
The meanings of each item are as follows:
arm: CPU architecture (ARCH)
arm920t: CPU type (CPU), which corresponds to the cpu/arm920t subdirectory.
TX2440: Development board model (BOARD), which corresponds to the board/TX2440 directory.
NULL: Developer/or distributor (vender).
s3c24x0: System on chip (SOC).
At line 128:
ifeq ($(ARCH),arm)
CROSS_COMPILE = arm-linux- specifies the cross compiler, ( http://xgc94418297.blog.163.com/blog/static/112966040200952971543686/ )
6) Change smdk2410 to TX2440 (you can change it as you like, as long as it is consistent) mv smdk2410 TX2440
7) Delete other directories under board and keep only TX2440. Method: mv TX2440 ../ to move to the upper level
rm -rf * //Delete all directories at the same level
mv ../TX2440 ./ //Move the TX2440 on the upper layer to this layer
8) Here you can test whether the compilation is successful
make TX2440_config
The message "Configuring for TX2440 board...." appears, indicating that the compilation is successful.
9) Configure SDRAM (modify BANK and refresh frequency in lowlevel_Init.s)
10) Modify the clock code in TX2440.C.
Available in include/configs/TX2440.h
#define CFG_PROMPT and then modify the command prompt you like.
Previous article:Using STM32 to complete the design of intelligent motor protector
Next article:Detailed explanation of uboot transplantation
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Starting from GPS receiver sensitivity
- Is there a standard for 4-20mA load?
- EEWORLD University Hall----Choosing the latest boost converter and Class D amplifier from Texas Instruments to significantly increase the battery life of the trolley speakers
- MSP430--Low Power Mode
- "Goodbye 2019, Hello 2020" + Life Watershed
- MSP430FR5739 enables applications to connect to the Internet of Things
- Introduction to DDS Principle (Chinese).pdf
- UCOS-II (Translated by Shao Beibei)
- Award-winning live broadcast | TI Embedded Live Broadcast Month is waiting for you [Low-power Wi-Fi MCU, Sitara AM57X platform, machine learning]
- Xunwei imx6ull development board uses C language to call shell commands to control LED lights