mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-15 01:17:39 +00:00
54ce79c8a5
On Tegra, the DFU buffer size is 1M. Consequently, the 8M test always fails. Add tests for the 1M size, and one byte less as a corner case, so that some large tests are executed and expected to pass. Signed-off-by: Stephen Warren <swarren@nvidia.com>
31 lines
690 B
Bash
Executable file
31 lines
690 B
Bash
Executable file
#! /bin/bash
|
|
|
|
set -e # any command return if not equal to zero
|
|
clear
|
|
|
|
COLOUR_RED="\33[31m"
|
|
COLOUR_GREEN="\33[32m"
|
|
COLOUR_DEFAULT="\33[0m"
|
|
|
|
LOG_DIR="./log"
|
|
|
|
TEST_FILES_SIZES="63 64 65 127 128 129 4095 4096 4097 959 960 961 1048575 1048576 8M"
|
|
|
|
printf "Init script for generating data necessary for DFU test script"
|
|
|
|
if [ ! -d $LOG_DIR ]; then
|
|
`mkdir $LOG_DIR`
|
|
fi
|
|
|
|
for size in $TEST_FILES_SIZES
|
|
do
|
|
FILE="./dat_$size.img"
|
|
if [ ! -f $FILE ]; then
|
|
dd if=/dev/urandom of="./dat_$size.img" bs=$size count=1 > /dev/null 2>&1 || exit $?
|
|
fi
|
|
done
|
|
dd if=/dev/urandom of="./dfudummy.bin" bs=1024 count=1 > /dev/null 2>&1 || exit $?
|
|
|
|
printf "$COLOUR_GREEN OK $COLOUR_DEFAULT \n"
|
|
|
|
exit 0
|