How does Pb generate NK. Bin?

Source: Internet
Author: User
Tags fdf

Author: wogoyixikexie @ gliet

I have always felt that this binfile is very interesting. Now let's take a look at the help documentation.

Romimage.exe is a locator application that creates Windows CE binary image (. Bin) files, usually limited to a single file called NK. bin. This means that romimage

  • Reads Ce. bib to determine which % _ flatreleasedir % binaries and files to include in the run-time image.
  • Haha, this CE. bib decides what romimage.exe packs into NK. If you want to check whether it is packed, you can check this CE. bib.
  • Assigns physical memory addresses to these binaries and files.
  • Configure this physical address to NK? How is this implemented? You need to know about it later.
  • Creates the run-time image NK. Bin.

For more information about CE. bib, seeMake binary image tool.

The Make binary image tool (makeimg.exe) calla number of programs and batch files in the process of making the run-time image.

Makeimg.exe performs all processing in the % _ flatreleasedir % directory. after processing, the CE. bib file defines which binaries and files are to be encoded in the run-time image. by default, the run-time image is named NK. bin.

If you have modified and built files in your OS design, you can copy these files to % _ flatreleasedir % and then run the make binary image tool to include these files in the run-time image. this can decrease time spent running builds on your entire OS design. for more information about adding files to the run-time image, see .

Makeimg.exe callthe following programs:

  • The NLS compression tool (cenlscmp.exe) enables national language support (NLS) compression. cenlscmp.exe combines the settings file nlscfg. out and the input file nlssrc.txt to build the output file wince. NLS in the % _ flatreleasedir % directory.
  • The file merge tool (fmerge.exe) merges settings files to create four initialization files, which are created in the % _ flatreleasedir % directory. fmerge.exe also nodes settings files from dependent projects-for example, the wceshell or wceshellfe project.

    If the settings files for the dependent projects are defined in the _ deptrees environment variable, and if they also exist in the % _ flatreleasedir % directory, fmerge.exe merges them into the appropriate initialization file.

    The following table shows the original files and merged initialization file for each file type.

    Original files Merged initialization file (merged initialization file)
    Common. bib, config. bib, project. bib, platform. bib Ce. bib, which identifies all the Windows CE files to be combined into the run-time image.
    Common. Reg, project. Reg, platform. Reg Reginit. ini, which provides a collection of registry entries for the run-time image.
    Common. dat, project. dat, platform. dat Initobj. dat, which provides a description of the Directory and file locations for the run-time image.
    Common. DB, project. DB, platform. DB Initdb. ini, which defines the creation of any databases in the Windows CE object store.
  • The Registry compression tool (regcomp.exe) performs registry compression by reading reginit. INI and compressing it into a binary registry file called default. FDF, which is eventually encoded in the run-time image. default. FDF is always loaded on a cold boot. the CE. bib file references default. FDF, which then initializes the system registry on the target device.
  • The resource Update Tool (res2exe.exe) replaces the resources in specified. dll,. EXE, or control panel (. CPL) files with the appropriate resources for the language specified by the locale environment variable.
  • The text to Unicode tool (txt2ucde.exe) converts any ASCII text strings in initobj. TMP, which was created by fmerge.exe, to Unicode text strings and creates the file initobj. dat, which contains the Unicode conversion.
  • The ROM image Builder tool (romimage.exe) reads the CE. bib file to determine which binaries and files, located in % _ flatreleasedir %, are to be stored in the run-time image, including how they are stored in memory.

    The CE. bib file also lists the following processed files: wince. NLS, reginit. ini, initobj. dat, initdb. ini, and default. FDF.

    Then, romimage.exe combines the binaries and files into the run-time image, which is usually called NK. Bin unless specified otherwise inMemorySection of the CE. bib file.

  • --------- Obviously I will not translate the above. Haha, reading English is good, maybe better.

Now I will introduce a key question. What should I do if I change something in the middle? It is certain that you do not need to re-compile all of them (sorry, I used to compile all of them. At that time, I still blame Microsoft for the garbage. Compile the program four or five times and get off work)

If the driver is modified, compile the driver, use the copy file... menu under the build OS menu, and then makimag. If you have modified the registry, save it, manually copy it to the NK generated, and then makimag.

Easy, just a few minutes.

Reprinted Please note: the author wogoyixikexie @ gliet. Guilin University of electronic science and technology, a Department of Science and Technology Association. If any error occurs, you can leave a message to indicate it.

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.