WINCE 5.0 内核固化到nand flash 方法

WINCE 5.0 内核固化到nand flash 方法
2007-12-24 09:59

今天终于将WinCE 5.0 内核固化到了Flash里面。
这也许算不了什么大问题,可仍然折腾了一阵子。按三星的顺序,没能成功。最后发现,用PB下载Stepldr到block 0总是有问题,用sjf读出发现block 0数据不对。但用PB下载Eboot.bin和内核都可以,前提是让Eboot在RAM中跑起来。我是通过将Eboot用AXD调入内存0x30038000的方式进行的。用PB下载比较快。但由于没有NOR FLASH ROM,要手工将程序调入RAM,所以也不是很方便。总结了一下,还是用sjf来固化stepldr和eboot较为方便,操作少一些(虽然慢)。

记录如下:
下载是否成功,可能跟Setting 中的选项 Enable run-time image to flash 有关,至少不选这项的时候下述步骤是可以成功的,输出信息是在小串口得到的。

####Connect SJF JTAG;
####Download Stepldr.nb1 with sjf.bat: block 0;
####Download Eboot.nb0 with sjf_eboot.bat;

####将菜单设置为如下内容
0) IP address: 192.168.1.66
1) Subnet mask: 255.255.255.0
2) DHCP: Disabled
3) Boot delay: 20 seconds
5) Startup image: LAUNCH EXISTING
6) Program disk image into SmartMedia card: Enabled
7) Program CS8900 MAC address (00:00:F0:9B:11:DC)
8) Kernel Debugger: ENABLED

####按"f" 低级格式化Nand Flash,这步操作不会格式化0x0-0x11的 block;
Enter your selection: f
Reserving Blocks [0x0 - 0x11] ...
...reserve complete.
Low-level format Blocks [0x12 - 0xfff] ...
...erase complete.

####按"9"格式化为BinFS,这个步骤时间较长,需要数分钟。
Enter your selection: 9
Enter LowLevelFormat [0x12, 0xfff].
Erasing flash block(s) [0x12, 0xfff] (please wait): Done.
WriteMBR: MBR block = 0x12.
Done.

####在Setting...选项中选择Nk.bin,作为下载。在Eboot菜单中按 "d",在PB5.0Target菜单中选"Attach Device",开始下载Nk.bin。
下载过程参考如下,直到出现"waitforconnect",才算下载完成。
Download BIN file information:
-----------------------------------------------------
[0]: Base Address=0x80001000 Length=0x1d82344
-----------------------------------------------------
TFTP: Desktop losing ACK, block number = 1898, Ack again
TFTP: Desktop losing ACK, block number = 3680, Ack again
TFTP: Desktop losing ACK, block number = 5696, Ack again
TFTP: Desktop losing ACK, block number = 17640, Ack again
TFTP: Desktop losing ACK, block number = 21106, Ack again
TFTP: Desktop losing ACK, block number = 24261, Ack again
TFTP: Desktop losing ACK, block number = 25821, Ack again
TFTP: Desktop losing ACK, block number = 35226, Ack again
TFTP: Desktop losing ACK, block number = 48022, Ack again
TFTP: Desktop losing ACK, block number = 55986, Ack again
TFTP: Desktop losing ACK, block number = 58194, Ack again
rom_offset=0x0.

