uboot中操作三种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 ; md.[bwl] |
Ease Flash | erase | nand erase | n/a |
Write Protection | protect on protect off | nand lock nand unlock | n/a |
Additional Info | flinfo imls | nand info nand bad | n/a |
uboot中查看命令帮助:
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
uboot启动内核的时候使用的命令是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