2014-06-18 09:38:56 +00:00
|
|
|
DFU TEST CASE DESCRIPTION:
|
|
|
|
|
test: dfu: script enhancements
Various misc enhancements to dfu_gadget_test.sh:
* After every write (download), perform a write to a different file
with different data. This ensures that the DFU buffer's content is
replaced, so that if the read (upload) succeeds, we know that the
correct data was actually read from the storage device, rather than
simply being left over in the DFU buffer. This requires two alt
setting names to be passed to the script, and a dummy data file to
be generated by dfu_gadget_test_init.sh.
* Fix the assumption that dfu_gadget_test.sh is run from the directory
that contains it, by cd'ing to that directory before invoking
./dfu_gadget_test_init.sh.
* Use $DIR$RCV_DIR consistently, rather than using plain $RCV_DIR in
some places.
* Add 959, 961 test file sizes, to be consistent with having one
more than and one less than all the other "round" sizes 64, 128, and
4096.
* Remove references to $BKP_DIR from dfu_gadget_test_init.sh, since it
isn't used.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-06-10 22:28:10 +00:00
|
|
|
The prerequisites for running this script are assured by
|
|
|
|
dfu_gadget_test_init.sh, which is automatically invoked by dfu_gadget_test.sh.
|
2014-06-18 09:38:56 +00:00
|
|
|
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.
|
|
|
|
|
test: dfu: script enhancements
Various misc enhancements to dfu_gadget_test.sh:
* After every write (download), perform a write to a different file
with different data. This ensures that the DFU buffer's content is
replaced, so that if the read (upload) succeeds, we know that the
correct data was actually read from the storage device, rather than
simply being left over in the DFU buffer. This requires two alt
setting names to be passed to the script, and a dummy data file to
be generated by dfu_gadget_test_init.sh.
* Fix the assumption that dfu_gadget_test.sh is run from the directory
that contains it, by cd'ing to that directory before invoking
./dfu_gadget_test_init.sh.
* Use $DIR$RCV_DIR consistently, rather than using plain $RCV_DIR in
some places.
* Add 959, 961 test file sizes, to be consistent with having one
more than and one less than all the other "round" sizes 64, 128, and
4096.
* Remove references to $BKP_DIR from dfu_gadget_test_init.sh, since it
isn't used.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-06-10 22:28:10 +00:00
|
|
|
On the target device, environment variable "dfu_alt_info" must contain at
|
|
|
|
least:
|
2014-06-18 09:38:56 +00:00
|
|
|
|
test: dfu: script enhancements
Various misc enhancements to dfu_gadget_test.sh:
* After every write (download), perform a write to a different file
with different data. This ensures that the DFU buffer's content is
replaced, so that if the read (upload) succeeds, we know that the
correct data was actually read from the storage device, rather than
simply being left over in the DFU buffer. This requires two alt
setting names to be passed to the script, and a dummy data file to
be generated by dfu_gadget_test_init.sh.
* Fix the assumption that dfu_gadget_test.sh is run from the directory
that contains it, by cd'ing to that directory before invoking
./dfu_gadget_test_init.sh.
* Use $DIR$RCV_DIR consistently, rather than using plain $RCV_DIR in
some places.
* Add 959, 961 test file sizes, to be consistent with having one
more than and one less than all the other "round" sizes 64, 128, and
4096.
* Remove references to $BKP_DIR from dfu_gadget_test_init.sh, since it
isn't used.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-06-10 22:28:10 +00:00
|
|
|
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).
|
2014-06-18 09:38:56 +00:00
|
|
|
|
|
|
|
Example usage:
|
|
|
|
1. On the target:
|
test: dfu: script enhancements
Various misc enhancements to dfu_gadget_test.sh:
* After every write (download), perform a write to a different file
with different data. This ensures that the DFU buffer's content is
replaced, so that if the read (upload) succeeds, we know that the
correct data was actually read from the storage device, rather than
simply being left over in the DFU buffer. This requires two alt
setting names to be passed to the script, and a dummy data file to
be generated by dfu_gadget_test_init.sh.
* Fix the assumption that dfu_gadget_test.sh is run from the directory
that contains it, by cd'ing to that directory before invoking
./dfu_gadget_test_init.sh.
* Use $DIR$RCV_DIR consistently, rather than using plain $RCV_DIR in
some places.
* Add 959, 961 test file sizes, to be consistent with having one
more than and one less than all the other "round" sizes 64, 128, and
4096.
* Remove references to $BKP_DIR from dfu_gadget_test_init.sh, since it
isn't used.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-06-10 22:28:10 +00:00
|
|
|
setenv dfu_alt_info dfu_test.bin fat 0 6\;dfudummy.bin fat 0 6
|
2014-06-18 09:38:56 +00:00
|
|
|
dfu 0 mmc 0
|
|
|
|
2. On the host:
|
2014-06-20 15:53:44 +00:00
|
|
|
test/dfu/dfu_gadget_test.sh X Y [test file name]
|
|
|
|
e.g. test/dfu/dfu_gadget_test.sh 0 1
|
|
|
|
or
|
|
|
|
e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img
|
2014-06-18 09:38:56 +00:00
|
|
|
|
2014-06-20 15:53:44 +00:00
|
|
|
... 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.
|