本文介绍了如何刷新WinCE应用程序提供的nk.bin文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试从应用程序升级内核。我的应用程序通过IOCTL将内核映像传递给驱动程序。我成功刷新了nk.nb0文件。如何处理nk.bin文件?有没有办法将放入缓冲区的nk.bin转换为nk.nb0?

I am trying to upgrade kernel from application. My application passes kernel image to the driver through IOCTL. I succeded in flashing nk.nb0 files. How to handle nk.bin files? Is there any way to convert nk.bin which is placed in a buffer to nk.nb0?

我的应用程序:

***** *******

************

处理的CreateFile =(L" DSK1:",GENERIC_READ | GENERIC_WRITE,

  FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,OPEN_EXISTING ,0,0);

handle = CreateFile( L"DSK1:",GENERIC_READ|GENERIC_WRITE,
 FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,0 );



的DeviceIoControl(手柄,IOCTL_FMD_WRITE_RESERVED,kernImagePtr,kernImageLen,NULL,0,NULL,NULL);


DeviceIoControl( handle, IOCTL_FMD_WRITE_RESERVED, kernImagePtr,kernImageLen, NULL, 0, NULL,NULL );

 

FMD.cpp

*******

BOOL FMD_OEMIoControl(DWORD dwIoControlCode,PBYTE pInBuf,DWORD nInBufSize,

       PBYTE pOutBuf,DWORD nOutBufSize,PDWORD pBytesReturned)

{

BOOL FMD_OEMIoControl(DWORD dwIoControlCode, PBYTE pInBuf, DWORD nInBufSize,
       PBYTE pOutBuf, DWORD nOutBufSize, PDWORD pBytesReturned)
{

情况下IOCTL_FMD_WRITE_RESERVED:

  NANDWrtImgInfo.dwImgType = IMAGE_NK;

  NANDWriteImage(安培; NANDWrtImgInfo,pInBuf,nInBufSize) ;

case IOCTL_FMD_WRITE_RESERVED:
 NANDWrtImgInfo.dwImgType = IMAGE_NK;
 NANDWriteImage(&NANDWrtImgInfo,pInBuf,nInBufSize);

}

问候,

推荐答案

你可以用"cvrtbin" "从nk.bin创建nk.nb0的工具。平台构建器可以使用工具代码的源代码。见路径C:\WINCE600\PRIVATE\WINCEOS\COREOS\NK\TOOLS\ROMIMAGE\CVRTBIN\

you could use "cvrtbin" tool to create nk.nb0 from nk.bin. The source code of the tool code is available with the platform builder. See path C:\WINCE600\PRIVATE\WINCEOS\COREOS\NK\TOOLS\ROMIMAGE\CVRTBIN\.

所以,你 可能能 使用更新机制的cvrtbin来源。

So you possible could use the cvrtbin sources for your update mechanism.

祝你好运,

Andreas 

Andreas 


这篇关于如何刷新WinCE应用程序提供的nk.bin文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 01:40