Uboot Startup Process Understanding

Source: Internet
Author: User

for 2440, there are not many ways to start. Generally is the outside a NAND flash, 2440 has a NAND flash inside
Controller, the first 4K of NAND Flash is automatically copied to 2440 in-chip SRAM. 2440 this in-chip SRAM is called
Stepping Stone is also just 4 K.
when you make your startup code, it's uboot. Uboot is generally divided into two parts, generally called BL1 and BL2.
BL1 and BL2 both add up to the whole uboot. Each of the two sections has a division of labor.
in order to meet the 2440 characteristics, the size of the BL1 will be set to 4K, this 4 K needs to complete the task is:
1, configure the memory (for 2440来 said, memory is SDRAM).
2. After the memory is configured, the entire uboot is transported to the SDRAM operation.
at this point BL1 's mission is complete, followed by BL2, he runs on the SDRAM, the OS on Flash will also be carried to the SDRAM
run. Then the entire boot process is complete.

Chip replacement upgrade, turned into s5pv210, at this time to start the way not to 2440 so single, such as the SD card boot, EMMC boot, USB boot, and so on startup mode, and then the external memory is no longer the SDRAM this simple memory, but DDR this memory. So the preparatory work that needs to be done in the beginning is greatly increased.
Therefore, s5pv210 inside a more called irom of things, his internal curing a program, after power on Irom will start the internal program, some external devices for simple initialization, such as SD card, eMMC and so on.
Internal SRAM has also been upgraded from 4k to 96k. To meet more complex configuration requirements.

So next, take a look at Samsung's official recommended Uboot boot process.


similar to the 2440 boot process, it automatically copies external fixed-size programs to the on-chip SRAM when power is on.
for 2440来 speaking, this size is 4K. And for 210来 this size is 16K.
Assuming that we are now choosing the SD card to boot, then our uboot will of course be placed on the SD card. In the same vein to satisfy,
210 of the features, Uboot will also be divided into two parts--bl1 and BL2;BL1 size of course is 16K.
then, after power-up, the 16K is automatically copied to the on-chip SRAM, a process that is
Irom is completed (this process is often referred to as BL0). The SRAM on the chip is not filled and has a capacity of 80K.
Samsung thought, this 80K capacity also enough BL2 put. So, as Samsung envisioned, when BL1 was loaded into SRAM.
BL1 began to run, at this time BL1 task as long as the BL2 also carried to the SRAM can be. Then let BL2 go to configure DDR,
and move the OS to the DDR operation.
that is, the task assigned to BL1 by Samsung is to carry BL2 to SRAM; the task assigned to BL2 is to configure DDR and move the OS
to the DDR run.


Can't take the Samsung way.
    So uboot to BL1 and BL2 reassign tasks: (Of course, the size of BL1 can only be 16K, this is the program in the Irom is fixed, it will only copy the contents of the first 16K to SRAM.
  BL2 just need to move the OS to the DDR to run.

Well, the 3-star recommended approach, and Uboot's approach to their differences comes out:
1, Uboot entrusted to BL1 task than Samsung to BL1 task to more. He first needs to configure the DDR, and then
BL2 transport to DDR operation. The mission of Samsung to BL1 is simply to move the BL2 into the on-chip SRAM operation.
2, Uboot Way, BL2 is running on the DDR, while the Samsung Way BL2 is running on the on-chip SRAM.
3, Uboot Way, BL2 just carry OS to DDR; Samsung's way, BL2 need to configure DDR before moving the OS to
Ddr.

Summarize:
1, SRAM he inside the chip, he can directly access, without initialization. and Ddr,sdram this external
Memory is required to initialize, we need to write some configuration program, after initialization can be accessed. So whether it's
2440, or 210, or Intel. are followed by a gradual start-up process.
2, for 2440来 said, first need to load the external flash 4K content into the SRAM, and then through the SRAM running code
To initialize the SDRAM, and move the main program to the SDRAM.
3, for 210来 talk is also like this, will be the external flash first 16K content copied to the SRAM.
4, distinguish between BL0 and BL1,BL2. BL0 is actually a program that solidifies inside a chip. and BL1 and BL2 are the two parts that make up the boot.
The size of the BL1 must be designed according to the characteristics of the chip. For 2440来 said your BL1 should not exceed 4K, for 210来 said BL1 should not exceed 16K.
5, we write the boot, you can also refer to the Samsung step, as long as your BL2 is not more than 80K.
7, DDR or SDRAM is much larger than the on-chip SRAM, so as long as the external memory is initialized, a lot of things (such as BL2) is no longer limited by the size of a certain extent.

Uboot Startup Process Understanding

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.