3.6.2. DFU Boot¶
3.6.2.1. Overview¶
AM64x USB peripheral boot (also called device boot) mode receives second bootloader images from a USB host using Device Firmware Update (DFU) specification defined by USB-IF.
This section demonstrates how to use DFU to boot AM64x GPEVM to U-Boot prompt with a Linux Ubuntu PC.
3.6.2.2. Setup¶
Hardware
- Refer to EVM Boot Mode Switches to set the AM64x GPEVM boot mode switches to USB Peripheral boot.
- Connect the AM64x GPEVM usb port to the Linux PC USB host port.
- Remove headers on Jumper J23 on AM64x GPEVM to let the USB port work in device mode.
Software
- The commonly used DFU tool on Linux host is dfu-util. Use the following command to install it on the Ubuntu PC:
$ sudo apt update && sudo apt install dfu-util
The Processor SDK prebuilt U-Boot images are used in this demo. The image files are located under
<SDK_DIR>/board-support/prebuilt-images/
folder on the Linux host.- tiboot3.bin
- tispl.bin
- u-boot-am64xx-evm.img
3.6.2.3. DFU Boot Procedure¶
Command Summary
The following commands are used on the Linux host to transfer the U-Boot images.
$ sudo dfu-util -R -a bootloader -D tiboot3.bin
$ sudo dfu-util -R -a tispl.bin -D tispl.bin
$ sudo dfu-util -R -a u-boot.img -D u-boot-am64xx-evm.img
Transfer tiboot3.bin
Power on the AM64x GPEVM. Run the following command on the Linux host to ensure the ROM DFU device is enumerated.
$ sudo dfu-util -l
...
Found DFU: [0451:6165] ver=0200, devnum=7, cfg=1, intf=0, path="3-4.1.3", alt=1, name="SocId", serial="01.00.00.00"
Found DFU: [0451:6165] ver=0200, devnum=7, cfg=1, intf=0, path="3-4.1.3", alt=0, name="bootloader", serial="01.00.00.00"
Note name=”bootloader” in the message above, it means the EVM is waiting
to receive tiboot3.bin
. Run the following command on the Linux host to
transfer tiboot3.bin
:
$ sudo dfu-util -R -a bootloader -D tiboot3.bin
After the host shows the transfer is complete, the EVM UART console should show the following messages.
U-Boot SPL 2021.01-g53e79d0e89 (Jul 23 2021 - 21:08:20 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
SPL initial stack usage: 13392 bytes
Trying to boot from DFU
Transfer tispl.bin
Now run command dfu-util -l command on the Linux host again, it should show the following messages:
$ sudo dfu-util -l
...
Found DFU: [0451:6165] ver=0224, devnum=12, cfg=1, intf=0, path="3-4.1.3", alt=1, name="u-boot.img", serial="UNKNOWN"
Found DFU: [0451:6165] ver=0224, devnum=12, cfg=1, intf=0, path="3-4.1.3", alt=0, name="tispl.bin", serial="UNKNOWN"
Note name=”tispl.bin” in the message above, it tells the EVM is waiting to
receive the U-Boot image tispl.bin
. Now run the following command on the
Linux host to transfer tispl.bin
:
$ sudo dfu-util -R -a tispl.bin -D tispl.bin
After the host shows the transfer is complete, the EVM UART console should show the following messages.
####################################DOWNLOAD ... OK
Ctrl+C to exit ...
init_env from device 10 not supported!
Starting ATF on ARM64 core...
NOTICE: BL31: v2.5(release):08.00.00.002-dirty
NOTICE: BL31: Built : 21:09:01, Jul 20 2021
U-Boot SPL 2021.01-g53e79d0e89 (Jul 23 2021 - 21:08:19 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
Trying to boot from DFU
Transfer u-boot-am64xx-evm.img
Now run the following command on the Linux host to transfer u-boot.img
:
$ sudo dfu-util -R -a u-boot.img -D u-boot-am64xx-evm.img
After the host shows the transfer is complete, the EVM UART console should show the following messages.
####DOWNLOAD ... OK
Ctrl+C to exit ...
U-Boot 2021.01-g53e79d0e89 (Jul 23 2021 - 21:08:19 +0000)
SoC: AM64X SR1.0
Model: Texas Instruments AM642 EVM
Board: AM64-GPEVM rev E2
DRAM: 2 GiB
MMC: mmc@fa10000: 0, mmc@fa00000: 1
In: serial@2800000
Out: serial@2800000
Err: serial@2800000
Net: eth0: ethernet@8000000
Hit any key to stop autoboot: 0
Now press any key on the EVM UART console will enter the EVM U-Boot prompt.