Simple analysis of MTK Preloader (II.)

Source: Internet
Author: User


http://blog.csdn.net/mcgrady_tracy/article/details/39340209


Preloader According to MTK is said to be MTK in-house developed loader, also say is MTK internal development of a loader, then separate compilation preloader is also possible, using the command./MK project_name N Pl.

1. Start the process
The first thing to be clear is that preloader, LK, kernel, Android these system image files are stored in NAND flash, and then each MTK chip has a boot ROM, at power-up time, boot ROM start, boot ROM load Preloader into internal SRAM, why it is loaded into internal SRAM, not external RAM, because this time the external RAM is not initialized well, Preloader is loaded, the program from the boot Rom jumps to Preloader to start execution, preloader after initializing the external RAM, Preloader will load lk (or uboot) into the external RAM and jump to LK (or uboot) to execute, LK (or uboot) then loads bootimage (including kernel and ramdisk) into the external RAM and then executes the kernel section. 


2. Download process
Above is the START process, preloader in addition to having a startup function, he also has the download function. First of all, it needs to be clear that the MTK chip has a boot ROM, if not the ROM then, then the program can not be downloaded to NAND flash, and then the flash is empty, there is no data. System after power on it will detect whether it is the boot mode or download mode, if it is a download mode, it will initialize a USB serial port, the preloader loaded into the internal SRAM, jump into the preloader to execute, after the initialization of good flash and external RAM, Download Preloader, LK, kernel, and Android to NAND Flash in turn. 


3. Code organization
Preloader has three main codes:
1. Mediatek/platform/mt6582/preloader
2. Mediatek/custom/mt6582/preloader
3. Mediatek/custom/hexing82_wet_jb5/preloader
So similar to LK, in the execution of the Custgen process, the contents of the custom directory will be generated into the out directory, so participate in the next two directories of the Preloader compilation process:
1. Mediatek/platform/mt6582/preloader
2. Mediatek/custom/out/hexing82_wet_jb5/preloader
Generate Preloader_project_name.bin in Out directory after compilation is complete

Note that there is also a preloader directory under the MediaTek directory, which is mostly compiled scripts and makefile, and finally the final Preloader bin file is generated in this directory.

If the above is wrong, I hope you will correct me.


Reference Document: MTK Alps Build system.ppt, driver_all_in_one_v1_mt6575_4.0.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.