阅读:3154回复:7
wince5.0 下面 nandflash驱动问题,无法加载,FMD::FMD_OEMIoControl = 0x71c24
我的平台是2440,wince5.0,系统在启动过程中,停在nandflash驱动部分,之前系统是用其他boot,flash disc 和 hive 都已经实现,现在使用eboot,
我修改了loader.h部分的block地址,loader.h 文件如下: // Memory reigions defined in boot.bib... // #define EBOOT_RAM_IMAGE_BASE 0x8c038000 #define EBOOT_RAM_IMAGE_SIZE 0x00080000 #define EBOOT_STORE_OFFSET 0 #define EBOOT_STORE_ADDRESS (EBOOT_RAM_IMAGE_BASE + EBOOT_STORE_OFFSET) #define EBOOT_STORE_MAX_LENGTH EBOOT_RAM_IMAGE_SIZE // Flash Cache area defined in boot.bib #define FLASH_CACHE 0x8D000000UL #define FLASH_CACHE_SIZE 0x01000000UL // BinFS work area defined in boot.bib #define BINFS_RAM_START (0x8c021000 | CACHED_TO_UNCACHED_OFFSET) // uncached #define BINFS_RAM_LENGTH 0x5000 // // Nk Memory reigions defined in config.bib... // #define ROM_RAMIMAGE_START 0x8C100000 #define ROM_RAMIMAGE_SIZE 0x01000000 // Start addresses must match config.bib's RAMIMAGE #define RAM_START 0x8d100000 #define RAM_SIZE 0x00F00000 #define DEFAULT_LAUNCHADDR ROM_RAMIMAGE_START // // SDRAM // #define SDRAM_BASE 0x8C000000 // defined in OEMAddressTable #define SDRAM_SIZE 0x02000000 // 32 MB // // On disk structures for NAND bootloaders... // // // OEM Reserved (Nand) Blocks for TOC and various bootloaders // // NAND Boot (loads into SteppingStone) @ Block 0 #define NBOOT_BLOCK 0 #define NBOOT_BLOCK_SIZE 1 /*1 change by capbily for vivi */ #define NBOOT_SECTOR BLOCK_TO_SECTOR(NBOOT_BLOCK) // TOC @ Block 1 #define TOC_BLOCK 1 /*1 change by capbily for vivi */ #define TOC_BLOCK_SIZE 1 #define TOC_SECTOR BLOCK_TO_SECTOR(TOC_BLOCK) // Eboot @ Block 2 #define EBOOT_BLOCK 2 /*2 change by capbily for vivi */ #define EBOOT_SECTOR_SIZE FILE_TO_SECTOR_SIZE(EBOOT_RAM_IMAGE_SIZE) /*FILE_TO_SECTOR_SIZE(EBOOT_RAM_IMAGE_SIZE)*/ #define EBOOT_BLOCK_SIZE SECTOR_TO_BLOCK(EBOOT_SECTOR_SIZE) /*SECTOR_TO_BLOCK(EBOOT_SECTOR_SIZE)*/ #define EBOOT_SECTOR BLOCK_TO_SECTOR(EBOOT_BLOCK) #define RESERVED_BOOT_BLOCKS (NBOOT_BLOCK_SIZE + TOC_BLOCK_SIZE + EBOOT_BLOCK_SIZE)// (NBOOT_BLOCK_SIZE + TOC_BLOCK_SIZE + EBOOT_BLOCK_SIZE) // Images start after OEM Reserved Blocks #define IMAGE_START_BLOCK RESERVED_BOOT_BLOCKS #define IMAGE_START_SECTOR BLOCK_TO_SECTOR(IMAGE_START_BLOCK) 串口打印信息如下: WriteMBR: MBR block = 0x22. Done. OpenPartition: Partition Exists=0x0 for part 0x21. CreatePartition: Enter CreatePartition for 0x21. LastLogSector: Last log sector is: 0x1F3BF. CreatePartition: Start = 0x460, Num = 0x90C0. Log2Phys: Logical 0x460 -> Physical 0x8A0 WriteMBR: MBR block = 0x22. dwRegionStart: 0x8C200000, dwRegionLength: 0x1215BC8, dwStoreOffset: 0x0 BP_SetDataPointer at 0x0 WriteData: Start = 0x0, Length = 0x1215BC8. Log2Phys: Logical 0x460 -> Physical 0x8A0 Updateded TOC! IsValidMBR: MBR sector = 0x440 OpenPartition: Partition Exists=0x0 for part 0xB. CreatePartition: Enter CreatePartition for 0xB. FindFreeSector: FreeSector is: 0x9520 after processing part 0x21. CreatePartition: Num sectors set to 0x15D60 to allow for compaction blocks. CreatePartition: Start = 0x9520, Num = 0x15D60. WriteMBR: MBR block = 0x22. -WriteRegionsToBootMedia +TOC_Write -TOC_Write TOC { dwSignature: 0x434F544E BootCfg { ConfigFlags: 0x2830 BootDelay: 0xF ImageIndex: 1 IP: 192.168.0.21 MAC Address: 12:34:56:78:AC:00 Port: 0.0.0.0 SubnetMask: 255.255.255.0 } ID[0] { dwVersion: 0x10002 dwSignature: 0x45424F54 String: 'eboot.nb0' dwImageType: 0x2 dwTtlSectors: 0x400 dwLoadAddress: 0x8C038000 dwJumpAddress: 0x8C038000 dwStoreOffset: 0x0 sgList[0].dwSector: 0x40 sgList[0].dwLength: 0x400 } ID[1] { dwVersion: 0x1 dwSignature: 0x43465349 String: '' dwImageType: 0x6 dwTtlSectors: 0x90AE dwLoadAddress: 0x8C200000 dwJumpAddress: 0x8C201000 dwStoreOffset: 0x0 sgList[0].dwSector: 0x8A0 sgList[0].dwLength: 0x90AE } chainInfo.dwLoadAddress: 0X00000000 chainInfo.dwFlashAddress: 0X00000000 chainInfo.dwLength: 0X00000000 } Jumping to image at virtual address 0x8C201000h +ToPhysicalAddr:0x8C201000 -ToPhysicalAddr:0x30201000 ::: Physical Launch Address: 0x30201000h Windows 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 = 8c2013bc Windows CE Firmware Init INFO: Initializing system interrupts... INFO: Initializing system clock(s)... INFO: Initializing driver globals area... INFO: display logo ok SDMMC config set rGPGCON: fd96fdba SDMMC config Init Done. OEMInit Done... Sp=ffffc7cc FMD::FMD_Init FMD::FMD_Init Done FMD::FMD_OEMIoControl:nandflash FMD::FMD_OEMIoControl:nandflash FMD::FMD_OEMIoControl = 0x71c24 ,网上有看到说是HIVE引起的,不过根本原因应该还是flashdr.dll的问题,请教各位,问题出在哪里呢? |
|
沙发#
发布于:2008-07-18 11:15
可以选上Clean Before Building
然后再Build and Sysgen 在代码没错的情况下,遇到这样的问题,通常Clean Build(1-2个小时那种)可以解决 |
|
|
板凳#
发布于:2008-07-18 11:23
阿贵? 不会吧,build and sysgen倒没有试阿,clean试过,还是如此。
应该是分区错误, CreatePartition: Start = 0x460, Num = 0x90C0. NUM不知道指的是block还是sector? 如果是block 肯定超出范围了 |
|
地板#
发布于:2008-07-18 11:28
周兄,我碰到过,不信你试试,如果代码没问题的话
|
|
|
地下室#
发布于:2008-07-18 13:03
还是一样哦~ 问题到底出在哪儿呢?
|
|
5楼#
发布于:2008-07-18 21:44
请各位帮我看一下,唉,折腾好久了~
|
|
6楼#
发布于:2008-07-21 17:50
还是没有解决,继续顶。
CreatePartition: Start = 0x460, Num = 0x90C0.这些似乎是sector,应该和boot大小,内核大小,有关。 我现在开始怀疑hive的问题,因为把 "Start DevMgr"由1该为0,就可以进系统,可是找不到flash disk,可是之前用开发板的supervivi来启动,hive已经实现了阿 ? |
|
7楼#
发布于:2008-07-22 16:25
继续顶!
现在把flash部分的debug信息都打开,发现在 OEMInit Done... Sp=ffffc7cc NandFlash FMD_Init NandFlash FMD_Init Done 之后,系统会读nandflah,从block10(10以前为boot)到64m的最后为止。 然后debug信息显示 FMD::FMD_OEMIoControl:nandflash FMD::FMD_OEMIoControl:nandflash FMD::FMD_OEMIoControl = 0x71c24 就卡住了~ |
|