PB是如何生成NK.bin的?

作者:wogoyixikexie@gliet

           一直觉得这个bin文件生成很干兴趣,现在就让我们看看帮助文档是怎么回事吧。

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.
  • 哈哈,这个Ce.bib 决定Romimage.exe打包什么东西进NK,要看看是否打包了,就看这个Ce.bib就可以了
  • Assigns physical memory addresses to these binaries and files.
  • 配置这个物理地址到NK?这是怎么实现的呢?有待以后了解了。
  • Creates the run-time image Nk.bin.

For more information about Ce.bib, see Make Binary Image Tool.

The Make Binary Image tool (Makeimg.exe) calls a 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 included 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 Adding a File to a Run-time Image .

Makeimg.exe calls the 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 includes 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 filesMerged initialization file(合并后的初始化文件)
    Common.bib, Config.bib, Project.bib, Platform.bibCe.bib, which identifies all the Windows CE files to be combined into the run-time image.
    Common.reg, Project.reg, Platform.regReginit.ini, which provides a collection of registry entries for the run-time image.
    Common.dat, Project.dat, Platform.datInitobj.dat, which provides a description of the directory and file locations for the run-time image.
    Common.db, Project.db, Platform.dbInitdb.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 included 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 included 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 in the MEMORY section of the Ce.bib file.

  • —————————以上很明显我就不翻译了。哈哈,看英语也不错,也许更好呢。

现在我再来引出一个关键的问题,如果我中途改变一些东西,那应该怎么办呢?可以肯定的是绝对不用全部重新编译(惭愧,我以前就是全部编译,当时还怪微软垃圾呢。编译四五次,就下班了)

如果修改了驱动,就编译那个驱动就可以了,然后使用build os菜单下的copy file...菜单,然后makimag。如果修改了注册表,保存之后,手动拷贝到生成NK处,然后再makimag。

简单吧,几分钟的事情。

转载请标明:作者wogoyixikexie@gliet.桂林电子科技大学一系科协。如有错误,希望能够留言指出。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值