blob: e345f3e8a58b968fd050a0c5709d3abfedc37b17 [file] [log] [blame]
Amit Pundired3f8212019-07-01 18:02:54 +00001#!/bin/bash
2
3INSTALLER_DIR="`dirname ${0}`"
4
Amit Pundired3f8212019-07-01 18:02:54 +00005# for cases that don't run "lunch db845c-userdebug"
6if [ -z "${ANDROID_BUILD_TOP}" ]; then
Amit Pundirfbd3fbb2021-11-18 14:59:17 +05307 ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`"
Amit Pundired3f8212019-07-01 18:02:54 +00008fi
9
Amit Pundired3f8212019-07-01 18:02:54 +000010
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053011. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
12
13FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/db845c/${EXPECTED_LINARO_VENDOR_VERSION}"
Amit Pundired3f8212019-07-01 18:02:54 +000014
15# TODO: Pull one-time recovery/qdl path out of standard install
16# Flash bootloader firmware files
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053017if [ ! -d "${FIRMWARE_DIR}/" ]; then
18 echo "RECOVERY: Missing vendor firmware package?"
19 echo " Make sure the vendor binaries have been downloaded from"
20 echo " ${VND_PKG_URL}"
21 echo " and extracted to $ANDROID_BUILD_TOP."
Amit Pundired3f8212019-07-01 18:02:54 +000022 exit
23fi
24
Amit Pundirfbd3fbb2021-11-18 14:59:17 +053025QDL="`readlink -f ${FIRMWARE_DIR}/qdl/qdl`"
26
27pushd "${FIRMWARE_DIR}/dragonboard-845c-bootloader-ufs-aosp" > /dev/null
28echo "RECOVERY: Running QDL board recovery tool"
29sudo ${QDL} prog_firehose_ddr.elf rawprogram[012345].xml patch[012345].xml
Amit Pundired3f8212019-07-01 18:02:54 +000030popd > /dev/null
31
32echo
33echo
34echo "RECOVERY: Please boot the db845c into fastboot mode, and use the flash-all-aosp.sh script!"
35echo