1 K3-bootswitch tool
2 ==================
4 This tool allows to boot the board in any boot mode from command line.
5 This is useful for controlling the board remotely for individual developers
6 as well as test farm.
8 Hardware setup
9 --------------
11 * USB cable should be connected from the board to the Linux PC
12 * Note that on am65xx-evm, there is an adapter board for PCIe / USB.
13 This should be used for connecting the USB cable.
14 DFU boot is only supported from this port.
15 * UART cable should be connected from the main_uart to Linux PC
16 * Default switch settings should be for DFU boot mode
17 * Power supply to the board should be connected via phidget USB relay,
18 or a UART Remote Power Switch.
21 Switch settings for DFU boot mode
22 ---------------------------------
24 * j721e-evm settings => SW8 = 1000 0000 SW9 = 0010 0000 SW3 = 0101 00 1010
25 * j7200-evm settings => SW8 = 1000 0000 SW9 = 0010 0000 SW3 = 0101 00 1010
26 * am65xx-evm settings => SW2 = 0000 0000 00 SW3 = 0001 0000 00 SW4 = 11
27 * am64xx-evm settings => SW2 = 1100 1010 SW3 = 0011 0000
29 Power toggling setup
30 --------------------
32 This script uses usbrelay, phidget or RPS to control power for restarting the
33 boards. Since everyone has different configuration, the script parses the data
34 from a config file. You can copy the template as follows and then customize as
35 required.
37 cp k3bootswitch.conf ~/HOME/.config/
39 Usage
40 -----
42 * Install dfu-util package on the Linux PC with
43 ``sudo apt-get install dfu-util``
44 * To boot the j721e-evm board in MMC bootmode, run following
45 ``sudo ./dfu-boot.sh --j721e-evm --bootmode mmc``
47 Currently supported bootmodes are: **mmc, emmc, ospi, uart, noboot**
49 * To mount the emmc from j721e-evm board to the Linux PC, run following
50 ``sudo ./dfu-boot.sh --j721e-evm --mount 0``
51 * To mount the SD card from am65xx-evm board to the Linux PC, run following
52 ``sudo ./dfu-boot.sh --am65xx-evm --mount 1``
54 Customization
55 -------------
57 Default setup assumes most common setup for Keystone3 EVM. In case you are using
58 differnent mechanism, update the **dfu-boot.sh** script with following:
60 * Update the **uart_dev** variable to reflect the correct tty device
61 for main uart. (The one where all u-boot/SBL/kernel logs appear)
62 * Update the **switch** variable to reflect the correct switch number which
63 controls the power via phidget
64 * Update the **switch_type** variable to select the mechanism for toggling
65 power of the board (phidget/rps/usbrelay)
66 * If using RPS instead of phidget, also update the **rps_dev** variable with
67 the UART device of RPS.
68 * If using usbrelay, update the **relay_name** variable with the name shown by
69 running `sudo usbrelay`.
70 * If you have a different mechanism to power the board, write your own
71 implementation and update **toggle_util** variable in the script.
73 Limitations
74 -----------
76 * Do not use this mechanism to measure any boot time numbers
77 * The bootloader images are specific to TI EVMs. Different images are required
78 to be able to mount the SD/eMMC from custom boards
79 * The u-boot will try to import the environment from eMMC. If that is broken,
80 it will cause issues in mounting the devices using UMS