Arm Learning note 012 mini2440 Startup and initialization program analysis (i.e. bootloader analysis)

Source: Internet
Author: User
The implementation of the boot Loader in an embedded system relies entirely on the CPU's architecture, so most boot
Loader are divided into the first and second phases, which depend on the CPU architecture of the code, such as the device initial
Code, etc., are usually placed in phase 1, and are usually implemented in assembly language to achieve a short and concise purpose.
Phase 2 is usually implemented in C, which enables complex functions, and the code has a better

Readability and portability.

The first phase includes:

(1) Initialization of hardware devices

① initialization of Gpio functions

② setting the speed and clock frequency of the CPU

③ Storage Control Unit initialization

(2) Copy the bootloader program into RAM space

(3) Set up the stack.

(4) Jump to the C population address of stage 2


The second phase includes:

(1) Initialize the hardware device to be used at this stage;

① initialization of at least one serial port

② initialization Timer (timer)

③ initialization of network transmission, etc.

(2) system memory map;

(3) Read the kernel image and the root file system image from Flash to ram space;

Loading kernel image and root file system image

(4) Set the boot parameters for the kernel;

(5) Call the kernel.


See my 360 network Disk file, "Experimental three bootloader experiment" pdf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.