Author: wogoyixikexie @ gliet
Borrow others' explanations:
The bin mentioned here is a binary image format that organizes data in units of segments. Each segment contains a header with the start address, length, and check value specified in the header. The Platform Builder tool combines all the files in the wince kernel into one file in Bin format. The default file name is NK. Bin. Bootloader splits NK. Bin into multiple files in the same format and puts them in Ram. You can type "viewbin NK. bin" in the command line to view the specific content in the binfile. Type the cvrtbin command to convert the. Bin format file to. SRE or. ABx format.
The nb0 format is the original binary image, which does not include the header. Generally, the system uses the nb0 format to download the kernel to the ram of the device. To generate a file in nbx format, you need to determine the following values in the relevant. bib file: romstart, romwidth, romsize
Recently I tried to create multi bin. Later I found that my bootloader is youlong and does not support binfs partition formatting,
I want to port the code under eboot. It should be okay.
However, I am a little confused about the binfs. In principle, binfs is for nk. bin, But we downloaded NK. nb0, some download NK. bin, but decompress the package to NK. nb0.
How does binfs relate to NK. nb0?
========================================== Format =
A bin file is stored in the following structure:
Composition: Mark (7) + image start address (1) + image length (1)
Record 0 address + record 0 Length + record 0 checksum + record 0 content (File Content)
Record 1 address + record 1 Length + record 1 checksum + record 1 content (File Content)
......
The last record indicates the end. Start = 0x00000000, length = 0x8c072c3c indicates the startup address, and chksum = 0x00000000
The bin File Header (excluding records) can be represented in the following structure
Struct binfile {
Byte signature [7]; // = {'B', '0', '0', '0', '0', 'F '', ''f'', ''/''}
DWORD imagestart
DWORD imagelength
};
Generally, xipkernel. bin, NK. all Bin files comply with the normal binfile format, including records starting from 0, 1, and 2 as special records, and 2 as the Cece mark. The last 4 bytes indicate the TOC address (pointing to the data in the romhdr structure ), 3. All records start with file records,
--- However, we actually use the NK. nb0 file, which is supported by the file system. I am waiting to find out his format. Go to lunch first.
Use others' explanations
First, the content in NK. Bin is compressed, and the content in NK. nb0 is not compressed. The difference between the two is that bin will automatically remove the null after you set during the generation process, and nb0 won't.
-------------- Continue ..........................