User manual

Linux Guide taskit GmbH
setenv - set environment variables
tftpboot - boot image via network using TFTP protocol
version - print monitor version
11.6.1. Read and write memory and flash memory
cmp - memory compare
cmp [.l, .w, .b] Addr1 Addr2 count
You can check the contents of two memory ranges with cmp. You can use extensions to
determine the size of the memory access: cmp.l -> 32-bit long word (default), .w ->16-bit
word or .b -> 8-bit byte. The comparison runs until the number of units indicated by count
have been compared, or until the first difference is found. The size of the memory
compared is calculated by count * (l,w,b)
For example:
A comparison of the U-Boot image in flash with an identical image in the SDRAM. The
image in SDRAM is manipulated with an offset of 6 and compared anew:
U-Boot> cmp.w 10000000 20000000 100
Total of 256 halfwords were the same
U-Boot> mm.w 20000006
20000006: e59f ? aabb
20000008: f014 ? .
U-Boot> cmp.w 10000000 20000000 100
halfword at 0x10000006 (0xe59f) != halfword at 0x20000006 (0xaabb)
Total of 3 halfwords were the same
cp - memory copy
cp [.b, .w, .l] source target count
Copies count bytes (.b) or words (.w) from source to target
For example:
Copying the U-Boot image from address 20000000 to address 21000000 of SDRAM:
U-Boot> cp.b 20000000 21000000 171a4
md - memory display
md [.b, .w, .l] address [count]
Displays count bytes (words) starting at address in hexadecimal, with an ASCII
interpretation.
For example:
U-Boot> md.w 10000000 20
10000000: 0012 ea00 f014 e59f f014 e59f f014 e59f ................
10000010: f014 e59f f014 e59f f014 e59f f014 e59f ................
10000020: 0140 21f0 01a0 21f0 0200 21f0 0260 21f0 @..!...!...!`..!
Page 53 of 65 Version 1.26 (2008-04-30)