请教6410 wince SD启动升级刷写问题

一介布衣萧萧 2012-09-17 10:46:01
前几天发的这个帖子不知道怎么搞的,点击链接总是提示404.斑竹看到麻烦查查到底怎么回事。这里再发一个看看

现在在搞6410的SD启动方式,引导升级bootloader和NK。由于飞凌那个没有提供源码,就移植了其他的过来,目前遇到一些问题。拨到SD启动方式,可以由IROM引导刷写boot0.nb0、Eboot.bin和NK.bin文件,刷写完后自动进入系统。但是刷写完之后,拨到NandFlash启动,却发现任何反应都没有。从现象来看应该是NandFlash的引导没搞好导致的。
把static BOOL DownloadImage (LPDWORD pdwImageStart, LPDWORD pdwImageLength, LPDWORD pdwLaunchAddr)函数的这个下载地址打印出来如下:(每一个对应不同的文件下载)
[YOU] boot0.nb0 dwImageStart=0x0,dwImageLength=0,dwLaunchAddr=0x0
[YOU] Eboot.bin dwImageStart=0x0,dwImageLength=73728,dwLaunchAddr=0x0
[YOU] NK.bin dwImageStart=0x80030000,dwImageLength=285920,dwLaunchAddr=0x8006A8FC

不知道这个下载到NandFlash是否正确,还请各位大大指点一下。
从网上查到boot0.nb0应该刷到NandFlash的第一个block中,Eboot.bin刷到NandFlash的第三个block中。不知道这个在哪里控制,有知道的吗?
...全文
208 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
之前开的http://topic.csdn.net/u/20120914/10/dd6c05c2-8dc4-493f-b31c-49350f4596b3.html?55840这个帖子可以访问了,两个帖子加起来有400分。大家赶紧进来呀~~~差不多就搞掂了,完了就散分~~
回复
目前已经可以在Nandflash模式下,进入到stepldr和Eboot,但是在Eboot跳转到NK的部分却卡住了,一直跳不过去。

waitforconnect
INFO: using TOC[1] dwJumpAddress: 0x801581dc
INFO: OEMLaunch: Jumping to Physical Address 0x501581DCh (Virtual Address 0x801581DCh)...

就在这里卡住了。
这个有人知道是怎么回事吗?难道是IROM引导刷写NK的部分没搞好?如果是的话,大概在哪个方面出问题了呢?
回复
[Quote=引用 7 楼 的回复:]

目前已经可以在Nandflash模式下,进入到stepldr和Eboot,但是在Eboot跳转到NK的部分却卡住了,一直跳不过去。

