1#!/bin/bash 2 3INSTALLER_DIR="`dirname ${0}`" 4 5# for cases that don't run "lunch db845c-trunk_staging-userdebug" 6if [ -z "${ANDROID_BUILD_TOP}" ]; then 7 ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`" 8fi 9 10. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh" 11 12FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/rb5/${EXPECTED_LINARO_VENDOR_VERSION}" 13 14# TODO: Pull one-time recovery/qdl path out of standard install 15# Flash bootloader firmware files 16if [ ! -d "${FIRMWARE_DIR}/" ]; then 17 echo "RECOVERY: Missing vendor firmware package?" 18 echo " Make sure the vendor binaries have been downloaded from" 19 echo " ${VND_PKG_URL}" 20 echo " and extracted to $ANDROID_BUILD_TOP." 21 exit 22fi 23 24QDL="`readlink -f ${FIRMWARE_DIR}/qdl/qdl`" 25 26pushd "${FIRMWARE_DIR}/rb5-bootloader-ufs-aosp" > /dev/null 27echo "RECOVERY: Running QDL board recovery tool" 28sudo ${QDL} prog_firehose_ddr.elf rawprogram?.xml patch?.xml 29popd > /dev/null 30 31echo 32echo 33echo "RECOVERY: Please boot the RB5 into fastboot mode, and use the flash-all-aosp.sh script!" 34echo 35