Re: Migrating Windows CE.NET 4.2 to CE 5.0 on OMAP1510 platform
by TWlncmF0aW5nIENFLk5FVCA0LjIgdG8gQ0UgNS4w » Wed, 25 May 2005 13:16:02 GMT
i Paul G.Tobey,
Thank you for your quick response.
Yes, we followed microsoft guidance after that we are able to build a bin
file. After downloading the image into target, it is not comes up. Then we
build the <drive name>:\Wince500\private directory with debug/retail
message. We found that private\winceos\kernelos\nk\kernel\kwin32.c file
kernelInit function will do the following operation,
void KernelInit(void)
{
...
...
...
HeapInit();
lpWriteDebugStringFunc(TEXT("HeapInit done...\r\n"));
InitMemoryPool();
lpWriteDebugStringFunc(TEXT("InitMemPool..Done...\r\n"));
ProcInit();
lpWriteDebugStringFunc(TEXT("SchdInit....Starts...\r\n"));
SchedInit();
lpWriteDebugStringFunc(TEXT("Sched init done\r\n"));
}
we are getting all the debug message except "Sched init done", so again we
put the debug message in schedinit() function,
private\winceos\kernelos\nk\kernel\schedule.c
void SchedInit(void)
{
...
...
...
if (OpenExecutable (L"nk.exe", &pCurProc->oe, 0, 0)) {
DWORD dwReturnValue = LoadE32(&pCurProc->oe,&pCurProc->e32,0,0,0);
if( (dwReturnValue == ERROR_BAD_EXE_FORMAT) || (dwReturnValue ==
ERROR_OLD_WIN_VERSION) )
{
RETAILMSG(1,(TEXT("Scheduler: BAD exe format\r\n")));
}
else if(!dwReturnValue)
RETAILMSG(1,(TEXT("Scheduler: openexecutable 'nk.exe'
sucess\r\n"))); //Vadivel -removable
pCurProc->BasePtr = (LPVOID)pCurProc->e32.e32_vbase;
UpdateKmodVSize (&pCurProc->oe, &pCurProc->e32);
}
pStack =
VirtualAlloc((LPVOID)pCurProc->dwVMBase,pCurProc->e32.e32_stackmax,MEM_RESERVE|MEM_AUTO_COMMIT,PAGE_NOACCESS);
// need to call DoVirtualAlloc directly to bypass stack check
DoVirtualAlloc(pStack+pCurProc->e32.e32_stackmax-PAGE_SIZE,PAGE_SIZE,MEM_COMMIT,PAGE_READWRITE, MEM_NOSTKCHK, 0);
RETAILMSG(1,(L"Scheduler: dovirtualAlloc is done\r\n")); //Vadivel
-removable
RETAILMSG(1,(L"Sched: pStak:%8.8lx, pCurProc->e32.e32_stackmax :%8.8lx
\r\n", (DWORD)pStack, (DWORD)pCurProc->e32.e32_stackmax)); //Vadivel
-removable
MDCreateThread(pCurThread, pStack, pCurProc->e32.e32_stackmax,
(LPVOID)SystemStartupFunc, 0, TH_KMODE, 0);
RETAILMSG(1,(L"Sched: MDCreateThread is done\r\n")); //Vadivel -removable
...
...
...
}
In this schedinit() function is calling the MDCreateThread(..), after that
no response.
we captured the data from through hyper terminal,
..
..
..
OEMInit is done!!! by Vadivel0 bytes, checksum = 0x4
Booting Windows CE version
Booting kernel with clean memory configuration:d start 0x9F7000, length
0x2098, checksum 0xC31
Memory Sections:
[0] : start: 84070000, extension: 00002000, length: 01d8e000d...
Flash
FlashWrite: End of record,
Sp=ffffc7cc bytes, che
ARMInit done..
Windows CE KernelInit
HeapInit....Startse: Record start 0x
InitMemoryPool....Starts, msg by vadivel
ProcInit....Starts, msg by vadivelte: Writing record...
SchdInit....Starts....cord, wrote 0x3040 bytes, checksum =
ldr:OpenExe: nk.exe , starts...
ldr: OpenExecutable: plain name
OpenExecutable: Filesys not loaded, Opening from ROM
OpenFileFromROM:found
ldr: OpenExecutable is done
Thanks,
Vadivel
"Paul G. Tobey [