README 1.7 KB
Newer Older
1 2
DFU TEST CASE DESCRIPTION:

S
Stephen Warren 已提交
3 4
The prerequisites for running this script are assured by
dfu_gadget_test_init.sh, which is automatically invoked by dfu_gadget_test.sh.
5 6 7 8 9
In this file user is able to generate their own set of test files by altering
the default set of TEST_FILES_SIZES variable.
The dfu_gadget_test_init.sh would generate test images only if they are not
already generated.

S
Stephen Warren 已提交
10 11
On the target device, environment variable "dfu_alt_info" must contain at
least:
12

S
Stephen Warren 已提交
13 14 15 16 17 18 19 20 21 22
    dfu_test.bin fat 0 6;dfudummy.bin fat 0 6

Depending on your device, you may need to replace "fat" with
"ext4", and "6" with the relevant partition number. For reference please
consult the config file for TRATS/TRATS2 devices
(../../include/configs/trats{2}.h)

One can use fat, ext4 or any other supported file system supported by U-Boot.
These can be created by exporting storage devices via UMS (ums 0 mmc 0) and
using standard tools on host (like mkfs.ext4).
23 24 25

Example usage:
1. On the target:
S
Stephen Warren 已提交
26
   setenv dfu_alt_info dfu_test.bin fat 0 6\;dfudummy.bin fat 0 6
27 28
   dfu 0 mmc 0
2. On the host:
29
   test/dfu/dfu_gadget_test.sh X Y [test file name] [usb device vendor:product]
L
Lukasz Majewski 已提交
30 31 32
   e.g. test/dfu/dfu_gadget_test.sh 0 1
   or
   e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img
33 34 35 36
   or
   e.g. test/dfu/dfu_gadget_test.sh 0 1 0451:d022
   or
   e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img 0451:d022
37

L
Lukasz Majewski 已提交
38 39 40 41
... where X and Y are dfu_test.bin's and dfudummy.bin's alt setting numbers.
They can be obtained from dfu-util -l or $dfu_alt_info.
It is also possible to pass optional [test file name] to force the script to
test one particular file.
42 43 44
If many DFU devices are connected, it may be useful to filter on USB
vendor/product ID (0451:d022).
One can get them by running "lsusb" command on a host PC.