This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm368 在线升级

你好我在做dm368在线升级,通过mtd工具生成nandwrite升级uboot 和kernel,流程如下

  我首先用sfh_DM36x.exe这个工具烧写UBL和uboot ,在uboot下烧写kernel和rootfs,系统启动成功后用nandwrite升级uboot和kernel,其中uboot我根据需要添加了一些头消息并计算其应该写入位置,但是升级uboot后不能正常启动,仅升级kernel,可以正常启动。

后来我发现是UBL拷贝uboot时ecc校验未通过,于是我将UBL ecc校验关闭启动正常

UBL 修改代码如下flash-utils/Common/drivers/src/nand.c

将287行代码注释,禁用ecc

#if 0

    // Use ECC bytes to correct any errors

    (*hNandInfo->hEccInfo->fxnRead)(hNandInfo, spareBytes, i, readECC);

if ((*hNandInfo->hEccInfo->fxnCorrect)(hNandInfo,&dest[hNandInfo->dataBytesPerOp*i],readECC) != E_PASS)

      return E_FAIL;

#endif

请问使用sfh_DM36x.exe烧写uboot有何特殊之处,为什么我用nandwrite烧写会出现ecc不通过,但是烧写kernel却可以正常启动,关于UBL和uboot这两块代码对于nand读取配置有何不一样,为何同样的写入方式,UBL不可以启动?