<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/index.php?action=history&amp;feed=atom&amp;title=Firmware_Acquisition%3A_U-Boot</id>
	<title>Firmware Acquisition: U-Boot - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/index.php?action=history&amp;feed=atom&amp;title=Firmware_Acquisition%3A_U-Boot"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Firmware_Acquisition:_U-Boot&amp;action=history"/>
	<updated>2026-09-09T16:52:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Firmware_Acquisition:_U-Boot&amp;diff=4732&amp;oldid=prev</id>
		<title>JPDoe: Fixed &quot;Pages with syntax highlighting errors&quot;</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Firmware_Acquisition:_U-Boot&amp;diff=4732&amp;oldid=prev"/>
		<updated>2020-11-08T16:20:22Z</updated>

		<summary type="html">&lt;p&gt;Fixed &amp;quot;Pages with syntax highlighting errors&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:20, 8 November 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; command can be used to display memory contents both as hexadecimal and ASCII data. ([http://www.denx.de/wiki/view/DULG/UBootCmdGroupMemory#Section_UBootCmdMd UBootCmdMd]) The &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; method can be used to extract the firmware via UART, by dumping the complete or a distinct memory space. In the following the [[ISmartAlarm® ISC5 SPOT IP-Camera]] will be used as example using &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to save the memory dump to a log file. In this example, &amp;lt;code&amp;gt;screen /dev/tty.usbserial-1410 115200&amp;lt;/code&amp;gt; was used to access the TTY and the &amp;lt;code&amp;gt;CTRL-a H&amp;lt;/code&amp;gt; (log) key binding has been used to start logging of the current window to the file &amp;quot;screenlog.n&amp;quot;. (See: &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;). So, after the serial line and logging is ready, the memory layout must be identified. This is possible using the &amp;lt;code&amp;gt;mtdparts&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;devinfo&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;printenv&amp;lt;/code&amp;gt; command (and more) if available or through identification of the chip and calculating the memory space based on the chip&amp;#039;s capacity. Alternaively the mtdparts may be printed in the bootlogs or can be accessed if access to a Linux shell has already been acquired via &amp;lt;code&amp;gt;/proc/mtdparts&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; command can be used to display memory contents both as hexadecimal and ASCII data. ([http://www.denx.de/wiki/view/DULG/UBootCmdGroupMemory#Section_UBootCmdMd UBootCmdMd]) The &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; method can be used to extract the firmware via UART, by dumping the complete or a distinct memory space. In the following the [[ISmartAlarm® ISC5 SPOT IP-Camera]] will be used as example using &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to save the memory dump to a log file. In this example, &amp;lt;code&amp;gt;screen /dev/tty.usbserial-1410 115200&amp;lt;/code&amp;gt; was used to access the TTY and the &amp;lt;code&amp;gt;CTRL-a H&amp;lt;/code&amp;gt; (log) key binding has been used to start logging of the current window to the file &amp;quot;screenlog.n&amp;quot;. (See: &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;). So, after the serial line and logging is ready, the memory layout must be identified. This is possible using the &amp;lt;code&amp;gt;mtdparts&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;devinfo&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;printenv&amp;lt;/code&amp;gt; command (and more) if available or through identification of the chip and calculating the memory space based on the chip&amp;#039;s capacity. Alternaively the mtdparts may be printed in the bootlogs or can be accessed if access to a Linux shell has already been acquired via &amp;lt;code&amp;gt;/proc/mtdparts&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;&quot;&amp;gt;=&amp;gt; help md&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bash&lt;/ins&gt;&quot;&amp;gt;=&amp;gt; help md&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;md - memory display&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;md - memory display&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot;&gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;&quot;&amp;gt;sonix # version&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;bash&lt;/ins&gt;&quot;&amp;gt;sonix # version&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;U-Boot 2011.09 (May 22 2015 - 16:07:40)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;U-Boot 2011.09 (May 22 2015 - 16:07:40)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;arm-linux-gcc (SONiX GCC-4.5.2 Release 2011-12-06) 4.5.2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;arm-linux-gcc (SONiX GCC-4.5.2 Release 2011-12-06) 4.5.2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-4716:rev-4732:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>JPDoe</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Firmware_Acquisition:_U-Boot&amp;diff=4716&amp;oldid=prev</id>
		<title>JPDoe: Major: Initial commit</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Firmware_Acquisition:_U-Boot&amp;diff=4716&amp;oldid=prev"/>
		<updated>2020-10-28T21:49:10Z</updated>

		<summary type="html">&lt;p&gt;Major: Initial commit&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;max-width: 970px&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;border-color: #eaecf0; background-color: white; overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight: normal;line-height:1.6;&amp;quot;&amp;gt;&amp;amp;#9432; Table of Contents&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: justify&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
This article briefly describes how the U-Boot bootloader can be used to extract the firmware from embedded devices. This method involves the use of the Universal Synchronous Asynchronous Receiver and Transmitter (USART) On-Chip Debug (OCD) Interface. This article is currently limited to &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; (memory dump) but will be extended soon. In the end, &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; is the method which is extremly slow but work in most scenarios.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Basic understanding of U-Boot and UART&lt;br /&gt;
* Taget Device using the U-Boot bootloader&lt;br /&gt;
* Serial UART line ready between Target and Analyst&lt;br /&gt;
* Access to the U-Boot command line interface &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Procedure&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #31708f; background-color: #d9edf7; color: #31708f; padding: 5px 10px; margin-bottom: 5px; text-align: justify&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;: Not all of these methods may be applicable depending on the present U-Boot version.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Memory Dump&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; command can be used to display memory contents both as hexadecimal and ASCII data. ([http://www.denx.de/wiki/view/DULG/UBootCmdGroupMemory#Section_UBootCmdMd UBootCmdMd]) The &amp;lt;code&amp;gt;md&amp;lt;/code&amp;gt; method can be used to extract the firmware via UART, by dumping the complete or a distinct memory space. In the following the [[ISmartAlarm® ISC5 SPOT IP-Camera]] will be used as example using &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; to save the memory dump to a log file. In this example, &amp;lt;code&amp;gt;screen /dev/tty.usbserial-1410 115200&amp;lt;/code&amp;gt; was used to access the TTY and the &amp;lt;code&amp;gt;CTRL-a H&amp;lt;/code&amp;gt; (log) key binding has been used to start logging of the current window to the file &amp;quot;screenlog.n&amp;quot;. (See: &amp;lt;code&amp;gt;man screen&amp;lt;/code&amp;gt;). So, after the serial line and logging is ready, the memory layout must be identified. This is possible using the &amp;lt;code&amp;gt;mtdparts&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;devinfo&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;printenv&amp;lt;/code&amp;gt; command (and more) if available or through identification of the chip and calculating the memory space based on the chip&amp;#039;s capacity. Alternaively the mtdparts may be printed in the bootlogs or can be accessed if access to a Linux shell has already been acquired via &amp;lt;code&amp;gt;/proc/mtdparts&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;=&amp;gt; help md&lt;br /&gt;
md - memory display&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
md [.b, .w, .l] address [# of objects]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;border-color: #eaecf0; background-color: white; overflow:auto; calc(100% - 12px);&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;line-height:1.6;&amp;quot;&amp;gt;&amp;amp;#9432; Example: ISmartAlarm® ISC5 SPOT IP-Camera - U-Boot commands&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;sonix # version&lt;br /&gt;
U-Boot 2011.09 (May 22 2015 - 16:07:40)&lt;br /&gt;
arm-linux-gcc (SONiX GCC-4.5.2 Release 2011-12-06) 4.5.2&lt;br /&gt;
GNU ld (GNU Binutils) 2.22&lt;br /&gt;
&lt;br /&gt;
sonix # ?&lt;br /&gt;
?       - alias for &amp;#039;help&amp;#039;&lt;br /&gt;
bdinfo  - print Board Info structure&lt;br /&gt;
boot    - boot default, i.e., run &amp;#039;bootcmd&amp;#039;&lt;br /&gt;
bootm   - boot application image from memory&lt;br /&gt;
cmp     - memory compare&lt;br /&gt;
cp      - memory copy&lt;br /&gt;
crc32   - checksum calculation&lt;br /&gt;
devinfo - devinfo&lt;br /&gt;
dump    - dump image&lt;br /&gt;
erase   - erase FLASH memory&lt;br /&gt;
eraseetc- eraseetc&lt;br /&gt;
fatinfo - print information about filesystem&lt;br /&gt;
fatload - load binary file from a dos filesystem&lt;br /&gt;
fatls   - list files in a directory (default /)&lt;br /&gt;
fatupdate- update firmware from fat32 filesystem&lt;br /&gt;
flinfo  - print FLASH memory information&lt;br /&gt;
go      - start application at address &amp;#039;addr&amp;#039;&lt;br /&gt;
help    - print command description/usage&lt;br /&gt;
hwcrc16 - hwcrc16 - hardware crc16 calculate&lt;br /&gt;
loadb   - load binary file over serial line (kermit mode) and update to flash&lt;br /&gt;
loadkernel- loadkernel&lt;br /&gt;
loady   - load binary file over serial line (ymodem mode) and update to flash&lt;br /&gt;
md      - memory display&lt;br /&gt;
mm      - memory modify (auto-incrementing address)&lt;br /&gt;
mmc     - MMC sub system&lt;br /&gt;
mmcinfo - display MMC info&lt;br /&gt;
mtest   - simple RAM read/write test&lt;br /&gt;
mw      - memory write (fill)&lt;br /&gt;
nand    - NAND sub-system&lt;br /&gt;
nm      - memory modify (constant address)&lt;br /&gt;
printenv- print environment variables&lt;br /&gt;
protect - enable or disable FLASH write protection&lt;br /&gt;
reset   - Perform RESET of the CPU&lt;br /&gt;
saveenv - save environment variables to persistent storage&lt;br /&gt;
setenv  - set environment variables&lt;br /&gt;
spi     - spi - Serial Flash sub-system&lt;br /&gt;
tftpboot- boot image via network using TFTP protocol&lt;br /&gt;
update  - update image, u-env, factory, u-logo, user, kernel, rootfs-r, rootfs-rw&lt;br /&gt;
usb     - USB sub-system&lt;br /&gt;
usbboot - boot from USB device&lt;br /&gt;
verify  - verify image, flash-info, hw-setting, flash-layout, u-boot, rescue, user, factory, kernel, rootfs-r, u-env&lt;br /&gt;
version - print monitor, compiler and linker version&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;border-color: #eaecf0; background-color: white; overflow:auto; calc(100% - 12px);&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;line-height:1.6;&amp;quot;&amp;gt;&amp;amp;#9432; Example: ISmartAlarm® ISC5 SPOT IP-Camera - Memory Layout&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Bash&amp;quot;&amp;gt;mem=64M&lt;br /&gt;
mtdparts=snx-spi:&lt;br /&gt;
768k(uboot)&lt;br /&gt;
3M(kernel)&lt;br /&gt;
7M(rootfs)&lt;br /&gt;
4M(rescue)&lt;br /&gt;
1M(etc)&lt;br /&gt;
256K(userconfig)&lt;br /&gt;
&lt;br /&gt;
loadkernel 0x00007FFC 0x0;&lt;br /&gt;
bootm 0x00008000&lt;br /&gt;
&lt;br /&gt;
0x00000000,0x00000000 (u-logo)&lt;br /&gt;
0x00000000,0x00000FFF (hw-setting)&lt;br /&gt;
0x00001000,0x0005FFFF (u-boot)&lt;br /&gt;
0x00060000,0x0007EFFF (u-env)&lt;br /&gt;
0x0007F000,0x0007FFFF (flash-layout)&lt;br /&gt;
0x00080000,0x000BFFFF (factory)&lt;br /&gt;
0x000C0000,0x003BFFFF (kernel)&lt;br /&gt;
0x003C0000,0x00ABFFFF (rootfs-r)&lt;br /&gt;
0x00AC0000,0x00EBFFFF (rescue)&lt;br /&gt;
0x00EC0000,0x00FBFFFF (rootfs-rw)&lt;br /&gt;
0x00FC0000,0x00FFFFFF (user)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example device uses an 64MB SOP8 SPI chip to store the firmware. Based on the &amp;lt;code&amp;gt;mtdparts&amp;lt;/code&amp;gt;, the memory space is &amp;lt;code&amp;gt;0x00000000-0x00FFFFFF&amp;lt;/code&amp;gt;. this may be adapted to extract only a specific MTD partition. It is even possible to extract single files, like the shadow file, if the right memory address can be identified. It took 2 hours for extracting 64MB via UART. Additionnally, the device restarted automatically after 5min. This could be solved by monitoring the status and relaunching the memory dump from the last successfully received Byte. In any case, screenlog must be santized before continuing, by removing any additional text, which is not related to the actual memory dump. The actual command for extracting the whole memory is listed below. The &amp;lt;code&amp;gt;.b&amp;lt;/code&amp;gt; output format is required for the next step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Bash&amp;quot;&amp;gt;=&amp;gt; md.b 0x0 0xFFFFFF&lt;br /&gt;
00000000: 0e 00 00 ea 80 6b d9 03 c4 6b d9 03 94 6b d9 03    .....k...k...k..&lt;br /&gt;
00000010: c8 6b d9 03 fc 5b d8 03 14 f0 9f e5 14 f0 9f e5    .k...[..........&lt;br /&gt;
00000020: 04 04 00 00 00 00 00 00 14 04 00 00 24 04 00 00    ............$...&lt;br /&gt;
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;
00000040: 00 00 0f e1 1f 00 c0 e3 d3 00 80 e3 00 f0 2f e1    ............../.&lt;br /&gt;
&lt;br /&gt;
[...]&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;border-color: #eaecf0; background-color: white; overflow:auto; calc(100% - 12px);&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;line-height:1.6;&amp;quot;&amp;gt;&amp;amp;#9432; Example: ISmartAlarm® ISC5 SPOT IP-Camera - Memory Dump Extract&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Bash&amp;quot;&amp;gt;sonix # md.b 0x0 0xFFFFFF&lt;br /&gt;
00000000: 0e 00 00 ea 80 6b d9 03 c4 6b d9 03 94 6b d9 03    .....k...k...k..&lt;br /&gt;
00000010: c8 6b d9 03 fc 5b d8 03 14 f0 9f e5 14 f0 9f e5    .k...[..........&lt;br /&gt;
00000020: 04 04 00 00 00 00 00 00 14 04 00 00 24 04 00 00    ............$...&lt;br /&gt;
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;
00000040: 00 00 0f e1 1f 00 c0 e3 d3 00 80 e3 00 f0 2f e1    ............../.&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #8a6d3b; background-color: #fcf8e3; color: #8a6d3b; padding: 5px 10px; margin-bottom: 5px; text-align: justify&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;: Check that the log does not any additional non-printable characters&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this format, each line consits of 78 characters including the newline. This results in 78 Bytes transmitted, which effectivly represent only 16 Byte of Data, leading to an 80% overhead. It is obvious, that the the memory dump format is not usuable as is. The dump must be parse to get the original binary dump. For this [&lt;br /&gt;
https://github.com/gmbnomis/uboot-mdb-dump uboot-mdb-dump] script can be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Bash&amp;quot;&amp;gt;python3 uboot_mdb_to_image.py &amp;lt; memory_dump.txt &amp;gt; memory_dump.bin&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Related&amp;lt;/h2&amp;gt;&lt;br /&gt;
* [[Firmware Acquisition Techniques]]&lt;br /&gt;
* [[JTAGulator: Find IoT-Device&amp;#039;s UART interface]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Tested Devices&amp;lt;/h2&amp;gt;&lt;br /&gt;
* [[ISmartAlarm® ISC5 SPOT IP-Camera]]&lt;br /&gt;
* ... more ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;References&amp;lt;/h2&amp;gt;&lt;br /&gt;
* http://www.denx.de/wiki/DULG/Manual (Accessed: 20. October 2020)&lt;br /&gt;
* http://www.denx.de/wiki/view/DULG/UBootCmdGroupMemory#Section_UBootCmdMd (Accessed: 20. October 2020)&lt;br /&gt;
* https://www.digi.com/resources/documentation/digidocs/PDFs/90000852.pdf (Accessed: 20. October 2020)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>JPDoe</name></author>
	</entry>
</feed>