<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dh-electronics.com/index.php?action=history&amp;feed=atom&amp;title=U-Boot_recovery_for_STM32MP1_DHSOM</id>
	<title>U-Boot recovery for STM32MP1 DHSOM - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dh-electronics.com/index.php?action=history&amp;feed=atom&amp;title=U-Boot_recovery_for_STM32MP1_DHSOM"/>
	<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_STM32MP1_DHSOM&amp;action=history"/>
	<updated>2026-04-27T21:35:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_STM32MP1_DHSOM&amp;diff=3817&amp;oldid=prev</id>
		<title>Ageisreiter: /* Boot from SD card */</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_STM32MP1_DHSOM&amp;diff=3817&amp;oldid=prev"/>
		<updated>2023-01-26T14:53:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Boot from SD card&lt;/span&gt;&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:53, 26 January 2023&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-l328&quot;&gt;Line 328:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 328:&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;&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;# Hold the button for SD card boot mode on the SODIMM-200 module (DHCOM) below the eMMC chip.&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;# Hold the button for SD card boot mode on the SODIMM-200 module (DHCOM) below the eMMC chip.&lt;/div&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;#:[[File:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;DHCOR_i.MX6ULL_SDP&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Boot&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;jpg&lt;/del&gt;|400px]]&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;#:[[File:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;STM32MP1-boot&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;button&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;png&lt;/ins&gt;|400px]]&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;# Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&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;# Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&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;# Release the button for SD card boot mode&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;# Release the button for SD card boot mode&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ageisreiter</name></author>
	</entry>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_STM32MP1_DHSOM&amp;diff=3675&amp;oldid=prev</id>
		<title>Jneuhauser: Created page with &quot;To recover a corrupted U-Boot on a STM32MP1-based DHCOM, we can use the default fallback boot source DFU via serial link or USB or the SD card boot mode to temporarily boot U-...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_STM32MP1_DHSOM&amp;diff=3675&amp;oldid=prev"/>
		<updated>2022-04-14T09:51:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;To recover a corrupted U-Boot on a STM32MP1-based DHCOM, we can use the default fallback boot source DFU via serial link or USB or the SD card boot mode to temporarily boot U-...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;To recover a corrupted U-Boot on a STM32MP1-based DHCOM, we can use the default fallback boot source DFU via serial link or USB or the SD card boot mode to temporarily boot U-Boot SPL and U-Boot.&lt;br /&gt;
