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/db845c/recovery.sh b/installer/db845c/recovery.sh
index 20fd45c..e345f3e 100755
--- a/installer/db845c/recovery.sh
+++ b/installer/db845c/recovery.sh
@@ -2,31 +2,31 @@
INSTALLER_DIR="`dirname ${0}`"
-QDL="`readlink -f ${INSTALLER_DIR}/qdl`"
-FIRMWARE_DIR="dragonboard-845c-bootloader-ufs-aosp"
-
# for cases that don't run "lunch db845c-userdebug"
if [ -z "${ANDROID_BUILD_TOP}" ]; then
- ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../
- ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/db845c"
+ 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
-echo "android out dir:${ANDROID_PRODUCT_OUT}"
+. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
+
+FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/db845c/${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[012345].xml patch[012345].xml
+QDL="`readlink -f ${FIRMWARE_DIR}/qdl/qdl`"
+
+pushd "${FIRMWARE_DIR}/dragonboard-845c-bootloader-ufs-aosp" > /dev/null
+echo "RECOVERY: Running QDL board recovery tool"
+sudo ${QDL} prog_firehose_ddr.elf rawprogram[012345].xml patch[012345].xml
popd > /dev/null
echo