mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
6454ab46f2
There is a regression in the current implementation of simulation mode, which leads to sending two configure packets: FIREHOSE WRITE: <?xml version="1.0"?> <data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="1048576" verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data> FIREHOSE WRITE: <?xml version="1.0"?> <data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="0" verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data> In simulated mode "remote" target can't propose different size, so we just don't re-send configure packet. Move the check for simulation mode to prevent sending additional configure packets with the attribute MaxPayloadSizeToTargetInBytes=0. Also change DIGEST_TABLE.bin sha256 hash to a05e1124edbe34dc504a327544fb66572591353dc3fa25e6e7eafbe4803e63e0, as amount of packets supposed to be sent to the target changed. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
43 lines
1.1 KiB
Bash
Executable File
43 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
set -e
|
|
|
|
SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
|
|
|
FLAT_BUILD=${SCRIPT_PATH}/data
|
|
|
|
REP_ROOT=${SCRIPT_PATH}/..
|
|
VIP_PATH=${FLAT_BUILD}/vip
|
|
EXPECTED_DIGEST="a05e1124edbe34dc504a327544fb66572591353dc3fa25e6e7eafbe4803e63e0"
|
|
VIP_TABLE_FILE=${VIP_PATH}/DigestsToSign.bin
|
|
|
|
mkdir -p $VIP_PATH
|
|
|
|
cd $FLAT_BUILD
|
|
${REP_ROOT}/qdl --dry-run --create-digests=${VIP_PATH} \
|
|
prog_firehose_ddr.elf rawprogram*.xml patch*.xml
|
|
|
|
if command -v sha256sum >/dev/null 2>&1; then
|
|
shacmd="sha256sum"
|
|
elif command -v shasum >/dev/null 2>&1; then
|
|
shacmd="shasum -a 256"
|
|
else
|
|
echo "No SHA-256 checksum tool found (need 'sha256sum' or 'shasum')"
|
|
exit 1
|
|
fi
|
|
|
|
actual_digest=`${shacmd} "${VIP_TABLE_FILE}" | cut -d ' ' -f1`
|
|
if [ "$actual_digest" != "${EXPECTED_DIGEST}" ]; then
|
|
echo "Expected SHA256 digest of ${VIP_TABLE_FILE} file is ${EXPECTED_DIGEST}"
|
|
echo "Calculated SHA256 digest of ${VIP_TABLE_FILE} file is $actual_digest"
|
|
echo "VIP table folder contents:"
|
|
ls -la ${VIP_PATH}
|
|
exit 1
|
|
fi
|
|
|
|
echo "VIP tables are generated successfully and validated"
|
|
|
|
rm -r ${VIP_PATH}/*.bin
|
|
rmdir ${VIP_PATH}
|