阅读量:0
1、在”components\hal\config“路径下,找到对应芯片组型号文件夹,如8850。
2、根据模组闪存容量以及是否使用volte功能选择对应文件,如“partinfo_8850_8m_opencpu_novolte.json”文件,表示8850芯片,8M flash容量版本,opencpu开发,不开启volte功能的固件的固件分区文件。
3、修改文件,打开后样式如下:
{ "version": "0x100", "descriptions": [ { "type": "FBD2", "flash": "SFL1", "name": "FSYS", "offset": "0x370000", "size": "0x250000", "erase_block": "0x1000", "logic_block": "0x200" }, { "type": "FBD2", "flash": "SFL1", "name": "FMOD", "offset": "0x5c0000", "size": "0x200000", "erase_block": "0x8000", "logic_block": "0x200" }, { "type": "FBD2", "flash": "SFL1", "name": "FFAC", "offset": "0x7c0000", "size": "0x40000", "erase_block": "0x1000", "logic_block": "0x100" }, { "type": "SFFS", "device": "FSYS", "mount": "/", "reserve_block": "32" }, { "type": "SFFS", "device": "FMOD", "mount": "/modem", "application_ro": true }, { "type": "SFFS", "device": "FFAC", "mount": "/factory", "application_ro": true } ], "macros": { "CONFIG_SPL_FLASH_ADDRESS": "0x60000000", "CONFIG_SPL_FLASH_SIZE": "0x20000", "CONFIG_BOOT_FLASH_ADDRESS": "0x60020000", "CONFIG_BOOT_FLASH_SIZE": "0x10000", "CONFIG_TZ_SML_FLASH_ADDRESS": "0x0", "CONFIG_TZ_SML_FLASH_SIZE": "0x0", "CONFIG_TZ_TOS_FLASH_ADDRESS": "0x0", "CONFIG_TZ_TOS_FLASH_SIZE": "0x0", "CONFIG_APP_FLASH_ADDRESS": "0x60030000", "CONFIG_APP_FLASH_SIZE": "0x220000", "CONFIG_APPIMG_FLASH_ADDRESS": "0x60250000", "CONFIG_APPIMG_FLASH_SIZE": "0x120000", "CONFIG_FS_SYS_FLASH_ADDRESS": "0x60370000", "CONFIG_FS_SYS_FLASH_SIZE": "0x250000", "CONFIG_FS_MODEM_FLASH_ADDRESS": "0x605c0000", "CONFIG_FS_MODEM_FLASH_SIZE": "0x200000", "CONFIG_FS_FACTORY_FLASH_ADDRESS": "0x607c0000", "CONFIG_FS_FACTORY_FLASH_SIZE": "0x40000", "CONFIG_FS_SYS_MOUNT_POINT": "/", "CONFIG_FS_MODEM_MOUNT_POINT": "/modem", "CONFIG_FS_FACTORY_MOUNT_POINT": "/factory", "CONFIG_FS_MODEM_NVM_DIR": "/runningnv", "CONFIG_FS_AP_NVM_DIR": "/nvm", "CONFIG_FS_FOTA_DATA_DIR": "/fota", "CONFIG_SPL_FLASH_ENABLE": "on", "CONFIG_EFS_SYS_FLASH2_ADDRESS": "0x00000000", "CONFIG_EFS_SYS_FLASH2_SIZE": "0x0" } }
其中:
"CONFIG_APP_FLASH_ADDRESS": "0x60030000", "CONFIG_APP_FLASH_SIZE": "0x220000",
表示固件部分的起始地址和占用空间。这个一般不要动,除非有进一步压缩的固件,省出空间的需求。
"CONFIG_APPIMG_FLASH_ADDRESS": "0x60250000", "CONFIG_APPIMG_FLASH_SIZE": "0x120000",
表示APP_IMG的起始地址和占用空间,这个部分是开发者自己编写的程序占用的区域。
"CONFIG_FS_SYS_FLASH_ADDRESS": "0x60370000", "CONFIG_FS_SYS_FLASH_SIZE": "0x250000",
表示片内文件系统的起始地址和占用空间,这个和前面的APP_IMG可以一起做调整。比如如果需要比较大的文件系统,则可以缩小APP_IMG的空间,增加文件系统的占用空间。
比如现在APP_IMG的空间为0x120000,约1152KB,FS的空间为0x250000,约为2368KB,增加FS的空间,可以这样修改:
"CONFIG_APPIMG_FLASH_ADDRESS": "0x60250000", "CONFIG_APPIMG_FLASH_SIZE": "0x100000", "CONFIG_FS_SYS_FLASH_ADDRESS": "0x60350000", "CONFIG_FS_SYS_FLASH_SIZE": "0x270000",
这样就将0x2000的空间分配给了文件系统,文件系统空间变为0x270000.
分配后,注意要修改前面文件系统区域的配置,将两者起始地址和空间修改为一致的,如下
{ "type": "FBD2", "flash": "SFL1", "name": "FSYS", "offset": "0x350000", "size": "0x270000", "erase_block": "0x1000", "logic_block": "0x200" },