【原创】分析S5PV210 wince的bootimage.nb0 是如何生成的

          作者:gooogleman (www.gooogleman.com站长)     

      左看右看,也没找到bootimage.nb0生成的地方,只是在sources 里面有一个

WINCETARGETFILES=BootImage

      我以为找到了线索,可是当我发现2440 wince5.0 BSP也有WINCETARGETFILES=BootImage 这个的时候我晕了,因为在2440 的工程里面找不到Bootimage.nb0这个文件的,为了确认,我重新编译了2440 BSP也是没有,后来发现原来生成这玩意是在makefile.inc 里面的

BootImage:
!IF "$(NOLINK)" == ""
        romimage eboot.bib

 copy /b $(_PLATFORMROOT)\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\stepldr.nb0+ $(_PLATFORMROOT)\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\eboot.nb0 $(_PLATFORMROOT)\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\bootimage.nb0
 
!IF "$(WINCEREL)"=="1"
        copy $(_PLATFORMROOT)\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\eboot.* $(_FLATRELEASEDIR)
        copy $(_PLATFORMROOT)\$(_TGTPLAT)\target\$(_TGTCPU)\$(WINCEDEBUG)\bootimage.nb0 $(_FLATRELEASEDIR)
!ENDIF
!ENDIF       
     其实BL1_uart 下面也有自己的makefile.inc 的只是我做wince这么久了,这个流程都不懂,真是惭愧啊。

     表示汗颜!

    

         不过也发现了WINCETARGETFILES 这个的玄机,MSDN有如下描述:

This macro definition specifies nonstandard target files that Build.exe should build after Build.exe links all other targets in the current directory. For example, the macro definition may specify the path and file name for the target .res file if the .res file is copied to a different location.

Any target files that you specify using WINCETARGETFILES are added to the list of dependencies that must be satisfied in order to generate a successful build. WINCETARGETFILES is not added in PASS 0, but in subsequent passes, it is added at the end of the list of dependencies.

If this macro definition is present, any custom rules that you define in Makefile.inc, which is an optional file that can exist in the same directory as a SOURCES file, are also applied.

——————这句话还是值得思考一下的。准备下班 This is it!

原文地址:https://www.cnblogs.com/gooogleman/p/2101864.html