From this U-Boot shell we can write both bootloader images from the SD card to the boot flash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toclimit-3&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
=== Software ===&lt;br /&gt;
* Linux host computer ([[Virtual Machine for Application Development]] is used in this guide)&lt;br /&gt;
* [https://source.denx.de/u-boot/u-boot/-/tree/v2022.04 U-Boot 2022.04] for your board (download and build instructions below)&lt;br /&gt;
* [https://packages.debian.org/stable/dfu-util dfu-util] (for DFU boot mode)&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
* STM32MP1 based DHCOM&lt;br /&gt;
* DHCOM Premium Developer Kit Baseboard (or Baseboards with OTG ports)&lt;br /&gt;
* USB cable for OTG port (Mini USB for PDK2, USB-C for PDK3) (for DFU boot mode)&lt;br /&gt;
* SD card (for SD card boot mode)&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== Install dfu-util (debian) ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
apt-get install dfu-util&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download/Build U-Boot SPL and U-Boot binaries ===&lt;br /&gt;
&lt;br /&gt;
==== Download prebuilt binaries ====&lt;br /&gt;
&lt;br /&gt;
[[media:AACQ30W-7l-Zi_Zutu0Zv-Zua|Dropbox: U-Boot_recovery_for_STM32MP1_DHSOM_via_DFU]] ([https://source.denx.de/u-boot/u-boot/-/tree/v2022.04 source])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
curl -LsS https://www.dropbox.com/sh/os9so01tivajkxs/AACQ30W-7l-Zi_Zutu0Zv-Zua &amp;gt; recovery_binaryies.zip&lt;br /&gt;
unzip recovery_binaryies.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
Archive:  recovery_binaryies.zip&lt;br /&gt;
warning:  stripped absolute path spec from /&lt;br /&gt;
mapname:  conversion of  failed&lt;br /&gt;
   creating: U-Boot_v2022.04_mainline/&lt;br /&gt;
   creating: U-Boot_v2022.04_mainline/av96/&lt;br /&gt;
   creating: U-Boot_v2022.04_mainline/pdk2/&lt;br /&gt;
   creating: U-Boot_v2022.04_mainline/drc02/&lt;br /&gt;
   creating: U-Boot_v2022.04_mainline/picoitx/&lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/av96/u-boot.itb  &lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/pdk2/u-boot.itb  &lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/drc02/u-boot.itb  &lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/picoitx/u-boot.itb  &lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/av96/u-boot-spl.stm32  &lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/pdk2/u-boot-spl.stm32  &lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/drc02/u-boot-spl.stm32  &lt;br /&gt;
 extracting: U-Boot_v2022.04_mainline/picoitx/u-boot-spl.stm32  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Build binaries from source ====&lt;br /&gt;
&lt;br /&gt;
Clone U-Boot mainline source code for release v2022.04:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
UBOOT_SRC=/work/dev/u-boot_v2022.04&lt;br /&gt;
mkdir -p $UBOOT_SRC&lt;br /&gt;
git clone --branch v2022.04 --depth 1 https://source.denx.de/u-boot/u-boot.git $UBOOT_SRC&lt;br /&gt;
cd $UBOOT_SRC&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Available U-Boot defconfigs for STM32MP1 based DHSOM devices with default device tree in bold:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;stm32mp15_dhcom_basic_defconfig&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;pdk2&amp;#039;&amp;#039;&amp;#039;, picoitx, drc02)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;stm32mp15_dhcor_basic_defconfig&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;avenger96&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /work/dev/u-boot&lt;br /&gt;
git clone https://source.denx.de/u-boot/u-boot.git -b v2022.04 /work/dev/u-boot&lt;br /&gt;
cd /work/dev/u-boot&lt;br /&gt;
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make stm32mp15_dhcom_basic_defconfig&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change default device tree (Example for: stm32mp15xx-dhcom-picoitx):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sed -iE &amp;#039;s/(stm32mp15xx-dhcom-pdk2|stm32mp157a-dhcor-avenger96)/stm32mp15xx-dhcom-picoitx/&amp;#039; .config&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build linux binaries with all available cores:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j$(nproc)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
SHIPPED dts/dt.dtb&lt;br /&gt;
CAT     u-boot-dtb.bin&lt;br /&gt;
MKIMAGE u-boot.img&lt;br /&gt;
COPY    u-boot.dtb&lt;br /&gt;
MKIMAGE u-boot-dtb.img&lt;br /&gt;
MKIMAGE u-boot.itb&lt;br /&gt;
...&lt;br /&gt;
LD      spl/u-boot-spl&lt;br /&gt;
OBJCOPY spl/u-boot-spl-nodtb.bin&lt;br /&gt;
SYM     spl/u-boot-spl.sym&lt;br /&gt;
CAT     spl/u-boot-spl-dtb.bin&lt;br /&gt;
COPY    spl/u-boot-spl.bin&lt;br /&gt;
BINMAN  all&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the required binaries have been created and are of the appropriate size:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
ls -l u-boot.itb u-boot-spl.stm32&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
-rw-r--r-- 1 devel devel 819720 Apr 11 17:03 u-boot.itb&lt;br /&gt;
-rw-r--r-- 1 devel devel 124288 Apr 11 17:03 u-boot-spl.stm32&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot booting via DFU ==&lt;br /&gt;
&lt;br /&gt;
To boot U-Boot SPL and U-Boot via DFU boot mode, you must first check if you have a DFU device connected, then load U-Boot SPL into the SRAM of your STM32MP1 and wait until the DRAM is initialized.&lt;br /&gt;
Then load U-Boot in the DRAM of your STM32MP1 and continue the boot process using the shown key combination.&lt;br /&gt;
&lt;br /&gt;
=== Check for available DFU device ===&lt;br /&gt;
&lt;br /&gt;
(Re-)Connect the USB cable with your host computer and the OTG port of your baseboard and check the kernel log for a available DFU device:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo dmesg&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot; highlight=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
usb 2-2: New USB device found, idVendor=0483, idProduct=df11, bcdDevice= 2.00&lt;br /&gt;
usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3&lt;br /&gt;
usb 2-2: Product: DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000&lt;br /&gt;
usb 2-2: Manufacturer: STMicroelectronics&lt;br /&gt;
usb 2-2: SerialNumber: 0040001D3130510439373430&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download of U-Boot SPL with &amp;lt;code&amp;gt;dfu-util&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Download of U-Boot SPL with dfu-util to connected device:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
dfu-util -a 1 -D u-boot-spl.stm32&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
dfu-util 0.9&lt;br /&gt;
&lt;br /&gt;
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.&lt;br /&gt;
Copyright 2010-2016 Tormod Volden and Stefan Schmidt&lt;br /&gt;
This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/&lt;br /&gt;
&lt;br /&gt;
dfu-util: Invalid DFU suffix signature&lt;br /&gt;
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!&lt;br /&gt;
Opening DFU capable USB device...&lt;br /&gt;
ID 0483:df11&lt;br /&gt;
Run-time device DFU version 0110&lt;br /&gt;
Claiming USB DFU Interface...&lt;br /&gt;
Setting Alternate Setting #1 ...&lt;br /&gt;
Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
dfuIDLE, continuing&lt;br /&gt;
DFU mode device DFU version 0110&lt;br /&gt;
Device returned transfer size 1024&lt;br /&gt;
Copying data from PC to DFU device&lt;br /&gt;
Download	[=========================] 100%       160911 bytes&lt;br /&gt;
Download done.&lt;br /&gt;
state(7) = dfuMANIFEST, status(0) = No error condition is present&lt;br /&gt;
state(2) = dfuIDLE, status(0) = No error condition is present&lt;br /&gt;
Done!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output of the serial console:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
U-Boot SPL 2022.04 (Apr 05 2022 - 08:27:30 +0200)&lt;br /&gt;
Model: STMicroelectronics STM32MP15xx DHCOM Premium Developer Kit (2)&lt;br /&gt;
Code:  SoM:rev=1,ddr3=3 Board:rev=0&lt;br /&gt;
RAM: DDR3L 32bits 2x4Gb 533MHz&lt;br /&gt;
Trying to boot from DFU&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download of U-Boot with &amp;lt;code&amp;gt;dfu-util&amp;lt;/code&amp;gt; === &lt;br /&gt;
&lt;br /&gt;
Download of U-Boot with dfu-util to connected device:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D u-boot.itb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
dfu-util 0.9&lt;br /&gt;
&lt;br /&gt;
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.&lt;br /&gt;
Copyright 2010-2016 Tormod Volden and Stefan Schmidt&lt;br /&gt;
This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/&lt;br /&gt;
&lt;br /&gt;
dfu-util: Invalid DFU suffix signature&lt;br /&gt;
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!&lt;br /&gt;
Opening DFU capable USB device...&lt;br /&gt;
ID 0483:df11&lt;br /&gt;
Run-time device DFU version 0110&lt;br /&gt;
Claiming USB DFU Interface...&lt;br /&gt;
Setting Alternate Setting #0 ...&lt;br /&gt;
Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
dfuIDLE, continuing&lt;br /&gt;
DFU mode device DFU version 0110&lt;br /&gt;
Device returned transfer size 4096&lt;br /&gt;
Copying data from PC to DFU device&lt;br /&gt;
Download	[=========================] 100%       819232 bytes&lt;br /&gt;
Download done.&lt;br /&gt;
state(7) = dfuMANIFEST, status(0) = No error condition is present&lt;br /&gt;
state(2) = dfuIDLE, status(0) = No error condition is present&lt;br /&gt;
Done!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output of the serial console:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
#DOWNLOAD ... OK&lt;br /&gt;
Ctrl+C to exit ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output of the serial console after pressing &amp;#039;&amp;#039;&amp;#039;Ctrl+C&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
U-Boot 2022.04 (Apr 05 2022 - 08:27:30 +0200)&lt;br /&gt;
&lt;br /&gt;
CPU: STM32MP157CAA Rev.Z&lt;br /&gt;
Model: STMicroelectronics STM32MP15xx DHCOM Premium Developer Kit (2)&lt;br /&gt;
Board: stm32mp1 in basic mode (dh,stm32mp15xx-dhcom-pdk2)&lt;br /&gt;
DRAM:  1 GiB&lt;br /&gt;
Clocks:&lt;br /&gt;
- MPU : 650 MHz&lt;br /&gt;
- MCU : 208.878 MHz&lt;br /&gt;
- AXI : 266.500 MHz&lt;br /&gt;
- PER : 24 MHz&lt;br /&gt;
- DDR : 533 MHz&lt;br /&gt;
Core:  255 devices, 31 uclasses, devicetree: separate&lt;br /&gt;
MMC:   STM32 SD/MMC: 2, STM32 SD/MMC: 0, STM32 SD/MMC: 1&lt;br /&gt;
Loading Environment from SPIFlash... SF: Detected w25q16cl with page size 256 Bytes, erase size 4 KiB, total 2 MiB&lt;br /&gt;
OK&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Net:   eth0: ethernet@5800a000, eth1: ks8851mll@64000000&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot booting via SD card ==&lt;br /&gt;
&lt;br /&gt;
Set the disk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
STM32_DISK=/dev/sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Partition a SD card ===&lt;br /&gt;
&lt;br /&gt;
Create partition table and partitions:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
parted --script -- ${STM32_DISK} \&lt;br /&gt;
  mktable gpt \&lt;br /&gt;
  mkpart fsbl1 1MiB 1.25MiB \&lt;br /&gt;
  mkpart fsbl2 2MiB 2.25MiB \&lt;br /&gt;
  mkpart ssbl 3MiB 5MiB \&lt;br /&gt;
  mkpart rootfs ext4 5MiB 100% \&lt;br /&gt;
  set 4 legacy_boot on \&lt;br /&gt;
  unit MiB \&lt;br /&gt;
  print&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
Model: Generic STORAGE DEVICE (scsi)&lt;br /&gt;
Disk /dev/sdc: 954MiB&lt;br /&gt;
Sector size (logical/physical): 512B/512B&lt;br /&gt;
Partition Table: gpt&lt;br /&gt;
Disk Flags: &lt;br /&gt;
&lt;br /&gt;
Number  Start    End      Size     File system  Name    Flags&lt;br /&gt;
 1      1.00MiB  1.25MiB  0.25MiB               fsbl1&lt;br /&gt;
 2      2.00MiB  2.25MiB  0.25MiB               fsbl2&lt;br /&gt;
 3      3.00MiB  5.00MiB  2.00MiB               ssbl&lt;br /&gt;
 4      5.00MiB  953MiB   948MiB   ext4         rootfs  legacy_boot&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Redetect partitions:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
partprobe ${STM32_DISK}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create file system on partition 4 ===&lt;br /&gt;
&lt;br /&gt;
Create filesystem on partition 4:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
mkfs.ext4 -m 0 -L rootfs ${STM32_DISK}4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
mke2fs 1.46.2 (28-Feb-2021)&lt;br /&gt;
Creating filesystem with 242688 4k blocks and 60672 inodes&lt;br /&gt;
Filesystem UUID: bda8eff7-aa5a-4ed8-aa53-f22e3a1e3203&lt;br /&gt;
Superblock backups stored on blocks: &lt;br /&gt;
	32768, 98304, 163840, 229376&lt;br /&gt;
&lt;br /&gt;
Allocating group tables: done                            &lt;br /&gt;
Writing inode tables: done                            &lt;br /&gt;
Creating journal (4096 blocks): done&lt;br /&gt;
Writing superblocks and filesystem accounting information: done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Write U-Boot SPL and U-Boot to the SD card ===&lt;br /&gt;
&lt;br /&gt;
Write u-boot spl and u-boot to boot partitions 1, 2 and 3:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
dd if=u-boot-spl.stm32 of=${STM32_DISK}1&lt;br /&gt;
dd if=u-boot-spl.stm32 of=${STM32_DISK}2&lt;br /&gt;
dd if=u-boot.itb of=${STM32_DISK}3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
314+1 records in&lt;br /&gt;
314+1 records out&lt;br /&gt;
160911 bytes (161 kB, 157 KiB) copied, 0.274919 s, 585 kB/s&lt;br /&gt;
314+1 records in&lt;br /&gt;
314+1 records out&lt;br /&gt;
160911 bytes (161 kB, 157 KiB) copied, 0.280309 s, 574 kB/s&lt;br /&gt;
1600+1 records in&lt;br /&gt;
1600+1 records out&lt;br /&gt;
819232 bytes (819 kB, 800 KiB) copied, 0.862246 s, 950 kB/s&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy u-boot spl and u-boot to directory &amp;lt;code&amp;gt;boot&amp;lt;/code&amp;gt; on rootfs partition 4:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p rootfs&lt;br /&gt;
mount ${STM32_DISK}4 rootfs&lt;br /&gt;
mkdir -p rootfs/boot&lt;br /&gt;
cp u-boot-spl.stm32 u-boot.itb rootfs/boot/&lt;br /&gt;
umount rootfs &amp;amp;&amp;amp; rmdir rootfs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Boot from SD card ===&lt;br /&gt;
&lt;br /&gt;
# Hold the button for SD card boot mode on the SODIMM-200 module (DHCOM) below the eMMC chip.&lt;br /&gt;
#:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
# Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
# Release the button for SD card boot mode&lt;br /&gt;
&lt;br /&gt;
== U-Boot flashing via SD card ==&lt;br /&gt;
&lt;br /&gt;
=== Write U-Boot SPL and U-Boot to the SD card ===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions in [[#U-Boot booting via SD card|U-Boot booting via SD card]] to prepare an SD card with a file system on partition 4 that contains the required &amp;lt;code&amp;gt;u-boot-spl.stm32&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;u-boot.itb&amp;lt;/code&amp;gt; binaries.&lt;br /&gt;
&lt;br /&gt;
=== Write U-Boot SPL and U-Boot to SPI-NOR-Flash ===&lt;br /&gt;
&lt;br /&gt;
# Start U-Boot by [[#U-Boot booting via DFU|U-Boot booting via DFU]] or by [[#Boot from SD card|Boot from SD card]]&lt;br /&gt;
# Attach prepared SD card to the on module SD card slot&lt;br /&gt;
# Program U-Boot SPL and U-Boot by the script &amp;lt;code&amp;gt;update_sf&amp;lt;/code&amp;gt; stored in the U-Boot environment.&lt;br /&gt;
#:&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
STM32MP&amp;gt; run update_sf&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#:&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
160911 bytes read in 80 ms (1.9 MiB/s)&lt;br /&gt;
819232 bytes read in 115 ms (6.8 MiB/s)&lt;br /&gt;
SF: Detected w25q16cl with page size 256 Bytes, erase size 4 KiB, total 2 MiB&lt;br /&gt;
SF: 2097152 bytes @ 0x0 Erased: OK&lt;br /&gt;
device 0 offset 0x0, size 0x2748f&lt;br /&gt;
160911 bytes written, 0 bytes skipped in 1.664s, speed 98903 B/s&lt;br /&gt;
device 0 offset 0x40000, size 0x2748f&lt;br /&gt;
160911 bytes written, 0 bytes skipped in 1.626s, speed 101211 B/s&lt;br /&gt;
device 0 offset 0x80000, size 0xc8020&lt;br /&gt;
815136 bytes written, 4096 bytes skipped in 8.379s, speed 100094 B/s&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jneuhauser</name></author>
	</entry>
</feed>