阅读:3197回复:10
制作MULTI BIN的辅助工具processbib
在做MULTI BIN时,发现需要手动把模块从NK下改成XIPKERNEL,然后用命令行romimage ce.bib来生成XIP.BIN,比较繁琐,所以想做个自动工具,在romimage ce.bib执行之前就把ce.bib中必须包含在XIPKERNEL中的模块文件给移好,然后继续往下走.想法早就有了,preromimage.bat文件是受到启发的,看到一份别人的BSP是这样作的,processbib程序是自己写好的,把preromiamge.bat和processbib.exe文件放到WINCE500\PLATFORM\SMDK2440(A)\FILES\目录下,编译工程即可生成可用的XIP.BIN.
processbib程序首先它会把ce.bib重命名为ce_orig.bib文件,然后根据 const char *move_filelists[]={ "nk.exe", "coredll.dll", "filesys.exe", "fatfsd.dll", "diskcache.dll", "fatutil.dll", "binfs.dll", "fsdmgr.dll", "mspart.dll", "ceddk.dll", "smflash.dll", "boot.hv", }; 把相应的模块从NK下移成XIPKERNEL下. 源文件就两个processbib.h processbib.cpp, VC6.0的工程文件,processbib.dsw processbib.dsp 各位可以通过修改move_filelist[]数组添加或移出在XIPKERNEL下的文件. 解开后在processbib/Release/目录下有两个文件preromimage.bat processbib.exe,把它们拷贝到 WINCE500\PLATFORM\SMDK2440(A)\FILES\目录下即可. |
|
|
沙发#
发布于:2007-09-13 15:07
zhengshijie大侠,怎么下载不了。。。。。。。
|
|
板凳#
发布于:2007-09-13 15:08
发一份给我好吗,king_sundi@163.com
|
|
地板#
发布于:2007-09-13 17:09
引用第2楼king_sundi于2007-09-13 15:08发表的 : 已发出. |
|
地下室#
发布于:2007-09-14 11:09
楼主,能否请教一下,是否有可以看到和读取multi bin格式的rom内部文件的工具啊。
|
|
5楼#
发布于:2007-09-14 14:14
PB自带了,使用viewbin工具,
D:\WINCE500\PBWorkspaces\SMDK2440\RelDir\SMDK2440_ARMV4I_Release>viewbin -r -t X IPKERNEL.BIN ViewBin... XIPKERNEL.BIN Image Start = 0x8C200000, length = 0x0012D500 Record [ 0] : Start = 0x8C200000, Length = 0x00000004, Chksum = 0x000001EB Record [ 1] : Start = 0x8C200040, Length = 0x00000008, Chksum = 0x000002C2 Record [ 2] : Start = 0x8C200048, Length = 0x00000004, Chksum = 0x00000106 Record [ 3] : Start = 0x8C201000, Length = 0x0003EFFC, Chksum = 0x0190157A Record [ 4] : Start = 0x8C240000, Length = 0x00002118, Chksum = 0x0009000D Record [ 5] : Start = 0x8C243000, Length = 0x0006D268, Chksum = 0x02CBDE06 Record [ 6] : Start = 0x8C2B1000, Length = 0x00006FD0, Chksum = 0x00152DE5 Record [ 7] : Start = 0x8C2B8000, Length = 0x00035098, Chksum = 0x014E76A6 Record [ 8] : Start = 0x8C2EE000, Length = 0x00000088, Chksum = 0x000007F4 Record [ 9] : Start = 0x8C2EF000, Length = 0x00017324, Chksum = 0x0090D2C3 Record [ 10] : Start = 0x8C307000, Length = 0x00014088, Chksum = 0x007DE54C Record [ 11] : Start = 0x8C31C000, Length = 0x000040D8, Chksum = 0x001A7712 Record [ 12] : Start = 0x8C321000, Length = 0x00008C58, Chksum = 0x00361F6B Record [ 13] : Start = 0x8C329C58, Length = 0x00000054, Chksum = 0x00000C21 Record [ 14] : Start = 0x8C329CAC, Length = 0x0000018C, Chksum = 0x0000846B Record [ 15] : Start = 0x8C32A000, Length = 0x00003500, Chksum = 0x001987A9 Record [ 16] : Start = 0x00000000, Length = 0x8C201000, Chksum = 0x00000000 Start address = 0x8C201000 Checking record #13 for potential TOC (ROMOFFSET = 0x00000000) Found pTOC = 0x8c329c58 ROMOFFSET = 0x00000000 ROMHDR ---------------------------------------- DLL First : 0x01FE01FE DLL Last : 0x02000000 Physical First : 0x8C200000 Physical Last : 0x8C32D500 RAM Start : 0x8C330000 RAM Free : 0x8C359000 RAM End : 0x90000000 Kernel flags : 0x00000002 Prof Symbol Offset : 0x00000000 Num Copy Entries : 1 Copy Entries Offset : 0x8C329E28 Num Modules : 11 Num Files : 1 MiscFlags : 0x00000002 CPU : 0x01c2 (Thumb) Extensions : 0x8C202618 ROMHDR Extensions ----------------------------- PID[0] = 0x00000000 PID[1] = 0x00000000 PID[2] = 0x00000000 PID[3] = 0x00000000 PID[4] = 0x00000000 PID[5] = 0x00000000 PID[6] = 0x00000000 PID[7] = 0x00000000 PID[8] = 0x00000000 PID[9] = 0x00000000 Next: 8c329bcc -- Location: 8c329bcc Name: chain information Type: 00000000 pData: 8c329bf8 Length: 00000030 Reserved: 00000030 Next: 00000000 Addr: 8c32f000 MaxLenth: 00001000 Order: 0000 Flags: 0000 reserved: 00000000 Addr: 8c200000 MaxLenth: 00130000 Order: 0000 Flags: 0001 reserved: 00000000 Addr: 8c330000 MaxLenth: 00d00000 Order: 0001 Flags: 0001 reserved: 00000000 COPY Sections --------------------------------- Src: 0x8C2FDC10 Dest: 0x8C336000 CLen: 0x3ED DLen: 0x226C8 MODULES --------------------------------------- 9/13/2007 14:39:10 275456 nk.exe 9/13/2007 14:40:46 508928 coredll.dll 9/13/2007 14:40:46 228864 filesys.exe 9/13/2007 13:52:14 55296 fatfsd.dll 9/13/2007 13:52:16 10240 diskcache.dll 9/13/2007 14:40:46 36352 fatutil.dll 9/13/2007 13:52:18 13824 binfs.dll 9/13/2007 13:52:12 79872 fsdmgr.dll 9/13/2007 13:52:18 19456 mspart.dll 9/13/2007 14:39:04 15360 ceddk.dll 9/13/2007 14:39:02 26624 smflash.dll FILES ---------------------------------------- 9/13/2007 14:40:44 CHRS 4990 36864 boot.hv (ROM 0x8C32C180) Done. |
|
6楼#
发布于:2007-09-19 09:01
zhengshijie你好,一直关注你的贴子.
能发一份给我好吗,邮箱: hucz2001@yahoo.com.cn 还有个问题想问你,你分成两个BIN后,nk.bin中的那些东东,不用改注册表重新指向它们吗?如"Dll"=SDBus.dll改为"Dll"=\\BINFS\\SDBus.dll,要这样做吗,感觉不这样做操作系统会找不到BINFS下的.请赐教!!! |
|
7楼#
发布于:2007-09-20 16:41
to hucz2001:
其实是这样的,系统会跟据注册表的mount flags把BINFS文件里的东东做个影子到windows目录里,系统默认的路径是windows,所以不用改注册表里各个dll的路径. [HKEY_LOCAL_MACHINE\System\StorageManager\BINFS] "Folder"="BINFS" "FriendlyName"="Bin FileSystem" "Dll"="binfs.dll" "Paging"=dword:1 ; MountFlags: ; 0x10 specifies that this file system is to be mounted as an external ; ROM filesystem shadowing the \windows directory ; 0x1 specifies that the mountpoint \BINFS is to be hidden ; "MountFlags"=dword:10 "BootPhase"=dword:0 |
|
8楼#
发布于:2007-09-22 09:15
能发给我一下你的制作工程吗,我想学习下,也在学习MUTL-XIP 但是因为时新手,很多地方不是很懂,所以想看看,谢谢zhengshijie
我的邮箱yourhost@sina.com |
|
9楼#
发布于:2007-09-26 09:48
zhengshijie,感谢你上次的提示,那个问题已经解决了.非常感谢!
现在还有个问题请教你。在我的注册表设置里,有如下一项 [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\SMFLASH] "LoadFlags"=dword:1 如果没有这项,系统跑不起来,加上这项,CreateFile (L"DSK1:",......);想获得这个句柄又失败,不知道该怎么办,请赐教! |
|
10楼#
发布于:2007-09-28 12:33
to hucz2001:
SMFLASH不是DSK1,可能是DSK0等其它的,你可以从注册表中看出来SMFLASH是DSK几。 |
|