rb5: Add support for Qcom Robotics RB5 development kit

* Add new lunch target "rb5-userdebug"
* Boots android-mainline (3aa53d85a061) to UI
* ADB works
* If you are having display issues on your brand new RB5
  kit then run the following set of adb commands to update
  the lt9611uxc firmware version:
    adb wait-for-device; adb root;
    adb shell "echo 1 > /sys/bus/i2c/devices/5-002b/lt9611uxc_firmware"
  Check installer/rb5/README for more details.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I2917de0375e95e17a88446474fdb256af769f73d
diff --git a/installer/rb5/recovery.sh b/installer/rb5/recovery.sh
new file mode 100755
index 0000000..5541209
--- /dev/null
+++ b/installer/rb5/recovery.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+INSTALLER_DIR="`dirname ${0}`"
+
+QDL="`readlink -f ${INSTALLER_DIR}/qdl`"
+FIRMWARE_DIR="rb5-bootloader-ufs-aosp"
+
+# for cases that don't run "lunch rb5-userdebug"
+if [ -z "${ANDROID_BUILD_TOP}" ]; then
+    ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../
+    ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/rb5"
+fi
+
+if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
+    echo "RECOVERY: error in locating out directory, check if it exist"
+    exit
+fi
+
+echo "android out dir:${ANDROID_PRODUCT_OUT}"
+
+# TODO: Pull one-time recovery/qdl path out of standard install
+# Flash bootloader firmware files
+if [ ! -d "${INSTALLER_DIR}/${FIRMWARE_DIR}/" ]; then
+    echo "RECOVERY: No firmware directory? Make sure binaries have been provided"
+    exit
+fi
+
+pushd "${INSTALLER_DIR}/${FIRMWARE_DIR}" > /dev/null
+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