dragonboards: Move firmware files to external vendor overlay package
Moving all the vendor binaries (including bootloader, qdl
and firmware binaries) to an external vendor.tgz package
to be downloaded from:
https://releases.linaro.org/android/aosp-linaro-vendor-package/extract-linaro_devices-20220106.tgz
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES build flag is
used to copy a few vendor firmware files to ramdisk or
vendor_ramdisk to work-around the dependency of their
drivers on FW_LOADER_USER_HELPER_FALLBACK kernel config.
And for that we needed to bump up the boot and vendor_boot
partition sizes as well.
Also folded John's installer script changes into this patch.
Change-Id: I1b46ee17f4a218c735e2ac8d81759364b3bf7332
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
[Reworked to handle versioned vendor/linaro/<dev> paths]
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/installer/rb5/recovery.sh b/installer/rb5/recovery.sh
index 5541209..156a16d 100755
--- a/installer/rb5/recovery.sh
+++ b/installer/rb5/recovery.sh
@@ -2,31 +2,30 @@
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"
+ ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`"
fi
-if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
- echo "RECOVERY: error in locating out directory, check if it exist"
- exit
-fi
+. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
-echo "android out dir:${ANDROID_PRODUCT_OUT}"
+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 "${INSTALLER_DIR}/${FIRMWARE_DIR}/" ]; then
- echo "RECOVERY: No firmware directory? Make sure binaries have been provided"
+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
-pushd "${INSTALLER_DIR}/${FIRMWARE_DIR}" > /dev/null
-sudo "${QDL}" prog_firehose_ddr.elf rawprogram?.xml patch?.xml
+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