关于飞凌2440(FL2440,OK2440-III,TE2440-II)的分区问题

关于飞凌2440(FL2440,OK2440-III,TE2440-II)的分区问题

分类: bootloader flash、SDRAM

   最近,有几个客户问起关于飞凌2440(FL2440,OK2440-III,TE2440-II)的分区问题,我刚才抽时间看了一下,现在做如下解释:

   一、v4版本bootloader,飞凌的ADS bootloader 给Linux,wince,以及bootloader都做了划分,bootloader源码的nand.c里面,有如下划分。

//可更改删除分区,分区名字不可改
static struct Partition NandPart[] = {
 {0,     0x00100000, "boot"}, //1M
 {0x00100000, 0x00040000, "bootParam"}, //256K two blocks
 {0x00140000, 0x00100000, "pic"},  //1M
 {0x00240000, 0x002c0000, "MyApp"},  //2M768K
 {0x00500000, 0x00300000, "kernel"},  //3M
 {0x00800000, 0x03c00000, "fs_yaffs"}, //60M
 {0x04400000, 0x03c00000, "wince"},  //60M
 {0,    0         , 0}
};

--------------------------------哦,飞凌不止我说的Linux,wince,bootloader,还有好多划分呢。

   有朋友问,想删除别的分区,保留wince和bootloader即可,请问如何做呢?那么删除上面别的分区即可,同时在bootloader菜单选项要做相应的处理。

   飞凌2440 v4bootloader不支持binfs ,fat分区是通过注册表设置自动格式化,并mount的,下面是注册表

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/SMFLASH]
  "DefaultFileSystem"="FATFS"
  "PartitionDriver"="mspart.dll"
  "AutoMount"=dword:1
  "AutoPart"=dword:1
  "AutoFormat"=dword:1
  "Folder"="ResidentFlash"
  "Name"="Microsoft Flash Disk"
  "BootPhase"=dword:0
  "Flags"=dword:1000

 

未完,待续·····

 

在wince的 nand flash驱动中也要注意,在

FMD_GetBlockStatus函数里面要做一些限制,比如fl2440 中有

/*
    @func   DWORD | FMD_GetBlockStatus | Returns the status of the specified block.
    @rdesc  Block status (see fmd.h).
    @comm    
    @xref   
*/
DWORD FMD_GetBlockStatus(BLOCK_ID blockID)
{
 blockID += reserved_blocks;

    SECTOR_ADDR Sector = (blockID * NAND_PAGE_CNT);
    SectorInfo SI;
    DWORD dwResult = 0;

 
 
    if (IsBlockBad(blockID))
        return BLOCK_STATUS_BAD;

    if (!FMD_ReadSector(Sector, NULL, &SI, 1)) 
        return BLOCK_STATUS_UNKNOWN;

    if (!(SI.bOEMReserved & OEM_BLOCK_READONLY))  
        dwResult |= BLOCK_STATUS_READONLY;

    if (!(SI.bOEMReserved & OEM_BLOCK_RESERVED))  
        dwResult |= BLOCK_STATUS_RESERVED;

    return(dwResult);
}

 

----------------经过上述几个地方的修改,那么wince 下的FAT区就会增大的了。

你可能感兴趣的:(linux,struct,Microsoft,Flash,Flash,WinCE,disk,bootloader,sdram)