Monday, April 23, 2007

Build process of WinCE

CESYSGEN Phase (CEBUILD.BAT, sysgen.bat)

This is the first phase of the build process. This step will process the headers and .lib files for the whole system.

BSP Phase (Build.exe)

The BSP (and later stages) are run the most when developing a new system. This phase compiles and links all of your drivers and OAL code.

BUILDREL Phase (BuildRel.BAT)

This phase is focused on collecting files from various parts of the build and copying them all to a single flat release directory (%_FLATRELEASEDIR%). The files and target folders contents from the BSP are copied in to get the modules built in the BSP Phase, along with BSP-specific configuration settings from the BSP's Files directory. When using the IDE, your Platform Builder projects are built after all the files are copied over to the _FLATRELEASEDIR.

MAKEIMG Phase (makeimg.exe)

This is the final stage in the build process. It combines everything into a binary image file(s) for placement on your target hardware. It is implemented in three primary internal stages.

The first stage merges all of the various configuration files (BIB, DAT, REG, DB—we'll detail these files in just a bit) into one master file for each type. The following table shows the files and their corresponding master-merged file.

Original files Merged file Description
Common.bib, Config.bib, Project.bib, Platform.bib Ce.bib Identifies all the Windows CE files to be combined into the operating system image.
Common.reg, Project.reg, Platform.reg Reginit.ini Provides a collection of registry entries for the operating system image.
Common.dat, Project.dat, Platform.dat Initobj.dat Provides a description of the directory and file locations for the operating system image.
Common.db, Project.db, Platform.db Initdb.ini Defines the creation of any databases in the Windows CE object store.

In the second stage following the merge, makeimg will process all of the EXE and DLL modules specified in LOC files to replace the resources for the current language specified for the build.

After the resources are updated, the makeimg will run ROMIMAGE as the third stage. This will link and locate all execute-in-place code files in the image, and create a ROM file system image for all the other files. This file system is merged with the RAM and other file systems within the Windows CE single-rooted file system. All files in ROM are located in the \Windows Folder.

RomImage will generate the final image as NK.BIN, and optionally as an SRE or as absolute binary image(s) suitable for burning directly into Flash.

from MSDN

0 comments: