NAND Flash更新/恢复

注意:

(1)这里以256M NandFlash、 256M DDR的镜像为例,如果需要更新512M NandFlash、512M DDR的镜像,请使用02-Image\Linux-image\512M_DDR_NandFlash\目录下的镜像。

(2)如果使用MY-TFT070-K LCD,可以使用任意的u-boot.img。这里以使用4.3寸LCD为例,将u-boot.img_lcd4.3重命名为u-boot.img。

Nand启动映像的更新需要借助于u-boot来完成。不管NAND Flash是否有数据,都可以利用TF卡启动的u-boot对NAND Flash更新映像。

  • 准备
    • 用光盘目录03-Tools目录下的HP USB Disk Storage Format Tool 2.0.6工具将TF卡格式化为FAT或FAT32文件系统
    • 将光盘目录02-Images\Linux-image\256M_DDR_NandFlash\目录下的映像文件拷贝到TF卡中
  • 更新
    • 将带有系统映象的TF卡插入开发板,连接JP6的1-2脚,上电启动,在u-boot 的提示读秒处,按下键盘上任意键进入u-boot:
    U-Boot SPL 2011.09 (Jan 13 2014 - 17:02:44)
    Texas Instruments Revision detection unimplemented
    Booting from MMC...
    OMAP SD/MMC: 0
    reading u-boot.img
    reading u-boot.img   
    U-Boot 2011.09 (Jan 13 2014 - 17:02:44)   
    I2C:   ready
    DRAM:  256 MiB
    WARNING: Caches not enabled
    Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board
    NAND:  HW ECC Hamming Code selected
    256 MiB
    MMC:   OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment
    Net:   cpsw
    Hit any key to stop autoboot:  0
* 进入u-boot命令行后,在命令行上输入“run updatesys”,开始自动更新系统:
    # run updatesys
    NAND erase.chip: device 0 whole chip
    Erasing at 0x1ffe0000 -- 100% complete.
    OK
    reading MLO
    38167 bytes read
    HW ECC BCH8 Selected
    NAND write: device 0 offset 0x0, size 0x9517
     38167 bytes written: OK
    reading u-boot.img
    232892 bytes read
    HW ECC BCH8 Selected
    NAND write: device 0 offset 0x80000, size 0x38dbc
     232892 bytes written: OK
    reading uImage
    3506488 bytes read
    HW ECC BCH8 Selected
    NAND write: device 0 offset 0x280000, size 0x358138
     3506488 bytes written: OK
    reading ubi.img
    14942208 bytes read
    SW ECC selected
    NAND write: device 0 offset 0x780000, size 0xe40000
     14942208 bytes written: OK
* 系统更新完后,核心板上的LED灯D3将会闪烁,此时拨出TF卡,连接JP6跳线的2-3脚,给开发板重新上电后即可从Nand Flash启动。