DFU boot¶
DFU or Device Firmware Upgrade is a method for transferring and flashing boot files over USB. The 62x/62a can boot over DFU, transferring the necessary U-Boot files from a host computer to the device via a USB connection.
References:
https://dfu-util.sourceforge.net/
https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/latest/exports/docs/linux/Foundational_Components/U-Boot/UG-DFU.html
Procedure¶
1. Build a DFU Compatible U-Boot¶
U-Boot must have special configurations enabled
- To setup & build U-Boot please follow this wiki page U-Boot_Building_for_MitySOM-AM62
- Apply the DFU config fragment. This can be done by editing the first R5 make command the
62x-build.sh
or62ax-build.sh
scripts:-make -j"$(nproc)" "$MV" ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O="$R5_BUILDDIR" "${MACHINE}_r5_defconfig" +make -j"$(nproc)" "$MV" ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O="$R5_BUILDDIR" "${MACHINE}_r5_defconfig" am62x_r5_usbdfu.config
- Run the respective build script.
This u-boot will be sent to and run from RAM on the SOM. Don't program this to another boot media as it will sit trying to load further files from USB DFU.
2. Setup the device¶
- Connect the device and host computer with a USB cable.
- Set the boot switches to DFU mode. Switches: SW1 = [00001010] SW2 = [01000000].
- Turn on the device.
3. Transfer U-Boot¶
- Install dfu-util.
- Run
dfu-util -l
to ensure the device is ready.$ sudo dfu-util -l dfu-util 0.11 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2021 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Found DFU: [0451:6165] ver=0200, devnum=24, cfg=1, intf=0, path="3-2.4.4.2", alt=1, name="SocId", serial="01.00.00.00" Found DFU: [0451:6165] ver=0200, devnum=24, cfg=1, intf=0, path="3-2.4.4.2", alt=0, name="bootloader", serial="01.00.00.00"
- Transfer the dfu u-boot compiled
tiboot3.bin
first. You will need to specify the devnum and name. (Note: If you are trying to boot a GP SOM, you will have to usetiboot3-am62x-gp-evm.bin
instead).
62x:$ sudo dfu-util -R -d <refer to above command for devnum, in this case it is 24> -a bootloader -D build-mitysom_am62x_devkit/r5/tiboot3.bin
62a:$ sudo dfu-util -R -d <refer to above command for devnum, in this case it is 24> -a bootloader -D build-mitysom_am62ax_devkit/r5/tiboot3.bin
- Transfer
tispl.bin
and thenu-boot.img
62x:$ sudo dfu-util -R -d <refer to above command for devnum, in this case it is 24> -a tispl.bin -D build-mitysom_am62x_devkit/a53/tispl.bin $ sudo dfu-util -R -d <refer to above command for devnum, in this case it is 24> -a u-boot.img -D build-mitysom_am62x_devkit/a53/u-boot.img
62a:$ sudo dfu-util -R -d <refer to above command for devnum, in this case it is 24> -a tispl.bin -D build-mitysom_am62ax_devkit/a53/tispl.bin $ sudo dfu-util -R -d <refer to above command for devnum, in this case it is 24> -a u-boot.img -D build-mitysom_am62ax_devkit/a53/u-boot.img
- The device will now boot into U-Boot. You can create a defconfig fragment and use it to change
CONFIG_BOOTCOMMAND
in the a53 build, you can then direct what you would like U-Boot to do. By default, U-Boot will attempt to boot Linux from the SD card and then eMMC like normal.
DFU Flash/Program boot media¶
TODO
Note: DFU flashing gets about 2.6MB/s throughput. This means flashing an 8GB edgeai image could take an hour. However, switching over to fastboot tool flashing is possible, which gets about 25.8MB/s throughput, bringing that flash time down to 6 minutes. Most production situations would be unlikely to need an 8GB filesystem image, most projects filesystems are usually around 1GB or less.
Go to top