.BIB File CONFIG Section The CONFIG section defines additional parameters for the run-time image, including the following options:
■ AUTOSIZEAutomatically combines RAMIMAGE and RAM sections and allocates any unused memory in the RAMIMAGE section to RAM, or if necessary takes memory from the RAM section and provides it to the RAMIMAGE.
■ BOOTJUMPIf specified, moves the boot jump page to a specific area within the RAMIMAGE section, rather than by using the default area.
■ COMPRESSIONAutomatically compresses writable memory sections in the image. The default value for this option is ON.
■ FIXUPVARInitializes a kernel global variable during the Make Binary Image phase.
■ FSRAMPERCENTSets the percentage of RAM used for the RAM file system.
■ KERNELFIXUPSInstructs Romimage.exe to relocate memory writable by the kernel. This option is generally enabled (ON).
■ OUTPUTChanges the directory that Romimage.exe uses as the output directory for the Nk.bin file.
■ PROFILESpecifies whether the image includes the profiler.
■ RAM_AUTOSIZEExpands the size of RAM to the end of the last XIP section.
■ RESETVECTORRelocates the jump page to a specified location. This is required for MIPS processors to boot from 9FC00000.
■ ROM_AUTOSIZEResizes XIP regions, taking into account the ROMSIZE_AUTOGAP setting.
■ ROMFLAGSConfigures the following options for the kernel:
■ Demand paging Fully copying a file into RAM before executing it or paging in parts of it.
■ Full kernel mode Run every OS thread in kernel mode, which leaves the system vulnerable to attack but improves performance.
■ Trust only ROM modules Marks only files in ROM as trusted.
■ Flush the X86 TLB onX86 systems Improves performance but adds a security risk.
■ Honor the /base linker setting Defines whether or not to use the /base linker setting in DLLs.
■ ROMOFFSETEnables you to run the run-time image in a memory location that is different from the storage location. For example, you can store the run-time image in FLASH memory, and then copy and run it from RAM.
■ ROMSIZESpecifies the size of the ROM in bytes.
■ ROMSTARTSpecifies the ROM's starting address.
■ ROMWIDTHSpecifies the number of data bits and how Romimage.exe splits the run-time image. Romimage.exe can put the entire run-time image into one file, split the run-time image into two files of even and odd 16-bit words, or create four files of even and odd 8-bit bytes.
■ SREDetermines whether Romimage.exe generates a .sre file. Motorola S-record (SRE) is a file format recognized by most ROM burners.
■ X86BOOTSpecifies whether or not to add a JUMP instruction at the x86 reset vector address.
■ XIPSCHAINEnables the creation of Chain.bin and Chain.lst files to set up an XIP chain, so that you can split an image into multiple files.
.BIB File MODULES and FILES SectionsBSP and OS design developers must frequently edit the MODULES and FILES sections of a .bib file to add new components to a run-time image. The format for the MODULES and FILES section is practically identical, although the MODULES section supports more configuration options. The key difference is that the MODULES section lists files not compressed in memory to support XIP, while the FILES section lists files that are compressed. The operating system must decompress the data when accessing the files.
The following listing shows two small MODULES and FILES sections from a Platform.bib file. For a complete example, check out the Platform.bib file of the Device Emulator BSP.
MODULES
; Name Path Memory Type
; -------------- ---------------------------- -----------
; @CESYSGEN IF CE_MODULES_DISPLAY
IF BSP_NODISPLAY !
DeviceEmulator_lcd.dll $(_FLATRELEASEDIR)\DeviceEmulator_lcd.dll NK SHK
IF BSP_NOBACKLIGHT !
backlight.dll $(_FLATRELEASEDIR)\backlight.dll NK SHK
ENDIF BSP_NOBACKLIGHT !
ENDIF BSP_NODISPLAY !
; @CESYSGEN ENDIF CE_MODULES_DISPLAY
FILES
; Name Path Memory Type
; -------------- ---------------------------- -----------
; @CESYSGEN IF CE_MODULES_PPP
dmacnect.lnk $(_FLATRELEASEDIR)\dmacnect.lnk NK SH
; @CESYSGEN ENDIF CE_MODULES_PPP
You can define the following options for file references in MODULES and FILES sections:
■ NameThe name of the module or file as it appears in the memory table. This name is usually the same as the file name in the run-time image.
■ PathThe complete path to the file that Romimage.exe incorporates into the run-time image.
■ MemoryReferences the name of a memory area in the MEMORY section of the Config.bib file into which Romimage.exe loads the module or file. It is usually set to NK to integrate the file in the NK area defined in the MEMORY section.
■ Section OverrideEnables you to specify modules in a FILES section and files in a MODULES section. Essentially, Romimage.exe ignores the section in which the entry resides, and treats the entry as a member of the specified section. This parameter is optional.
■ TypeSpecifies the file type and can be a combination of flags, as shown in Table 2-3.
Table 2-3 File type definitions for MODULES and FILES sections
MODULES and FILES Sections |
MODULES Section Only |
■ SThe file is a system file. |
■ KInstructs Romimage.exe to assign a fixed virtual address to the DLL's public exports and runs the module in kernel mode rather than user mode. Drivers must run in kernel mode to have direct access to the underlying hardware. |
■ HThe file is hidden. |
■ RCompress resource files. |
■ UThe file is uncompressed. (The default setting for files is compressed.) |
■ CCompress all data in the file. If the file is already in RAM, it will be decompressed again into a new section of RAM, which results in higher RAM consumption. |
■ NThe module is not trusted. |
■ PDo not check the CPU type on a per-module basis. |
■ DThe module cannot be debugged. |
■ XSign the module and include the signature in the ROM. |
|
■ MSignals that the kernel must not page the module on demand. (See Chapter 3 for more information on the effects of demand paging.) |
|
■ LInstructs Romimage.exe not to split the ROM DLL. |
Conditional .bib File Processing It is important to note that .bib files support conditional statements based on environment variables and SYSGEN variables. You can set environment variables through catalog items, and then check these variables in IF statements in a .bib file to include or exclude certain modules or other files. For SYSGEN variables, use @CESYSGEN IF statements instead.
Читать дальше