summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-06 09:57:30 -0700
committerTom Rini <trini@konsulko.com>2021-03-02 15:53:37 -0500
commit008ae72c6946f85e9083118e750de68591f4ed12 (patch)
treeade00896e5124da993c6ffbabe57bc77c7e74db5 /doc
parent671c454368374b538fd0421d3da08ed59328099d (diff)
downloadu-boot-008ae72c6946f85e9083118e750de68591f4ed12.tar.gz
u-boot-008ae72c6946f85e9083118e750de68591f4ed12.tar.xz
u-boot-008ae72c6946f85e9083118e750de68591f4ed12.zip
doc: Add a note about producing 'md.b' output using hexdump
Comparing a hex dump on the U-Boot command line with the contents of a file on the host system is fairly easy and convenient to do manually if it is small. But the format used hexdump by default differs from that shown by U-Boot. Add a note about how to make them the same. (For large dumps, writing the data to the network with tftpput, or to a USB stick with ext4save is easiest.) Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/usage/md.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/usage/md.rst b/doc/usage/md.rst
index 3951b0d58f..4c1073ea35 100644
--- a/doc/usage/md.rst
+++ b/doc/usage/md.rst
@@ -39,6 +39,16 @@ length
number of values to dump. Defaults to 40 (0d64). Note that this is not
the same as the number of bytes, unless .b is used.
+Note that the format of 'md.b' can be emulated from linux with::
+
+ # This works but requires using sed to get the extra spaces
+ # <addr> is the address, <f> is the filename
+ xxd -o <addr> -g1 <f> |sed 's/ / /' >bad
+
+ # This uses a single tool but the offset always starts at 0
+ # <f> is the filename
+ hexdump -v -e '"%08.8_ax: " 16/1 "%02x " " "' -e '16/1 "%_p" "\n" ' <f>
+
Example
-------