waitforconnect
INFO: using TOC[1] dwJumpAddress: 0x801581dc
INFO: OEMLaunch: Jumping to Physical Address 0x501581DCh (Virtual Ad……
[/Quote]

这个问题也解决了,原因是IROM中创建的分区太小导致的。改大之后就OK了。
好了,整个东西都完工了,结贴散分咯~~~
回复
bbstr 2012-09-19
从MLC换到SLC,在硬件上有两个电阻需要改一下的,貌似MLC下需要焊接,SLC下断开
回复
[Quote=引用 4 楼 的回复:]

你没有把开始的那几个块设置成reserve
所以MBR被写到了0块地址,检查一下你的烧写代码
[/Quote]

目前发现写到Flash中的数据与原文件的数据不大一致,可能是SLC和MLC模式的问题。至于你说的这个情况,待会再试试。
回复
bbstr 2012-09-18
你没有把开始的那几个块设置成reserve
所以MBR被写到了0块地址,检查一下你的烧写代码
回复
boot0.nb0从0地址开始烧写

[YOU] OEMLaunch() download Eboot.bin...
dwImageLength = 0x45ce0
dwNumBlocks = 0x2
从这里可以知道Eboot是烧写到0x2的block中的

然而,后面出现了一个WriteMBR: MBR block = 0x0.的,这个也烧写到0的block中?
如果是这样的话,那岂不是把boot0给冲掉了?

这个NandFlash启动是否需要MBR这个?这个代码都让人给搞混了(PS:代码是移植过来的)。

到[OAL] ++OEMInit()这里已经开始加载系统了。之后进入系统的调试信息就没放出来。
回复
[OAL] --OEMInitDebugSerial() ######## &(g_pGPIOReg->GPEDAT) = 0xb2b08084

[OAL] --OEMInitDebugSerial() ######## &(g_pUARTReg->UTXH) = 0xb2b05820


Microsoft Windows CE Bootloader Common Library Version 1.4 Built Sep 17 2012 17:12:32
Microsoft Windows CE Bootloader for the Samsung SMDK6410 Version 2.4 Built Sep 17 2012

[Eboot] ++InitializeDisplay()
[Eboot] --InitializeDisplay()
+OALArgsInit()
SocID:0x36410101
Arguments area is initialized
-OALArgsInit()
INFO: (unsigned)C_IsrHandler : 0x80041344
INFO: (unsigned)ASM_IsrHandler : 0x80044420
INFO: (unsigned)pISR : 0xEA011100
[YOU] HSMMC init
[HSMMCLIB] InitClkPwr()
[HSMMCLIB] InitGPIO()
[HSMMCLIB] InitHSMMCRegister()
#### this SD card is made on SPEC 2.0
This SD card is made on SPEC 2.0
[HSMMCLIB] SDInit()
[HSMMCLIB] SDInit() +++
[HSMMCLIB] OCRResponseCheck() +++

CardSize: 2002780160
[HSMMCLIB:INF] ClockConfig() Card Working Frequency = 24MHz
[YOU] BP_Init
[FMD] ++FMD_Init() ****
[FMD:INF] FMD_Init() : Read ID = 0x0000ecd5
[FMD] FMD_Init() : NUM_OF_BLOCKS = 4096
[FMD] FMD_Init() : PAGES_PER_BLOCK = 128
[FMD] FMD_Init() : SECTORS_PER_PAGE = 8
[FMD] --FMD_Init()
[FMD] FMD_GetInfo() : NUMBLOCKS = 4096(0x1000), SECTORSPERBLOCK = 128(0x80), BYTESPERSECTOR = 4096(0x1000)
[FMD] FMD_GetInfo() : NUMBLOCKS = 4096(0x1000), SECTORSPERBLOCK = 128(0x80), BYTESPERSECTOR = 4096(0x1000)
wNUM_BLOCKS : 4096(0x1000)
TOC_Read
-TOC_Read
Press [ENTER] to download image stored on boot media, or [SPACE] to enter boot monitor.

Initiating image download in 0 seconds.

[YOU] Starting auto-download ...
[YOU] Erase All block(4096) ...
[YOU] BP_Init 2
[FMD] ++FMD_Init() ****
[FMD:INF] FMD_Init() : Read ID = 0x0000ecd5
[FMD] FMD_Init() : NUM_OF_BLOCKS = 4096
[FMD] FMD_Init() : PAGES_PER_BLOCK = 128
[FMD] FMD_Init() : SECTORS_PER_PAGE = 8
[FMD] --FMD_Init()
[FMD] FMD_GetInfo() : NUMBLOCKS = 4096(0x1000), SECTORSPERBLOCK = 128(0x80), BYTESPERSECTOR = 4096(0x1000)
[YOU] System ready!
Preparing for download...
[YOU] BL1ReadFromSD()
IsCardInserted
[YOU] Read nb0 file, FileName:bok.b, MAX_PATH:260
FileName:block0.nb0
nb0 filesize:8192
BL1ReadFromSD() g_pDownPt = 0xA300211B
[YOU] boot0.nb0 dwImageStart=0x0,dwImageLength=0,dwLaunchAddr=0x0
[YOU] DownloadImage() pdwImageStart:0x0, pdwImageLength:0x0, pdwLaunchAddr:0x0
[YOU] DownloadImage() dwRegionStart:0x0, dwRegionLength:0x0, szFileName:

BL_IMAGE_TYPE_MANIFEST


BL_IMAGE_TYPE_UNKNOWN

[YOU] DownloadNB0() !g_fOEMNotified && g_pOEMMultiBINNotify

Download BIN file information:
-----------------------------------------------------
[0]: Base Address=0x0 Length=0x2000
-----------------------------------------------------
OEMVerifyMemory() dwStartAddr:0x0, dwLength:8192
Stepldr image
ImageStart = 0x0, ImageLength = 0x2000, LaunchAddr = 0x0

Completed file(s):
-------------------------------------------------------------------------------
[0]: Address=0x0 Length=0x2000 Name="block0.nb0" Target=RAM
[YOU] DownloadImage 1
[YOU] DownloadImage 2
[YOU] dwImageLength:8192, dwLaunchAddr:0x0.
[YOU] OEMLaunch() download stepldr.nb0...
BP_Init iSighForSlcMlc = 1
dwImageLength = 0x2000
dwNumBlocks = 0x2
dwBlock(0x0) X g_FlashInfo.wSectorsPerBlock(0x80) = 0x0
dwBytesPerBlock : 524288
dwBlock(0x1) X g_FlashInfo.wSectorsPerBlock(0x80) = 0x80
dwBytesPerBlock : 524288
[YOU] OEMLaunch() WriteRawImageToBootMedia block0.nb0 Success!
INFO: Step loader image stored to Smart Media. Please Reboot. Halting...
[YOU] OEMLaunch 1
IsCardInserted
EbootReadFromSD() g_pDownPt = 0xA3043CC3
[YOU] Eboot.bin dwImageStart=0x0,dwImageLength=8192,dwLaunchAddr=0x0
[YOU] DownloadImage() pdwImageStart:0x0, pdwImageLength:0x2000, pdwLaunchAddr:0x0
[YOU] DownloadImage() dwRegionStart:0x0, dwRegionLength:0x2000, szFileName:block0.nb0

BL_IMAGE_TYPE_BIN


Download BIN file information:
-----------------------------------------------------
[0]: Base Address=0x80030000 Length=0x45ce0
-----------------------------------------------------
OEMVerifyMemory() dwStartAddr:0x80030000, dwLength:285920
Eboot image
rom_offset=0x0.
ImageStart = 0x80030000, ImageLength = 0x45CE0, LaunchAddr = 0x8006A8FC

Completed file(s):
-------------------------------------------------------------------------------
[0]: Address=0x80030000 Length=0x45CE0 Name="" Target=RAM
[YOU] DownloadImage 3
ROMHDR at Address 80030044h
[YOU] dwImageLength:285920, dwLaunchAddr:0x8006A8FC.
[YOU] OEMLaunch() download Eboot.bin...
dwImageLength = 0x45ce0
dwNumBlocks = 0x2
dwBlock(0x2) X g_FlashInfo.wSectorsPerBlock(0x80) = 0x100
dwBytesPerBlock : 524288
dwBlock(0x3) X g_FlashInfo.wSectorsPerBlock(0x80) = 0x180
dwBytesPerBlock : 524288
[YOU] OEMLaunch() WriteRawImageToBootMedia Eboot.bin Success!
INFO: Eboot image stored to Smart Media. Please Reboot. Halting...
[YOU] OEMLaunch 2
IsCardInserted
NKReadFromSD() g_pDownPt = 0xA55B6E37
[YOU] NK.bin dwImageStart=0x80030000,dwImageLength=285920,dwLaunchAddr=0x8006A8FC
[YOU] DownloadImage() pdwImageStart:0x80030000, pdwImageLength:0x45CE0, pdwLaunchAddr:0x8006A8FC
[YOU] DownloadImage() dwRegionStart:0x80030000, dwRegionLength:0x45CE0, szFileName:

BL_IMAGE_TYPE_BIN


Download BIN file information:
-----------------------------------------------------
[0]: Base Address=0x80150000 Length=0x2641228
-----------------------------------------------------
OEMVerifyMemory() dwStartAddr:0x80150000, dwLength:40112680
RAM image
rom_offset=0x0.
ImageStart = 0x80150000, ImageLength = 0x2641228, LaunchAddr = 0x801581DC

Completed file(s):
-------------------------------------------------------------------------------
[0]: Address=0x80150000 Length=0x2641228 Name="" Target=RAM
[YOU] FUSING_NK DownloadImage 1
ROMHDR at Address 80150044h
[YOU] dwImageLength:40112680, dwLaunchAddr:0x801581DC.
[YOU] OEMLaunch() download NK.bin...
+WriteOSImageToBootMedia: g_dwTocEntry =1, ImageStart: 0x80150000, ImageLength: 0x2641228, LaunchAddr:0x801581dc
g_dwMBRSectorNum = 0x180
Erase Block from 0x3, to 0xffffffff
INFO: OEMLaunch: Found chain extenstion: '' @ 0x80150000
Writing single region/multi-region update, dwBINFSPartLength: 40112680
[YOU] Over !
[YOU] ff 1
dwStartSector=512
PAGES_PER_BLOCK=128
dwBINFSPartLength=40112680
dwNumSectors=9856
dwPartType=33
BP_OpenPartition() dwPartType=0x21,dwStartSector=512
IsValidMBR: block = 0xb43.
IsValidMBR: MBR sector = 0x0 (invalid MBR)
OpenPartition: Invalid MBR. Formatting flash.
Enter LowLevelFormat [0x0, 0xfff].
WriteMBR: MBR block = 0x0.
Done.

OpenPartition: Invalid MBR. Formatting flash Success.
OpenPartition: Partition Exists=0x0 for part 0x21.
CreatePartition: Enter CreatePartition for 0x21.
LastLogSector: Last log sector is: 0x7d87f.
CreatePartition: Start = 0x200, Num = 0x2680.
Log2Phys: Logical 0x200 -> Physical 0x2880
WriteMBR: MBR block = 0x0.
[YOU] ff 2
WriteOSImageToBootMedia: open/create partition Success.
we may just be updating one in a multi-BIN solution
BP_SetDataPointer at 0x0
Log2Phys: Logical 0x200 -> Physical 0x200
############################################################################
Write OS to Nand Flash finished!!!
Updateded TOC!
-WriteOSImageToBootMedia
[YOU] OEMLaunch() WriteOSImageToBootMedia NK.bin Success!
TOC {
dwSignature: 0x434F544E
BootCfg {
ConfigFlags: 0x10020
BootDelay: 0x2
ImageIndex: 1
IP: 0.0.0.0
MAC Address: 00:00:00:00:00:00
Port: 0.0.0.0
SubnetMask: 255.255.255.0
}
ID[0] {
dwVersion: 0x20004
dwSignature: 0x45424F54
String: 'eboot.nb0'
dwImageType: 0x2
dwTtlSectors: 0x46
dwLoadAddress: 0x80030000
dwJumpAddress: 0x8006A8FC
dwStoreOffset: 0x0
sgList[0].dwSector: 0x100
sgList[0].dwLength: 0x46
}
ID[1] {
dwVersion: 0x1
dwSignature: 0x43465348
String: ''
dwImageType: 0x2
dwTtlSectors: 0x2642
dwLoadAddress: 0x80150000
dwJumpAddress: 0x801581DC
dwStoreOffset: 0x0
sgList[0].dwSector: 0x200
sgList[0].dwLength: 0x2642
}
chainInfo.dwLoadAddress: 0X00000000
chainInfo.dwFlashAddress: 0X00000000
chainInfo.dwLength: 0X00000000
}
waitforconnect
INFO: using TOC[1] dwJumpAddress: 0x801581dc
INFO: OEMLaunch: Jumping to Physical Address 0x501581DCh (Virtual Address 0x801581DCh)...


[OAL] --OEMInitDebugSerial() ######## &(g_pGPIOReg->GPEDAT) = 0xb2b08084

[OAL] --OEMInitDebugSerial() ######## &(g_pUARTReg->UTXH) = 0xb2b05820

Windows CE Kernel for ARM (Thumb Enabled) Built on Sep 25 2009 at 11:04:23
[OAL] ++OEMInit()
回复
unsway123 2012-09-17
可以看看你的boot.nb0具体烧写到nandflash的那块了,eboot被烧写到那块了,如果你的SD上面的EBOOT够完善,可以读读是不是都写到具体的地方了,这打印信息太少了
回复
相关推荐
发帖
嵌入开发(WinCE)
创建于2007-09-28

1.9w+

社区成员

硬件/嵌入开发 嵌入开发(WinCE)
申请成为版主
帖子事件
创建了帖子
2012-09-17 10:46
社区公告
暂无公告