Compartir a través de


Creating the Boot Loader .bib File (Windows CE 5.0)

Send Feedback

The .bib file details the memory layout that the boot loader will use. Romimage.exe uses this file to convert the boot loader executable (.exe) file into .bin and .nb0 files.

For more information about .bib files, see Binary Image Builder File.

For more information about Romimage.exe, see Romimage.

For more information about the Windows CE memory, see Memory Architecture.

To create the boot loader BIB file

  1. In %_WINCEROOT%\Platform\MyPlatform\Src\Bootloader\Eboot, create a file called Boot.bib.

  2. Add the following configuration information to the Boot.bib file.

    ; Eboot is built to run out of RAM, though initially the location of the 
    ; image may be in flash.  This .bib file will create two different Eboot 
    ; images of interest:
    ;
    ; Eboot.nb0 - Can be used to flash an initial Eboot image using JTAG.
    ; Eboot.bin - Can be downloaded by existing Eboot image and flashed.
    ;
    ; Note: The .nb0 file is a raw binary image. The .bin file is a recordized
    ; image with header.
    ;
    
    MEMORY
    ;   Name     Start     Size      Type
    ;   -------  --------  --------  ----
    
        ; Reserve some RAM before Eboot.
        ; This memory will be used later.
    
        FILLER   A0000000  00030000  RESERVED   ; Replaced with data later.
    
        EBOOT    A0030000  00020000  RAMIMAGE   ; Set aside 128 KB for loader; finalize later.
        RAM      A0050000  00010000  RAM        ; Free RAM; finalize later.
    
    CONFIG
        COMPRESSION=OFF
        PROFILE=OFF
        KERNELFIXUPS=ON
    
        ; These configuration options cause the .nb0 file to be created. 
        ; An .nb0 file may be directly written to flash memory and then 
        ; booted. Because the loader is linked to execute from RAM, 
        ; the following configuration options 
        ; must match the RAMIMAGE section.
        ROMSTART=A0030000
        ROMWIDTH=32
        ROMSIZE=20000
    
    MODULES
    ;   Name         Path                                          Memory Type
    ;   -----------  --------------------------------------------- -----------
        nk.exe       $(_TARGETPLATROOT)\target\$(_TGTCPU)\$(WINCEDEBUG)\EBOOT.exe   EBOOT
    

    The previous configuration information specifies the following boot loader properties:

    • Running with the MMU off; thus, the addresses are physical.
    • Running from RAM; thus, the RAMIMAGE line specifies a RAM address.

    The lengths specified in the boot loader image and the RAM used by the boot loader image are somewhat arbitrary. The values can be adjusted throughout the development process to more optimal values once the boot loader is completed.

    For more information about the MEMORY section in the preceding configuration example, see MEMORY Section.

    For more information about the MODULES section in the preceding configuration example, see MODULES Section.

    For more information about the CONFIG section in the preceding configuration example, see CONFIG Section.

  3. In %_WINCEROOT%\Platform\MyPlatform\Src\Bootloader\Eboot, create a file called Makefile.inc.

  4. Add the following code to the Makefile.inc file.

    BootImage:
         romimage  boot.bib
    
  5. Edit the sources file by adding the following code to the end of the sources file.

    WINCETARGETFILES=BootImage
    

See Also

How to Develop a Boot Loader

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.