型号配置:
1.CUSTOM_MEMORY_HDR(需要确认是否是MTK认证的flash ic)
mediatekcustom$(PROJECT)preloaderinccustom_MemoryDevice.h
#defineBOARD_ID MT6577_EVB
#defineCS_PART_NUMBER[0] H9TP32A4GDMCPR_KDM
#defineCS_PART_NUMBER[1] KMKUS000VM_B410
备注:新增flash ic添加到此处,flash可以做到兼容;不能兼容相同IC Id的memeory ic.
2.特定项目不同类型分区定义信息(是否定义、顺序):
mediatekcustomprjkernelcoresrcpartition.c
structpart_name_map g_part_name_map[PART_MAX_COUNT] = {
{"preloader", PART_PRELOADER, "rawdata", 0, 0, 0},
{"dsp_bl", PART_DSP_DL, "rawdata", 1, 0, 0},
{"mbr", PART_MBR, "raw data", 2, 1, 1},
{"ebr1", PART_EBR1, "raw data", 3, 1, 1},
{"pmt", PART_PMT, "raw data", 4, 0, 0},
{"nvram", PART_NVRAM, "rawdata", 5, 0, 0},
{"seccfg", PART_SECURE, "raw data", 6, 0, 0},
{"uboot", PART_UBOOT, "raw data", 7, 1, 1},
{"boot", PART_BOOTIMG, "raw data", 8, 1, 1},
{"recovery", PART_RECOVERY, "rawdata", 9, 1, 1},
{"sec_ro", PART_SECSTATIC, "ext4", 10, 0, 0},
{"misc", PART_MISC, "raw data", 11, 0, 0},
{"logo", PART_LOGO, "raw data", 12, 1, 1},
{"expdb", PART_APANIC, "raw data", 13, 0, 0},
{"system", PART_ANDSYSIMG, "ext4", 14, 1, 1},
{"cache", PART_CACHE, "ext4", 15, 1, 1},
{"userdata", PART_USER, "ext4", 16, 1, 1},
{"fat", PART_FAT, "fat", 17, 0, 0},
};
3.emmc scat 分区大小设置(emmc) :
可对emmc进行分区,修改preloadersystemimageuserdataFAT等各个分区。
alpsmediatekuild oolsptgenMT6577partition_table_MT6577.xls
备注:Cache分区需要保持在512mb左右,否则系统会比较慢,响应迟缓。
4.FLASH参数配置文件位置(MemoryDeviceList_MT6577.xls):
MEMORY_DEVICE_XLS =
mediatekuild oolsemigen$(MTK_PLATFORM)MemoryDeviceList_$(MTK_PLATFORM).xls
.xls文件含三个页面:
MT6577(page one):配置Flash Vendor Id 对应的硬件参数。
NAND(page two):
emmc_region(pagethree)
5.Flash驱动电压修改,读写速度方式修改:
mediatekcustomkonka73_gbkernelcoresrcoard.c
struct msdc_hw msdc0_hw = {
.clk_src = 1,
.cmd_edge =MSDC_SMPL_FALLING,
.data_edge =MSDC_SMPL_FALLING,
.clk_drv = 5, //: 0 //memory驱动电压
.cmd_drv = 5, //: 0
.dat_drv = 5, // : 0
#ifdefMTK_EMMC_SUPPORT
.data_pins = 8,
#else
.data_pins = 4,
#endif
.data_offset = 0,
#ifdefMTK_EMMC_SUPPORT
.flags = MSDC_SYS_SUSPEND | MSDC_HIGHSPEED,//memory读写速度
//.flags = MSDC_SYS_SUSPEND,
#else
.flags =MSDC_SDCARD_FLAG,
#endif
6.emmc FAT分区划分:
emmc型号、emmc软件分区都会影响FAT分区的大小。
验证FAT Size需要对应emmc型号机器下载对应emmc软件分区的软件,不能预先下载FAT部分(影响实际FAT分区大小):
adb shell
cat /proc/emmc
cat /proc/partition获取大小。