zoukankan      html  css  js  c++  java
  • nor flash 的简单操作命令

    # cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00500000 00001000 "boot"
    mtd1: 00020000 00001000 "bootenv"
    mtd2: 00a80000 00001000 "kernel"
    mtd3: 00060000 00001000 "spare"
    
    
    # mtd_debug --help
    usage: mtd_debug info <device>
           mtd_debug read <device> <offset> <len> <dest-filename>
           mtd_debug write <device> <offset> <len> <source-filename>
           mtd_debug erase <device> <offset> <len>
    
    
    # mtd_debug info /dev/mtd0
    mtd.type = MTD_NORFLASH
    mtd.flags = MTD_CAP_NORFLASH
    mtd.size = 5242880 (5M)
    mtd.erasesize = 4096 (4K)
    mtd.writesize = 1 
    mtd.oobsize = 0 
    regions = 0
    
    # flash_eraseall --help
    flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
    Usage: flash_erase [options] MTD_DEVICE <start offset> <block count>
    Erase blocks of the specified MTD device.
    Specify a count of 0 to erase to end of device.
    
      -j, --jffs2       format the device for jffs2
      -N, --noskipbad   don't skip bad blocks
      -u, --unlock      unlock sectors before erasing
      -q, --quiet       do not display progress messages
          --silent      same as --quiet
          --help        display this help and exit
          --version     output version information and exit
    
    
    # flash_eraseall /dev/mtd0
    flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
    Erasing 4 Kibyte @ 0 -- -1 % complete 
    Erasing 4 Kibyte @ 1000 -- -1 % complete 
    Erasing 4 Kibyte @ 2000 -- -1 % complete 
    Erasing 4 Kibyte @ 3000 -- -1 % complete 
    Erasing 4 Kibyte @ 4000 -- -1 % complete
    ...
    Erasing 4 Kibyte @ 64004ff000 -- -100 % complete 
    
    
    # flashcp /BOOT.BIN /dev/mtd0

    (完)

  • 相关阅读:
    解决no such file or directory的问题
    手把手教你如何通过企业账号in house发布程序 ----都是被苦逼的appstore审核逼的!!!!!
    java中如何使用log4j
    xStream完美转换XML、JSON
    Spring MVC 教程
    StringUtils 类的使用
    CSS 与IE浏览器兼容问题
    CSS各种颜色的符号
    TABLE 应用 CSS美化
    初学WebSocket
  • 原文地址:https://www.cnblogs.com/gaowengang/p/13685372.html
Copyright © 2011-2022 走看看