Blcommon in the WinCE eboot

Source: Internet
Author: User

In Eboot, from the STARTUP.S jump to the C program entrance, the program can be written in C language, so feel much better. The General C language entrance is a main function, may also be called other names. The Bootloadermain function is dropped in this main function, which is defined in the Blcommon module. The general main function is written as follows:

void (void)
{
  // Common boot loader (blcommon) main routine.
  BootloaderMain();

  // Should never get here.
  SpinForever();
}

As can be seen from the program, eboot after entering the C program, only called the Bootloadermain function, as for the Spinforever function is actually a while dead loop. So it can be seen that eboot all the work in the Bootloadermain, the source code can be found in the "\wince600\public\common\oak\drivers\ethdbg\blcommon". Detailed process as shown:

Here are some specific steps:

The 1.BootloaderMain function first calls the Kernelrelocate function to copy the global variables used in bootloader to RAM.

2. Then call the Oemdebuginit function to initialize debug debugging functions, generally initializing the serial port, so you can use the serial port to print debugging information.

3. Then call the Oemplatforminit function to initialize the board, and many platform-related initialization work can be done in this function.

4. Call the Oempredownload function, from the process should be to download the kernel to do some preparatory work, the function is executed, depending on the return is worth different can choose to download the kernel, or jump execution. In fact, the function will first read the boot configuration information, and then initialize the download device, typically the network card device.

5. If the Oempredownload function returns Bl_download, wince image will be downloaded from the host.

6. If the Oempredownload function returns Bl_jump, jump directly to the location where wince image is located.

The OEM functions involved are required to be implemented by the user and then invoked by the Blcommon module. These functions will be introduced later.

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.