1. 查看Flash分区情况:
  2.  
  3. root@DD-WRT:~# cat /proc/mtd
  4. dev: size erasesize name
  5. mtd0: "RedBoot"
  6. mtd1: 007c0000 "linux"
  7. mtd2: "rootfs"
  8. mtd3: "ddwrt"
  9. mtd4: "nvram"
  10. mtd5: "board_config"
  11. mtd6: "fullflash"
  12. mtd7: "fullboot"
  13. root@DD-WRT:~#
  14.  
  15. dd备份分区(如果有fullash分区)
  16.  
  17. root@DD-WRT:~# dd if=/dev/mtd6 of=/tmp/741_fullflash.bin
  18. + records in
  19. + records out
  20. root@DD-WRT:~#
  21.  
  22. 刷成编程器固件命令(前提是有fullash分区)
  23.  
  24. root@DD-WRT:~# mtd -r write fullflash /tmp/741_fullflash.bin
  25. + records in
  26. + records out
  27. root@DD-WRT:~#
  28.  
  29. 编程openwrt固件时修改mach-tl-mr3x20.c(对应3420)增加一个fullash
  30.  
  31. }, {
  32. .name = "fullflash",
  33. .offset = ,
  34. .size = 0x800000,
  35.  
  36. .mask_flags = MTD_WRITEABLE,
  37.  
  38. }
  39.  
  40. .size = 0x800000, 这个是flash大小8M
  41.  
  42. 去掉 .mask_flags = MTD_WRITEABLE,是分区可以写,否者只可读
  43.  
  44. MTD subsystem has the following interfaces.
  45.  
  46. MTD character devices - usually referred to as /dev/mtd0, /dev/mtd1, and so on. These character devices provide I/O access to the raw flash. They support a number of ioctl calls for erasing eraseblocks, marking them as bad or checking if an eraseblock is bad, getting information about MTD devices, etc.
  47. The sysfs interface is relatively newer and it provides full information about each MTD device in the system. This interface is easily extensible and developers are encouraged to use the sysfs interface instead of older ioctl or /proc/mtd interfaces, when possible. The sysfs interface for the mtd subsystem is documentated in the kernel, and currently can be found at Documentation/ABI/testing/sysfs-class-mtd.
  48. The /proc/mtd proc file system file provides general MTD information. This is a legacy interface and the sysfs interface provides more information.

mtd零星记录的更多相关文章

  1. Redmine开发帮助

    这里先零星记录二次开发用得上的知识点: 1.windows下开发环境,参考此文.最好使用rubyinstaller安装,注意选择版本.或者直接安装railsinstaller. 2.获取自定义内容,参 ...

  2. django 架构点点滴滴

    前言: 零星发现一些,零星记录一些,因此可能整体比较混乱,因为显然不是一气呵成写的. 关于CBV(Class Based View): 首先吐槽下,cbv的整体继承结构,可真的不是很优美,可以查看这里 ...

  3. 嵌入式 uboot以及kernel添加看门狗临时记录(个人记录未整理乱)

    Uboot_Kernerl_Add_Watch_Dog: U-Boot 2010.06 (Nov 01 2013 - 15:28:44) DRAM:  128 MiBCheck spi flash c ...

  4. 【记录】让人淡疼的BUG之参数传送错误

    前言 面试的时候往往容易被面试官问到:“说说你遇到过的比较重大或经典的Bug有哪些,能说一说吗?”我被问时脑海的反应是:“尼玛,这个我从来没有刻意记!一时半会咋想得起来,然后还是没想起来或者是随意给了 ...

  5. Git学习记录--git仓库

    Git是一款强大的版本控制工具,与svn相比git的分布式提交,本地仓库等在使用时确实比较方便.当然两者之间各有优劣,我在这里不多做比较.由于之前少有接触git,只是零星大致地了解一点,所以找时间系统 ...

  6. Newifi2(D1) 刷入pb-boot和breed的记录

    今天要给一个newifi d1刷系统时发现居然还是原厂的uboot, 使用uboot刷入rom时会进行校验拦截第三方的rom. 之前有刷过这个设备的, 但是已经完全记不清怎么处理的了. 查了一下, 这 ...

  7. UBIFS介绍 - MTD网站

    转:http://blog.csdn.net/kickxxx/article/details/6583463 目录(?)[-] Big red note Overview Scalabity Writ ...

  8. ubifs & mtd

    前天晚上在写完另一篇总结之时,赵XX向我咨询了关于mtd 和ubifs的相关内容.而我在这方面只是略懂皮毛,所以向他许愿共同调查这个方面的知识.经过昨天一天的调查,最后感觉是有了一定的经验和基础了,所 ...

  9. USACO Training刷题记录 By cellur925

    Section 1.1 Your Ride Is Here 貌似没啥可说 Greedy Gift Givers 上来就想stl map映射,有两个坑:如果送给别人的人数为0,那么需要特判一下,防止整数 ...

随机推荐

  1. Effective java 第2版 - 笔记(01) 单例(Singleton)的枚举(enum)实现

    直接上代码: public enum Boss { INSTANCE; private String name; public void doSomeThing() { System.out.prin ...

  2. 利用mybatis-generator自动生成代码

    mybatis-generator有三种用法:命令行.eclipse插件.maven插件.个人觉得maven插件最方便,可以在eclipse/intellij idea等ide上可以通用. 下面是从官 ...

  3. VMware-Transport(VMDB) error -44:Message.The VMware Authorization Service is not running解决方案

    出现的错误如下: 原因:本机中有一个VMware服务未开启导致的. 解决方案: 1.打开“运行”->输入services.msc !!!文章转自浩瀚先森博客,转载请注明,谢谢.http://ww ...

  4. Jenkins进阶系列之——17Jenkins升级、迁移和备份

    升级Jenkins Jenkins的开发迭代非常快,每周发布一个开发版本,长期支持版每半年更新一次(ps:大版本更新).如此频繁的更新,怎么升级呢? war:下载新版的war文件,替换旧版本war文件 ...

  5. DTCMS插件的制作实例电子资源管理(二)Admin后台页面编写

    总目录 插件目录结构(一) Admin后台页面编写(二) 前台模板页编写(三) URL重写(四) 本实例旨在以一个实际的项目中的例子来介绍如何在dtcms中制作插件,本系列文章非入门教程,部分逻辑实现 ...

  6. 高仿Windows Phone QQ登录界面

    给 TextBox文本框前添加图片 扩展PhoneTextBox:添加一个类"ExtentPhoneTextBox"继承 PhoneTextBox ,在"ExtentPh ...

  7. sqlserver查询所有表名、字段名、类型、长度和存储过程、视图的创建语句

    -- 获得存储过程创建语句 select o.xtype,o.name,cm.text from syscomments cm inner join sysobjects o on o.id=cm.i ...

  8. android之自定义广播

    布局文件 点击按钮发送广播 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmln ...

  9. python 之禅

    想要真正深入了解一门语言,需要用心去感受.下面是python之禅,python的设计哲学,对于编程很有指导意义.(翻译部分摘自网络,同时自己有一些更改) >>> import thi ...

  10. 46-df 显示磁盘空间的使用情况

    显示磁盘空间的使用情况 df [options] [filesystem-list] 参数 当不带任何参数调用df时,用户将获得本地系统上每个挂载设备的空闲空间 filesystem-list是一个或 ...