--ROMHDR at Address 80001044h
Writing single region/multi-region update, dwBINFSPartLength: 30942020
IsValidMBR: MBR sector = 0x240
OpenPartition: Partition Exists=0x0 for part 0x21.
CreatePartition: Enter CreatePartition for 0x21.
LastLogSector: Last log sector is: 0x1fdbf.
CreatePartition: Start = 0x260, Num = 0xec20.
Log2Phys: Logical 0x260 -> Physical 0x4a0
WriteMBR: MBR block = 0x12.
BP_SetDataPointer at 0x0
WriteData: Start = 0x0, Length = 0x1d82344.
Log2Phys: Logical 0x260 -> Physical 0x4a0
Updateded TOC!
IsValidMBR: MBR sector = 0x240
OpenPartition: Partition Exists=0x0 for part 0xb.
CreatePartition: Enter CreatePartition for 0xb.
FindFreeSector: FreeSector is: 0xee80 after processing part 0x21.
CreatePartition: Num sectors set to 0x10e00 to allow for compaction blocks.
CreatePartition: Start = 0xee80, Num = 0x10e00.
WriteMBR: MBR block = 0x12.
TOC {
dwSignature: 0x434F544E
BootCfg {
ConfigFlags: 0x2820
BootDelay: 0x14
ImageIndex: 1
IP: 192.168.1.66
MAC Address: 00:00:F0:9B:11:DC
Port: 0.0.0.0
SubnetMask: 255.255.255.0
}
ID[0] {
dwVersion: 0x20004
dwSignature: 0x45424F54
String: 'eboot.nb0'
dwImageType: 0x2
dwTtlSectors: 0x1CB
dwLoadAddress: 0x8C038000
dwJumpAddress: 0x8C039000
dwStoreOffset: 0x0
sgList[0].dwSector: 0x40
sgList[0].dwLength: 0x1CB
}
ID[1] {
dwVersion: 0x1
dwSignature: 0x43465348
String: ''
dwImageType: 0x2
dwTtlSectors: 0xEC12
dwLoadAddress: 0x80001000
dwJumpAddress: 0x8002F44C
dwStoreOffset: 0x0
sgList[0].dwSector: 0x4A0
sgList[0].dwLength: 0xEC12
}
chainInfo.dwLoadAddress: 0X00000000
chainInfo.dwFlashAddress: 0X00000000
chainInfo.dwLength: 0X00000000
}
waitforconnect

####重启电路板,经过下列过程可进入WinCE,注意若有KITL则Attach还是必需的,要不进不了系统
OEMPlatformInit: IMAGE_TYPE_RAMIMAGE
IsValidMBR: MBR sector = 0x240
OpenPartition: Partition Exists=0x1 for part 0x21.
BP_SetDataPointer at 0x0
ReadData: Start = 0x0, Length = 0x1d82400.
Log2Phys: Logical 0x260 -> Physical 0x4a0
CS8900: MAC Address: 0:0:f0:9b:11:dc
INFO: Probe: CS8900 is detected.
INFO: Init: CS8900_Init OK.
System ready!
Preparing for download...
waitforconnect
INFO: OEMLaunch: Jumping to Physical Address 0x3202F44Ch (Virtual Address 0x8002F44Ch)...

醀indows CE Kernel for ARM (Thumb Enabled) Built on Jun 24 2004 at 18:25:00
ProcessorType=0920 Revision=0
sp_abt=ffff5000 sp_irq=ffff2800 sp_undef=ffffc800 OEMAddressTable = 8002f2fc
DCache: 8 sets, 64 ways, 32 line size, 16384 size
ICache: 8 sets, 64 ways, 32 line size, 16384 size
OALKitlStart : ETHERNET
KITL: *** Device Name SMDK24404572 ***
VBridge:: built on [Dec 23 2007] time [21:33:55]
VBridgeInit()...TX = [16384] bytes -- Rx = [16384] bytes
Tx buffer [0xAC25E720] to [0xAC262720].
Rx buffer [0xAC262740] to [0xAC266740].
VBridge:: NK add MAC: [0-0-F0-9B-11-DC]
KITL: Connected host IP: 192.168.1.130 Port: 5475
KITLGlobalState == 0x61
KITL: Leaving polling mode...
VBridge:: VB_INITIALIZED returns [1]
VBridge:: RESET_BUFFER received.
VBridge:: built on [Dec 23 2007] time [21:33:55]
VBridgeInit()...TX = [16384] bytes -- Rx = [16384] bytes
Tx buffer [0xAC25E720] to [0xAC262720].
Rx buffer [0xAC262740] to [0xAC266740].
VBridge:: Current VMini packet filter = [0xB]


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值