LINUX分区表改为:(/arch/arm/mach-s3c2410/devs.c)
struct mtd_partition TE24xx_default_nand_part_b[]= {
= {
.name = "Boot",
.size = 0x00100000,
.offset = 0
},
= {
.name = "MyApp",
.size = 0x003c0000,
.offset = 0x00140000,
},
= {
.name = "Kernel",
.size = 0x00300000,
.offset = 0x00500000,
},
= {
.name = "fs_yaffs",
.size = 0x07800000, //原为60M现大小增大一倍
.offset = 0x00800000,
},
/* = {
.name = "WINCE",
.size = 0x03c00000,
.offset = 0x04400000, //将wince屏蔽掉
}*/
};
/*
struct s3c2410_nand_set nandset ={
nr_partitions: 4 , //原为5现改为4
partitions: TE24xx_default_nand_part_b,//partition_info 64M
};
然后重新编译内核
-------------------------------------
boot源码中将nand.c中改为如下所示
static struct Partition NandPart[] = {
{0, 0x00100000, "boot"}, //128K
{0x00100000, 0x00040000, "bootParam"},//two blocks
{0x00140000, 0x003c0000, "MyApp"}, //4M512K
{0x00500000, 0x00300000, "kernel"}, //3M128K
//{0x00800000, 0x01400000, "fs_cramfs"}, //20M
{0x00800000, 0x07800000, "fs_yaffs"}, //40M
// {0x00500000, 0x03c00000, "wince"}, //60M
{0, 0 , 0}
};
然后重新编译boot即可 该文件适合飞凌双系统的2440开发板,以下描述是将双系统修改为单系统的wince
1、boot中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
{0x00240000, 0x07dc0000, "wince"}, //60M
{0, 0 , 0}
};
修改之后,将其重新编译。
注意,在下载新的单系统boot之前,最好用原双系统的boot将所有分区擦除(除boot分区),否则可能会出现用户可用flash比较小
2、修改nand flash驱动fmd.cpp文件
如果bsp为smdk2440,则该文件所在路径为E:\WINCE500\PLATFORM\smdk2440\DRIVERS\Nandflsh\FMD
如果bsp为smdk2440a,则该文件所在路径为:E:\WINCE500\PLATFORM\SMDK2440A\Src\Common\Smartmedia\Fmd
#if K9F1G08_SUPPORT
{0xECF1,/*K9F1G08U0M*/
FALSE,
0x6700000,// 103M 修改改制可以修改为4600000,此时用户可用flash有50多兆,当然还可以再大些。
{NAND,1024,2048*64,64,2048},
FMD_ReadSector1G08,
FMD_WriteSector1G08,
FMD_EraseBlock1G08,
IsBlockBad1G08,
MarkBlockBad1G08
},
修改好之后编译下nand驱动即可,前提是工程已经编译过并选上了Make Run-Time Image After Build 对~
页:
[1]