Lukasz Majewski | 98ffe74 | 2014-06-18 11:38:56 +0200 | [diff] [blame] | 1 | DFU TEST CASE DESCRIPTION: |
| 2 | |
Stephen Warren | b1c384c | 2014-06-10 16:28:10 -0600 | [diff] [blame] | 3 | The prerequisites for running this script are assured by |
| 4 | dfu_gadget_test_init.sh, which is automatically invoked by dfu_gadget_test.sh. |
Lukasz Majewski | 98ffe74 | 2014-06-18 11:38:56 +0200 | [diff] [blame] | 5 | In this file user is able to generate their own set of test files by altering |
| 6 | the default set of TEST_FILES_SIZES variable. |
| 7 | The dfu_gadget_test_init.sh would generate test images only if they are not |
| 8 | already generated. |
| 9 | |
Stephen Warren | b1c384c | 2014-06-10 16:28:10 -0600 | [diff] [blame] | 10 | On the target device, environment variable "dfu_alt_info" must contain at |
| 11 | least: |
Lukasz Majewski | 98ffe74 | 2014-06-18 11:38:56 +0200 | [diff] [blame] | 12 | |
Stephen Warren | b1c384c | 2014-06-10 16:28:10 -0600 | [diff] [blame] | 13 | dfu_test.bin fat 0 6;dfudummy.bin fat 0 6 |
| 14 | |
| 15 | Depending on your device, you may need to replace "fat" with |
| 16 | "ext4", and "6" with the relevant partition number. For reference please |
| 17 | consult the config file for TRATS/TRATS2 devices |
| 18 | (../../include/configs/trats{2}.h) |
| 19 | |
| 20 | One can use fat, ext4 or any other supported file system supported by U-Boot. |
| 21 | These can be created by exporting storage devices via UMS (ums 0 mmc 0) and |
| 22 | using standard tools on host (like mkfs.ext4). |
Lukasz Majewski | 98ffe74 | 2014-06-18 11:38:56 +0200 | [diff] [blame] | 23 | |
| 24 | Example usage: |
| 25 | 1. On the target: |
Stephen Warren | b1c384c | 2014-06-10 16:28:10 -0600 | [diff] [blame] | 26 | setenv dfu_alt_info dfu_test.bin fat 0 6\;dfudummy.bin fat 0 6 |
Lukasz Majewski | 98ffe74 | 2014-06-18 11:38:56 +0200 | [diff] [blame] | 27 | dfu 0 mmc 0 |
| 28 | 2. On the host: |
Lukasz Majewski | 56d62ca | 2015-08-15 11:23:45 +0200 | [diff] [blame] | 29 | test/dfu/dfu_gadget_test.sh X Y [test file name] [usb device vendor:product] |
Lukasz Majewski | dcb1186 | 2014-06-20 17:53:44 +0200 | [diff] [blame] | 30 | e.g. test/dfu/dfu_gadget_test.sh 0 1 |
| 31 | or |
| 32 | e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img |
Lukasz Majewski | 56d62ca | 2015-08-15 11:23:45 +0200 | [diff] [blame] | 33 | or |
| 34 | e.g. test/dfu/dfu_gadget_test.sh 0 1 0451:d022 |
| 35 | or |
| 36 | e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img 0451:d022 |
Lukasz Majewski | 98ffe74 | 2014-06-18 11:38:56 +0200 | [diff] [blame] | 37 | |
Lukasz Majewski | dcb1186 | 2014-06-20 17:53:44 +0200 | [diff] [blame] | 38 | ... where X and Y are dfu_test.bin's and dfudummy.bin's alt setting numbers. |
| 39 | They can be obtained from dfu-util -l or $dfu_alt_info. |
| 40 | It is also possible to pass optional [test file name] to force the script to |
| 41 | test one particular file. |
Lukasz Majewski | 56d62ca | 2015-08-15 11:23:45 +0200 | [diff] [blame] | 42 | If many DFU devices are connected, it may be useful to filter on USB |
| 43 | vendor/product ID (0451:d022). |
| 44 | One can get them by running "lsusb" command on a host PC. |