"); //-->
借用别人的解释:
这里提到的bin是一种二进制镜像格式,以片断(section)为单位组织数据,每个片断都包括一个头,头里指定了起始地址,长度,校验值。Platform Builder调用工具将WINCE内核所有文件以bin格式合并成一个文件,默认文件名为nk.bin。BootLoader又以同样的格式将nk.bin分解成多个文件放到RAM中。可以在命令行中键入“viewbin nk.bin”来查看bin文件中具体包括了哪些内容。键入Cvrtbin命令转换.bin格式文件为.sre格式或者.abx格式。
nb0格式是原始的二进制镜像,它不包括头,一般情况下将内核下载到设备的RAM中运行都采用nb0格式。要生成nbx格式的文件,需要在相关.bib文件中确定如下值:ROMSTART、ROMWIDTH、ROMSIZE
那么nk.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
For more information about Ce.bib, see Make Binary Image Tool.
最近想搞multi bin后来发现我的bootloader是优龙的,不支持binfs分区格式化, 我想把eboot下的代码移植过来,应该可以的。
但是我对则个binfs有点疑惑。按照道理说,binfs是针对nk.bin的,但是我们下载的时候却是nk.nb0,有些人下载nk.bin,但是下载完还是要解压成nk.nb0的。
我想问,binfs是怎么和nk.nb0联系起来的?
==============================来看看bin文件的格式=========================
一个bin 文件在存储上是按下面的结构存储的
组成:标记(7)+Image开始地址(1)+Image长度(1)
记录0地址+记录0长+记录0校验和+记录0内容(文件内容)
记录1地址+记录1长+记录1校验和+记录1内容(文件内容)
......
最后一条记录是表示结束,Start = 0x00000000, Length = 0x8C072C3C是StartUp地址, Chksum = 0x00000000
bin 文件的头部(不包括记录)可以用下面的结构表示
struct BinFile{
BYTE signature[7]; // = { ''B'', ''0'', ''0'', ''0'', ''F'', ''F'', ''\a'' }
DWORD ImageStart
DWORD ImageLength
};
一般xipkernel.bin,nk.bin 都符合正常bin文件格式,包含记录开始0,1,2 记录为特殊记录,2做为cece的标记,其后4byte表示 TOC地址(指向ROMHDR结构的数据),3记录开始都是文件记录,
———但是,我们实际用到却是nk.nb0文件,这个文件才是和文件系统帮顶起来的。我等下要找出他的格式来。先去吃午饭。
再借别人的解释
首先,NK.BIN中的内容是被压缩过的,NK.NB0中的内容是没有压缩的。 两者大小的区别是因为在生成过程中BIN会将你设定的后面的NULL自动去掉,而NB0就不会。
现在来用微软自带工具来看看这两个文件的格式到底有什么不同。

这幅图结合上面的解释可以知道,这个NK.bin文件的标志是BOOOFF,nk.nb0是没有这个标志的,要知道具体的信息,还是看MSDN好。
At the end of the boot loader development process described in the topic How to Develop a Boot Loader, you will have two different binary images for the boot loader: a .bin file and an .nb0 file. The Microsoft Windows® CE binary image data format (.bin) file is the most common format for Windows CE binary images. It is a binary file that consists of a number of individual records with associated per-record bookkeeping data. The format is convenient for minimizing the amount of data to be downloaded to the target device by removing the need to pad between records. For more information about the .bin file format, see Windows CE Binary Image Data Format (.bin).
The .nb0 file format is a raw binary image of the boot loader. The image is as it appears in the memory on the target device and does not contain the header information that the .bin file includes. The .nb0 file is typically larger than the .bin file. The .nb0 file is useful for placing the initial boot loader image on the target device. This is usually done with a built-in monitor program provided by the board manufacturer. You can also place the initial boot loader image on the target device through a JTAG connection using a JTAG probe. Once the .nb0 image is stored on the device, it should be able to download and update itself using the .bin file format from then on.
我使用的是ADS开发的bootloader,这个bin文件不存在什么段的问题吧,应该和微软不一样的,全局变量的问题在哪里呢?但是现在造成偶尔不能启动是什么原因呢?最后发现又回到了原点。看来ADS下的bin文件格式也要搞清楚才行哦。
专栏文章内容及配图由作者撰写发布,仅供工程师学习之用,如有侵权或者其他违规问题,请联系本站处理。 联系我们
相关推荐
乙类推挽功率放大电路(DEPP电路)
关于分辨率的这两个概念,你了解了么?
数字化的线性稳压器
彩电电源元器件参数和代换手册
F28335 和入门套件演示
打虎兄在刷屏啦!
通过简化吊扇应用中的代码开发来减少设计时间
Ashok Leyland与中创新航达成电池制造合作
如何使用工业级串行数字输入来设计具有并行接口的数字输入模块
层叠设计----PCB 工程师需要注意的地方
2003国际通信设备与信息网络展览会
为什么DC-DC转换器应尽可能靠近负载的负载点(POL)电源?
产量与贴装头数量之间的关系
C6474多核处理器在医疗应用领域
绝版考试弊功秘籍zt
使用LTspice仿真来解释电压依赖性影响
立足前沿产品技术,村田携多款产品亮相2025光博会
多级调谐放大器分析与调试方法
LabVIEW 程序调试之谜
电动车和能效亮点 电装将火花塞及废气传感器业务出售给Niterra
LabVIEW 事件结构之谜
测试与检查
TMS320DM365 数字媒体处理器技术概览
求助USB驱动IC!
威廉逊电子管放大器副本
甲类功率放大电路
LED信号放大电路
测试技术在电子组装行业上的应用与发展
如何设计低功耗、高精度自行车功率计?
2003国际通信设备与信息网络展览会