User manual

U-Boot for MPL SBC
User Manual
2003 by MPL AG
18
MEH-10082-002 Rev. D
High-Tech • Made in Switzerland
3.3.28 mw - memory write (fill)
The memory write command is used to fill a memory area with a pattern. Depending on the modifier, the pattern size is a
byte (8 Bit), word (16 Bit) or a long (32 Bit). Note that the count parameter has also the base of the modifier.
Abbreviation: mw
=> help mw
mw [.b, .w, .l] address value [count]
- write memory
=>
Example:
=> md.b 400000 10
00400000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
=> mw.b 400000 12 10
=> md.b 400000 10
00400000: 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 ................
=> mw.w 400000 3456 8
=> md.w 400000 8
00400000: 3456 3456 3456 3456 3456 3456 3456 3456 4V4V4V4V4V4V4V4V
=> mw.l 400000 7890abcd 4
=> md.l 400000 4
00400000: 7890abcd 7890abcd 7890abcd 7890abcd x...x...x...x...
=>
3.3.29 nand - NAND sub-system
The NAND sub-system is used to handle with the NAND flash.
Abbreviation:
na
=> help na
nand info - show available NAND devices
nand device [dev] - show or set current device
nand read[.jffs2] addr off size
nand write[.jffs2] addr off size - read/write `size' bytes starting
at offset `off' to/from memory address `addr'
nand erase [clean] [off size] - erase `size' bytes from
offset `off' (entire device if not specified)
nand bad - show bad blocks
nand read.oob addr off size - read out-of-band data
nand write.oob addr off size - read out-of-band data
=>
nand info shows the information of the connected NAND flash:
=> nand info
Device 0: Samsung KM29U64000 (ECE6) at 0x4e000000 ( 8 MB, 8 kB sector)
=>
nand erase erases a part or the entire NAND flash:
=> nand erase 0 100000
NAND erase: device 0 offset 0, size 1048576 ... OK
=>
nand write.jffs2 writes the specified memory contents to the NAND flash.
The .jffs2 modifier makes sure that the bad blocks are not used. If you use this command without the .jffs2
modifier, portions of the image may be lost (written in bad blocks).
=> nand write.jffs2 33000000 0 $filesize
NAND write: device 0 offset 0, size 778465 ... 778465 bytes write: OK
=>
Images written with this command are used in conjunction with the nboot command, see following chapter.