几个Uboot命令
1 nand scrub
这个命令会擦除坏块信息,将坏块标识成好的,但此时这个坏块有潜在有危险,在特定条件下仍会造成数据的丢失,所以应该谨慎使用.
Run U-boot and then use the following commands to clean the NAND device.
Run the command
nand bad
to generate a list of the blocks on the device that the driver believes to be bad. Keep a copy of this list—it will be used later to remark the bad blocks manually.For each of the bad blocks on the list, run:
nand dump <block-number>
If the output of the dump command looks like "real" data, then it is safe to assume that it is a good block. If the block is all zeros (both in-band and out-of-band) then it is very likely to be a genuinely bad block. Keep a record of all the blocks that are genuinely bad.
Run
nand scrub
to erase ALL of the blocks on the NAND device. This will also set most of the bad blocks to "good".Run
nand bad
again to obtain a revised list of bad blocks. Compare this list with the list of "genuinely bad" blocks (that is, blocks containing all zeros), obtained at step 3.For each block on the "genuinely bad" list that is no longer marked as bad by
nand bad
, runnand markbad <block-number>
Simply running
nand scrub
without first identifying which blocks are genuinely bad (using nand bad
and nand markbad
commands, as described above) will silently convert soft bad blocks to false good blocks, which will cause unrecoverable problems with reading and writing data.
2 mtdparts
The mtdparts
command offers an easy to use and powerful interface to define the contents of the environment variable of the same name that can be passed as boot argument to the Linux kernel:
=> help mtdparts
mtdparts
- list partition table
mtdparts delall
- delete all partitions
mtdparts del part-id
- delete partition (e.g. part-id = nand0,1)
mtdparts add <mtd-dev> <size>[@<offset>] [<name>] [ro]
- add partition
mtdparts default
- reset partition table to defaults
大家都知道nand flahs 是有坏块的,假设有两个分区P1(block0,block1),P2(block2,block3,)假设要写一个数据(大小为2block),则会写到P1的block0,block1上.
但此时,如果block1为坏块,则数据会写至block0,block2,跳过坏块block1,但此时数据横跨两个区.
为了避免这种情况,可以使用这个命令:mtdparts.此时uboot 会进行边界检查,上例这种情况数据只会写到block0中,不会写至block2中.
几个Uboot命令的更多相关文章
- 1.ok6410移植bootloader,移植u-boot,学习u-boot命令
ok6410移植u-boot 既然是移植u-boot当然首先需要u-boot源码,这里的u-boot代码是由国嵌提供的. 一.配置编译u-boot A. 解压 u-boot 压缩文件 B. 进入解压生 ...
- U-Boot命令大全(功能参数及用法)
U-Boot上电启动后,按任意键可以退出自动启动状态,进入命令行. U-Boot 2010.03 (Sep 25 2011 - 16:18:50) DRAM: 64 MB Flash: ...
- uboot命令分析+实现【转】
转自:http://xouou.iteye.com/blog/2150061 先贴一个重要结构,位于uboot/include/command.h,这个结构代表每个uboot命令 struct cmd ...
- 编译u-boot命令和u-boot常用命令
一.编译u-boot命令 1.配置开发板 #make TQ2440_config 2.编译 #make all 3.交叉编译器是crosstools_3.4.5_softfloat” 使用4.3.3版 ...
- bootargs中的环境变量说明和一些常用的uboot命令
bootargs中的环境变量说明和一些常用的uboot命令 一些常见的uboot命令:Help [command]在屏幕上打印命令的说明Boom [addr]启动在内存储器的内核Tftpboot通过t ...
- Uboot mmc命令解析&NAND flash uboot命令详解
转载:http://blog.csdn.net/simonjay2007/article/details/43198353 一:mmc的命令如下: 1:对mmc读操作 mmc read addr bl ...
- securecrt中进入uboot命令行时,出现无法键入任何指令的问题解决方法
securecrt中进入uboot命令行时,出现无法键入任何指令的问题解决方法 可能出现以下几种情况 1.securecrt在创建连接时,忘记取消勾选流控: 2.usb转串口线坏了3.uboot有问题 ...
- uboot命令(1):mmc命令
版权声明 更新:2017-06-07博主:LuckyAlan联系:liuwenvip163@163.com声明:吃水不忘挖井人,转载请注明出处! 1 文章介绍 今天在进行Android分区修改的时候发 ...
- Uboot命令U_BOOT_CMD分析
其中U_BOOT_CMD命令格式如下: U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help") 各 ...
- Uboot 命令行 介绍
背景 基本上,本文转载自:<ARM板移植Linux系统启动(五)Uboot命令行> 上次说到uboot的启动方式,最后会使用autoboot(自主模式)尝试引导kernel,如果失败或者被 ...
随机推荐
- 开启MYSQL远程连接权限
开启MYSQL远程连接权限 1 2 3 4 5 //建议设置固定IP mysql> GRANT ALL PRIVILEGES ON *.* TO root@"8.8.8.8&q ...
- Qt 学习之路 :使用 QJson 处理 JSON
XML 曾经是各种应用的配置和传输的首选方式.但是现在 XML 遇到了一个强劲的对手:JSON.我们可以在 这里 看到有关 JSON 的语法.总体来说,JSON 的数据比 XML 更紧凑,在传输效率上 ...
- 好用的log
Log.getStackTraceString(new Throwable())
- GitHub Desktop安装异常解决
为了更好的共同学习,共同进步,哥们推荐我使用GitHub记录自己每天的学习记录,当下很火的提供一个分布式的版本控制系统(Git)服务的网站,GitHub提供GitHub Desktop桌面程序方便协同 ...
- 解决win service 2003 IIS发布Gis网站后,访问地图服务出错,无法正常打开而且 事件查看器出现错误提示。
错误详情: 应用程序-特定 权限设置未将 COM 服务器应用程序(CLSID 为{379376DB-AEA6-40D1-9491-9345E61EF6BE})的 本地 激活 权限授予用户 NT AUT ...
- document.documentElement.style判断浏览器是否支持Css3属性
1.document.documentElement.style 属性定义了当前浏览器支持的所有Css属性 包括带前缀的和不带前缀的 例如:animation,webkitAnimation,msAn ...
- 转-SecureCRT设置
原帖地址:http://www.2cto.com/os/201410/341569.html 一.基本设置 1.修改设置 为了SecureCRT用起来更方便,需要做一些设置,需要修改的有如下几处: 1 ...
- Visual Studio 2013 在使用 MVC5 无智能提示
关于 Visual Studio 2013 在使用 MVC5 无智能提示的问题,类库无法正常识别,连最基本的关键字提示都没有了,类变色也没有了,所有的关键字代码,类名,方法成员名都要全部手动敲 原因: ...
- JDK与Tomcat的联系
如果服务器没有安装JDK或没有配置JDK环境变量,则Tomcat启动出错 报错:需要JAVA_HOME 或JRE_HOME环境变量 所以必须首先安装JDK 配置环境变量 web服务器Tomcat才能运 ...
- MySql数据库3【优化1】表的优化
一.表结构的优化 1.标准化 标准化是在数据库中组织数据的过程.其中包括,根据设计规则创建表并在这些表间建立关系:通过取消冗余度与不一致相关性,该设计规则可以同时保护数据并提高数据的灵活性.通常数据 ...