===== STKa64xxL USB Boot =====
The TI Sitara AM64x CPU provides the option to boot from USB (host and device).
=== Prerequisites ===
* Build BSP following [[:en:arm:tqma64xxl:linux:yocto:quickstart_yocto|STKa64xxL Yocto BSP quickstart guide]].
* Booting the STKa64xxL from USB device requires a Linux based host PC to run the dfu-util.
1. Format a USB flash drive with FAT32 filesystem. \\ 2. Copy the files listed below from the Yocto buildspace deploy directory to the USB flash drive prepared with FAT32:
* u-boot.img
* tispl.bin
* tiboot3.bin
The USB flash drive partition must be set as active!
3. Connect the USB flash drive with the USB 3.0 the USB-OTG interface. \\ 4. Set the STKa64xxL DIP switches to boot from USB host (mass storage).
[size=150%]**S7** [/size] {{ :en:dip_4_0000.png?nolink&150 }}
5. Connect host PC with STKa64xxL connector X2 and setup the terminal program. \\ Please see the [[https://support.tq-group.com/en/arm/tqma64xxl/mbax4xxl/stk_quicksteps#terminal_emulator|terminal_emulator]] section how to setup a serial debug connection. \\
6. Power on the STKa64xxL to boot from USB. \\
Please check that dfu-util is installed the Linux host.
1. Copy the files below from the Yocto buildspace deploy directory deploy e.g. the home folder:
* u-boot.img
* tispl.bin
* tiboot3.bin
2. Connect STKa64xxL X1 and X2 with a mirco USB cable to the Host PC.
* X1 is used to connect the STKa64xxL as USB device
* X2 is used as serial debug connection
3. Set the STKa64xxL DIP switches to boot from USB device (dfu-util). \\
[size=150%]**S7** [/size] {{ :en:dip_4_0000.png?nolink&150 }}
4. Power up the STKa64xxL. \\ 5. Open a second terminal for the serial debug connection with e.g. Minicom \\ Please see the [[https://support.tq-group.com/en/arm/tqma64xxl/mbax4xxl/stk_quicksteps#terminal_emulator|terminal_emulator]] section how to setup a serial debug connection. \\
6. Open terminal (shell) on Linux host and execute the commands below to boot the STKa64xxL via USB device.
After initial power-on, U-Boot will reset the CPU as a part of an TI Errata workaround, so tiboot3.bin needs to be loaded twice. \\ After a warm boot (reset from U-Boot or reboot from Linux), the initial load of tiboot3.bin must be skipped.
sudo dfu-util -a bootloader -D tiboot3.bin
STKa64xxL issues a reset after loading the tiboot3.bin via dfu-util. when it has been initially powered on. \\ If the STKa64xxL has been reset from U-Boot or Linux it is not required to load tiboot.bin3 twice, so only the three commands below have to be executed.
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.img
===== Yocto Images =====
{{section>.:..:..:data#yocto_images&noheader}}