U-Boot操作Flash (NOR, NAND & SPI)

U-Boot中操作三种flash的命令集:
                 Action                                          NOR                                              NAND                                           SPI
Copy Flash to RAM                                  cp.[bwl]                                       nand read                                 eeprom read

Write to Flash from RAM                        cp.[bwl]                                        nand write                                 eeprom write

Dump Flash                                             md.[bwl]                                      nand dump                               eeprom read

Ease Flash                                                erase                                         nand erase                                        n/a

Write Protection                                    protect on                                      nand lock

                                                                 protect off                                      nand unlock                                      n/a


Additional  Info                                          flinfo                                           nand info

                                                                    imls                                            nand bad                                         n/a

 

U-Boot中查看命令帮助:
MB680> help cp   
MB680> help nand   
MB680> help eeprom 

nor烧写命令:
MB680> nfs $load_addr /export/u-boot.bin   
MB680> protect off 1:0-4   
MB680> erase 1:0-4   
MB680> cp.b $load_addr A0000000 $filesize   
MB680> protect on 1:0-4  
nor烧写内置命令: 
MB680> nfs $load_addr /export/u-boot.bin   
MB680> run unprot   
MB680> run update 

nand烧写命令:
MB680> nfs $load_addr /export/u-boot.bin   
MB680> nand erase 0 40000   
MB680> nand write $load_addr 0 40000  
U-Boot启动内核的时候使用的命令是nand read.i c0008000 80000 500000;bootm c0008000


在nand中0x80000处开始的5M的数据拷到sdram0xc0008000处,从这个地址开始执行。

spi烧写命令:
MB680> nfs $load_addr /export/u-boot.bin   
MB680> eeprom write $load_addr 0 $filesize  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值