diff options
Diffstat (limited to 'installer/rb5/recovery.sh')
-rwxr-xr-x | installer/rb5/recovery.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/installer/rb5/recovery.sh b/installer/rb5/recovery.sh new file mode 100755 index 0000000..156a16d --- /dev/null +++ b/installer/rb5/recovery.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +INSTALLER_DIR="`dirname ${0}`" + +# for cases that don't run "lunch rb5-userdebug" +if [ -z "${ANDROID_BUILD_TOP}" ]; then + ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`" +fi + +. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh" + +FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/rb5/${EXPECTED_LINARO_VENDOR_VERSION}" + +# TODO: Pull one-time recovery/qdl path out of standard install +# Flash bootloader firmware files +if [ ! -d "${FIRMWARE_DIR}/" ]; then + echo "RECOVERY: Missing vendor firmware package?" + echo " Make sure the vendor binaries have been downloaded from" + echo " ${VND_PKG_URL}" + echo " and extracted to $ANDROID_BUILD_TOP." + exit +fi + +QDL="`readlink -f ${FIRMWARE_DIR}/qdl/qdl`" + +pushd "${FIRMWARE_DIR}/rb5-bootloader-ufs-aosp" > /dev/null +echo "RECOVERY: Running QDL board recovery tool" +sudo ${QDL} prog_firehose_ddr.elf rawprogram?.xml patch?.xml +popd > /dev/null + +echo +echo +echo "RECOVERY: Please boot the RB5 into fastboot mode, and use the flash-all-aosp.sh script!" +echo |