Eboot overview of wince6.0

Source: Internet
Author: User

Customized for a new hardware deviceWince6.0Generally, you need to complete the following steps:

1.Create a board-level support package for specific hardware devices(Board support packageAbbreviatedBSP),BSPMust includeBootloader,OEMAdaptation Layer(OEM Adaptation LayerAbbreviatedOAL)And some necessary drivers.

2.Use the createdBSP, Customizes A System Design(OS design). PassVs2005CreatePlatform BuilderProject. This project can compile and generate the final runtime image file (Rum-time image).

3.Create related drivers for the peripheral devices on the board and add themBSP.

4.By creating sub-projects andCatalog itemsMethod, modifyOS design.

5.CompileOS designDownload the compiled runtime image file to the target device. In this case, you can use a remote debugging tool for debugging.

6.After all the debugging work is completed, export the correspondingSDK (software development kit), ApplicationProgramDevelopers canSDKWrite the application of the device.

We can see that in the entireWinCEDuring the porting process of the operating system,BSPIs the most basic and key step. CreateBSPThe process mainly includes the following:

1.CreateBootloader.BootloaderIt is used to download the operating system image file during development.

2.CreateOAL.OALIt is eventually linked to the kernel image file, which completes hardware initialization and management.

3.Create a device driver. Device Drivers are software support for peripheral devices on the board.

4.Modify the configuration file of the runtime image. Configuration files mainly includeBib,Reg.

Bootloader The main function is to load the operating system runtime image to the memory and jump OS . Its role is described in the previous article Nboot The role is completely consistent. Bootloader Get the runtime image (generally the corresponding file name is NK ) There are two methods. It can be connected through a wired connection like a network (Ethernet), USB Or the serial port is downloaded from outside NK . It can also be stored locally. (Flash , Hard Disk) Load NK . Generally, Bootloader Pass Ethernet The downloaded operating system image is called Eboot . Used during development Eboot To improve development efficiency. Use Eboot , You can download it quickly NK To the target device. And use FlashProgramming tools or through JTAG Download is slow. When some products are finally released, Eboot Yes, but some of them must include Bootloader , Image X86 The platform is like this.

Now we knowEbootTo implement these functions,EbootYou must do the following:

1.InitializationMCU. Including InitializationMCURelated registers, interrupt, watchdog, system clock, memory andMMU. The preceding items followNbootBasically the same, butMMU.

2.CallBootloadermain (). This function is defined inWince6.0The corresponding file in isC: "wince600" Platform "common" src "common" Boot "blcommon" blcommon. c

3.Bootloadermain ()The following functions are called in sequence,Oemdebuginit (),Oemplatforminit(),Oempredownload(),Oemlaunch(), And these functions must beEbootOfCode.

4.Finally jumpOal.exeOfStartupAnd then startWinCEOperating System.

Shows the entire process:

For the eboot code, see the C: "wince600" Platform "deviceemulator" src "bootloader" eboot directory. Here are some instructions on eboot of S3c2410. As mentioned in the previous article about nboot's method of loading eboot, nboot must put eboot at the specified position in the memory, which is determined by eboot. Specifically, the memory configuration in Boot. bib is embodied in eboot, as shown in.

NbootLoadEbootThe address to memory must correspond to this address. BecauseNbootIs not usedMMU, SoNbootThe actual address used should beZero X 30021000Otherwise, the system cannot start normally. Second, if noNbootLoadEbootInsteadEbootDirectly stored inNor flashInEbootThe process of self-loading in the code, that isNor flashInEbootLoad allRamAnd run the following code:

Code
; ------------------------------------------------------------------------------
; Copy boot loader to memory

ANDS R9, PC ,# 0xff000000 ; See If We are In Flash or In Ram
BNE % F20; go ahead If We are already In Ram

; This Is The loop that perform copying.
LDR r0, =   Zero X 21000 ; Offset into the RAM
Add r0, R0, # phybase; add physical Base
MoV R1, R0; (R1) Copy destination
LDR R2, = 0x0 ; (R2) Flash started at physical address 0
LDR R3, = Zero X 10000 ; Counter ( Zero X 40000 / 4 )
10 LDR R4, [R2], # 4
STR R4, [R1], # 4
Subs R3, R3 ,# 1
BNE % B10

; Restart From the ram position after copying.
MoV PC, R0
NOP
NOP
NOP

; shouldn ' t get here.
B. eboot you can extend the functions of eboot to meet the necessary functions, for example, LCD is initialized, a specific startup screen is displayed, and the image loading progress is displayed. This article roughly introduces wince6.0 does not involve specific code implementation, for more information about the code, see C: "wince600" Platform "deviceemulator" src "bootloader" eboot . In general, the core function of eboot is to guide the operating system image.

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.