[PATCH v4 7/7] doc: board: Add document for DFU boot on am62x SoCs

Mattijs Korpershoek mkorpershoek at baylibre.com
Fri Jan 12 14:18:32 CET 2024


Hi Sjoerd, Nishanth,

On Fri, Jan 12, 2024 at 13:58, Sjoerd Simons <sjoerd at collabora.com> wrote:

> On Fri, 2024-01-12 at 06:36 -0600, Nishanth Menon wrote:
>> On 09:52-20240112, Sjoerd Simons wrote:
>> > 
>> > +DFU based boot
>> > +--------------
>> > +
>> > +To boot the board over DFU, ensure there is no SD card inserted
>> > with a
>> > +bootloader. Hold the USR switch while plugging into the Type C to
>> > boot into DFU
>> > +mode. After power-on the build artifacts needs to be uploaded one
>> > by one with a
>> > +tool like dfu-util.
>> 
>> Don't we also need a wiped out emmc unfortunately?
>
> Nope just not having an SD card without boot artifacts is enough (or to
> keep things simple no SD card). the USR switch changes the bootmode to
> have SD as primary, DFU as fallback, so what's on the eMMC is luckily
> not relevant.
>
> So i've been happily testing with the factory eMMC image untouched to
> allow me to compare against the factory u-boot behaviour 

I've been using DFU for quite some time on Beagle Play and I observe
the same behaviour as Sjoerd. What is on eMMC is fortunetly not relevant
to have DFU mode functional.

>
>> 
>> > +
>> > +.. include::  ../ti/am62x_sk.rst
>> > +    :start-after: .. am62x_evm_rst_include_start_dfu_boot
>> > +    :end-before: .. am62x_evm_rst_include_end_dfu_boot
>> > +
>> >  Debugging U-Boot
>> >  ----------------
>> >  
>> > diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
>> > index b12dc85f06b..904a54cd5ff 100644
>> > --- a/doc/board/ti/am62x_sk.rst
>> > +++ b/doc/board/ti/am62x_sk.rst
>> > @@ -105,6 +105,20 @@ Set the variables corresponding to this
>> > platform:
>> >  
>> >  * 3.1 R5:
>> >  
>> > +.. include::  ../ti/k3.rst
>> > +    :start-after: .. k3_rst_include_start_build_steps_spl_r5
>> > +    :end-before: .. k3_rst_include_end_build_steps_spl_r5
>> > +
>> > +* 3.1.1 Alternatively build R5 for DFU boot:
>> > +
>> > +As the SPL size can get to big when building with support for
>> > booting both from
>> > +local storage *and* DFU an extra config fragment should be used to
>> > enable DFU
>> > +support (and disable storage support)
>> > +
>> > +.. prompt:: bash $
>> > +
>> > +  export UBOOT_CFG_CORTEXR=${UBOOT_CFG_CORTEXR}
>> > am62x_r5_usbdfu.config
>> > +
>> >  .. include::  ../ti/k3.rst
>> >      :start-after: .. k3_rst_include_start_build_steps_spl_r5
>> >      :end-before: .. k3_rst_include_end_build_steps_spl_r5
>> > @@ -251,6 +265,29 @@ https://www.ti.com/lit/pdf/spruiv7 under the
>> > `Boot Mode Pins` section.
>> >  
>> >  For SW2 and SW1, the switch state in the "ON" position = 1.
>> >  
>> > +DFU based boot
>> > +--------------
>> > +
>> > +To boot the board over DFU, set the switches to DFU mode and
>> > connect to the
>> > +USB Type C DRD Port on the board. After power-on the build
>> > artifacts needs to be
>> > +uploaded one by one with a tool like dfu-util.
>> > +
>> > +.. am62x_evm_rst_include_start_dfu_boot
>> > +
>> > +The initial ROM will have a DFU alt named `bootloader` for the
>> > initial R5 spl
>> > +upload. The next stages as exposed by u-boot have target alts
>> > matching the name
>> > +of the artifacts, for these a USB reset has to be done after each
>> > upload.
>> > +
>> > +When using dfu-util the following commands can be used to boot to
>> > a u-boot shell:
>> > +
>> > +.. prompt:: bash $
>> > +
>> > +  dfu-util -a bootloader -D tiboot3.bin
>> > +  dfu-util -R -a tispl -D tispl.bin
>> > +  dfu-util -R -a u-boot.img -D u-boot.img
>> > +
>> > +.. am62x_evm_rst_include_end_dfu_boot
>> > +
>> >  Debugging U-Boot
>> >  ----------------
>> >  
>> > -- 
>> > 2.43.0
>> > 
>> 
>
> -- 
> Sjoerd Simons
> Collabora Ltd.


More information about the U-Boot mailing list