一.EMMC分区
1.修改modem惻 msm7627ym/core/storage/tools/jsdcc/partition_load/partition.xml里面的system或userdata空间大小.
2.然后编译modem侧代码,将生成的在msm7627ym/core/storage/tools/jsdcc/partition_load/目录下的文件rawprogram0.xml替换掉AP惻
的vendor/qcom/proprietary/tools/ext4_sparse/rawprogram0.xml.
3.然后修改device/qcom/msmxx/Boardconfig.mk里面的分区宏,使这个分区恰好小于modem惻的分区大小(因为modem惻被认为是物理分区)
4.编译system即可.
二.nandflash分区
只需要修改AP惻的lk和vendor两个目录即可:
1.在bootable/bootloader/lk/target/msmxx/init.c中有个board_part_list的数组,system的分区在里面修改,同样被认为是物理分区.
2.然后修改vendor下面的Boardconfig.mk,这个和前面emmc分区第三条一样.
3.编译system即可.
三.fastboot分布烧录(download)
进文件engine.c msm7627a/system/core/fastboot/
里面的函数fb_queue_flash添加如下补丁:
void fb_queue_flash(const char *ptn, void *data, unsigned sz)
{
Action *a;
//[modify for fastboot download img step by step 2013.1.4] {begain
int i;
int imax= sz/54067200;//50MB
int imod= sz%54067200;
for(i=0; i<imax; i++){
a = queue_action(OP_DOWNLOAD, "");
a->data = data+i*54067200;
a->size = 54067200;
a->msg = mkmsg("sending '%s' (%d KB)", ptn, 54067200 / 1024);
a = queue_action(OP_COMMAND, "flash:%s", ptn);
a->msg = mkmsg("writing '%s'", ptn);
}
if(imod){
a = queue_action(OP_DOWNLOAD, "");
a->data = data+imax*54067200;
a->size = imod;
a->msg = mkmsg("sending '%s' (%d KB)", ptn, imod / 1024);
a = queue_action(OP_COMMAND, "flash:%s", ptn);
a->msg = mkmsg("writing '%s'", ptn);
}
}
进文件nand.c msm7627a/bootable/bootloader/lk/platform/msm_shared/
里面的flash_write函数 添加补丁
int flash_write(struct ptentry *ptn, unsigned extra_per_page, const void *data,
unsigned bytes)
{
unsigned page = ptn->start * num_pages_per_blk;
unsigned lastpage = (ptn->start + ptn->length) * num_pages_per_blk;
unsigned *spare = (unsigned*) flash_spare;
const unsigned char *image = data;
unsigned wsize = flash_pagesize + extra_per_page;
unsigned n;
int r;
//[modify for fastboot download img step by step 2013.1.4] {begain
static unsigned index=0;
if (!strcmp(ptn->name, "system") ){
page=page+index*25600;
index++;
}
if (!strcmp(ptn->name, "system")&&bytes!=54067200 )
index=0;
//[modify for fastboot download img step by step 2013.1.4] }end
if ((flash_info.type == FLASH_ONENAND_DEVICE) && (ptn->type == TYPE_MODEM_PARTITION))
{
dprintf(CRITICAL, "flash_write_image: feature not supported\n");
return -1;
}
...........................
}