* [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU
@ 2022-05-20 11:14 Ahmad Fatoum
2022-05-20 11:14 ` [PATCH 2/2] Documentation: user: usb: fix literal block :: when : is intended Ahmad Fatoum
2022-05-23 7:01 ` [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-05-20 11:14 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
TF-A v2.6 now supports DFU for USB bootstrap on the STM32MP1. This is
normally exercised by the STM32CubeProgrammer, but is easily usable with
just dfu-util as well. Document how to.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Documentation/boards/stm32mp.rst | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/Documentation/boards/stm32mp.rst b/Documentation/boards/stm32mp.rst
index 0c9615b290a5..4cdd281a9e14 100644
--- a/Documentation/boards/stm32mp.rst
+++ b/Documentation/boards/stm32mp.rst
@@ -49,6 +49,8 @@ In the above output, images with a ``.stm32`` extension feature the (legacy)
stm32image header. ``barebox-dt-2nd.img`` and ``barebox-stm32mp-generic-bl33.img``
are board-generic barebox images that receive an external device tree.
+.. _stm32mp_fip:
+
Flashing barebox (FIP)
----------------------
@@ -137,6 +139,34 @@ Assuming ``CONFIG_CMD_MMC_EXTCSD`` is enabled and the board shall boot from
The STM32MP1 BootROM does *not* support booting from eMMC without fast boot
acknowledge.
+USB Bootstrap (DFU)
+-------------------
+
+The STM32MP1 can be strapped to boot from USB. After Power-On reset, it
+should be detectable as ``STMicroelectronics STM Device in DFU Mode``
+and can be uploaded to with ``dfu-util(1)``::
+
+ dfu-util --alt 1 -D tf-a-stm32mp157c-my-board.stm32
+ dfu-util --alt 3 -D bl3-firmware.fip
+ dfu-util --alt 0 -e
+
+The first command will talk to the BootROM and upload the first stage
+bootloader (ARM Trusted Firmware-A) into on-chip SRAM.
+
+When compiled with ``STM32MP_USB_PROGRAMMER=1``, TF-A v2.6 or higher
+will seamlessly continue operation of the DFU gadget. The second
+command will talk to TF-A to upload a Firmware Image Package, which
+is a format bundling further firmware including barebox.
+
+The final command will instruct TF-A to boot the loaded images.
+This all happens in volatile memory. To persist images, use
+normal barebox functionality like creating a DFU-gadget in barebox,
+Fastboot/USB mass storage ... etc.
+
+The FIP image containing barebox can be generated as described in
+137::ref:`stm32mp_fip`. Upstream TF-A doesn't support DFU for
+SSBLs using the legacy stm32image format.
+
Boot source selection
---------------------
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] Documentation: user: usb: fix literal block :: when : is intended
2022-05-20 11:14 [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU Ahmad Fatoum
@ 2022-05-20 11:14 ` Ahmad Fatoum
2022-05-23 7:01 ` [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-05-20 11:14 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
The line is followed by a list, not an indented literal block, so
just a single colon should be used. This fixes following warning:
WARNING: Literal block expected; none found.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Documentation/user/usb.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/user/usb.rst b/Documentation/user/usb.rst
index 62f6796c9531..2479efe9d6fa 100644
--- a/Documentation/user/usb.rst
+++ b/Documentation/user/usb.rst
@@ -267,7 +267,7 @@ USB Gadget autostart Options
``global.system.partitions``
Common function description for all of DFU, fastboot and USB mass storage
gadgets. Both Fastboot and DFU partitions also have dedicated override
- variables for backwards-compatibility::
+ variables for backwards-compatibility:
``global.usbgadget.dfu_function``
Function description for DFU. See :ref:`command_usbgadget` -D [desc].
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU
2022-05-20 11:14 [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU Ahmad Fatoum
2022-05-20 11:14 ` [PATCH 2/2] Documentation: user: usb: fix literal block :: when : is intended Ahmad Fatoum
@ 2022-05-23 7:01 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2022-05-23 7:01 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Fri, May 20, 2022 at 01:14:28PM +0200, Ahmad Fatoum wrote:
> TF-A v2.6 now supports DFU for USB bootstrap on the STM32MP1. This is
> normally exercised by the STM32CubeProgrammer, but is easily usable with
> just dfu-util as well. Document how to.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> Documentation/boards/stm32mp.rst | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/Documentation/boards/stm32mp.rst b/Documentation/boards/stm32mp.rst
> index 0c9615b290a5..4cdd281a9e14 100644
> --- a/Documentation/boards/stm32mp.rst
> +++ b/Documentation/boards/stm32mp.rst
> @@ -49,6 +49,8 @@ In the above output, images with a ``.stm32`` extension feature the (legacy)
> stm32image header. ``barebox-dt-2nd.img`` and ``barebox-stm32mp-generic-bl33.img``
> are board-generic barebox images that receive an external device tree.
>
> +.. _stm32mp_fip:
> +
> Flashing barebox (FIP)
> ----------------------
>
> @@ -137,6 +139,34 @@ Assuming ``CONFIG_CMD_MMC_EXTCSD`` is enabled and the board shall boot from
> The STM32MP1 BootROM does *not* support booting from eMMC without fast boot
> acknowledge.
>
> +USB Bootstrap (DFU)
> +-------------------
> +
> +The STM32MP1 can be strapped to boot from USB. After Power-On reset, it
> +should be detectable as ``STMicroelectronics STM Device in DFU Mode``
> +and can be uploaded to with ``dfu-util(1)``::
> +
> + dfu-util --alt 1 -D tf-a-stm32mp157c-my-board.stm32
> + dfu-util --alt 3 -D bl3-firmware.fip
> + dfu-util --alt 0 -e
> +
> +The first command will talk to the BootROM and upload the first stage
> +bootloader (ARM Trusted Firmware-A) into on-chip SRAM.
> +
> +When compiled with ``STM32MP_USB_PROGRAMMER=1``, TF-A v2.6 or higher
> +will seamlessly continue operation of the DFU gadget. The second
> +command will talk to TF-A to upload a Firmware Image Package, which
> +is a format bundling further firmware including barebox.
> +
> +The final command will instruct TF-A to boot the loaded images.
> +This all happens in volatile memory. To persist images, use
> +normal barebox functionality like creating a DFU-gadget in barebox,
> +Fastboot/USB mass storage ... etc.
> +
> +The FIP image containing barebox can be generated as described in
> +137::ref:`stm32mp_fip`. Upstream TF-A doesn't support DFU for
> +SSBLs using the legacy stm32image format.
> +
> Boot source selection
> ---------------------
>
> --
> 2.30.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-23 7:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 11:14 [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU Ahmad Fatoum
2022-05-20 11:14 ` [PATCH 2/2] Documentation: user: usb: fix literal block :: when : is intended Ahmad Fatoum
2022-05-23 7:01 ` [PATCH 1/2] Documentation: boards: stm32mp: document USB bootstrap via DFU Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox