一. 修改识别的NANDID及其配置
- Add NAND flash part in “supported_nand_devices[]” inboot_images/core/storage/flash/src/dal/flash_nand_config.c
- Add supported_nand_devices[]” in modem_proc/core/storage/flash/src/dal/flash_nand_config.c
- Add supported_flash[] in bootable/bootloader/lk/platform/msm_shared/qpic_nand.c
- Add manufacture id define in Apps_proc\include\linux\mtd\nand.h
- Add in nand_flash_ids[] in the file Apps_proc\drivers\mtd\nand\nand_ids.c
- Add in nand_manuf_ids[] in the file Apps_proc\drivers\mtd\nand\nand_ids.c if the memory vendor is not there in list.
二.修改9X07支持的ECC长度
MDM9x07 can support 4-bit ECC and 8-bit ECC NAND parts. BCH algorithm is used for
both 4-bit and 8-bit ECC.
三.修改生成的镜像
Required application processor build changes for a 2k page NAND part
The application processor build requires the following changes for a 2000-page NAND
part:
Set the PAGE_SIZE to 2048 in oe-core/meta-msm/conf/machine/mdm9607.conf file Change MKUBIFS_ARGS and UBINIZE_ARGS to specify 2048 for -m and -s
options.
Example changes to support 2 KB-page boot and system UBI image support:
File – apps_proc/oe-core/meta-msm/conf/machine/mdm9607.conf
For the kernel image:
PAGE_SIZE = ‘2048’
For a system/usr UBI image:
#UBINIZE Args
UBINIZE_ARGS = “-m 2048 -p 128KiB -s 2048”
#MKUBIFS Args
MKUBIFS_ARGS = “-m 2048 -e 126976 -c 567 -F”
Change MKUBIFS_ARGS to specify 2048 for the -m option in the following file:
File – apps_proc/oe-core/meta-msm/recipes/images/mdm9607-recovery-image.inc
For example:
MKUBIFS_ARGS = “-m 2048 -e 126976 -c 74 -F”
NOTE:
-c is number of blocks in the system partition. The value depends on the rest of
the partition size, see the partition.xml file in the build for the partition size.
The changes are made in file poky\meta-qti-bsp\conf\machine\include\mdm9607.inc instead of apps_proc/oe-core/meta-
msm/conf/machine/mdm9607.conf from LE.2.0 PL onwards. There is no change required for 2K page as PAGE_SIZE_2K and UBINIZE_ARGS_2K are already
defined in mdm9607.inc file.
除了上面的通用配置外,但还有一些MCP中的NAND颗粒有些特殊,比如PN612G8D2TE-B80E0
高通在烧写镜像是借助助流镜像也就是prog_nand_firehose_9x07.mbn
一. DATASHEET错误的情况下,重配NAND
在static struct flash_nand_params supported_nand_devices[] ,中添加新的MCP,新的MCP,其DATASHEET一定要正确,因为有些厂家的DATASHEET是用颗粒厂的DATASHEET
拼的,可能会存在错误,所以不在全依赖于DATASHEET,要仔细看DATASHEET中的数据,依据DATASHEET来判断DATASHEET的错误部分
关键易错参数 :
1. ECC纠错,这个DATASHEET中最容易出错的部分,一般的PAGE,块,等大小都不会出错,因为如果这些出错,整个NAND容量就会出错
2.冗余空间,这个要根据PAGE中标识的冗余大小来的配置
二. 连续写与单页写
高通默认在烧写镜像时,#define FLASH_PAGE_WRITE_COUNT 4
连续4页写,这个如何判断你当前的MCP是否支持,如果你烧写镜像后,设备仍一直在9008,并且你回读镜像后,在对镜像后,
数据异常,并且只有一页有数据, 那么此时很可能就是此NAND不支持连续的多页写。
打赏作者
近期评论