summaryrefslogtreecommitdiff
path: root/installer/rb5/flash-all-aosp.sh
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2021-11-18 14:59:17 +0530
committerJohn Stultz <john.stultz@linaro.org>2022-01-14 00:26:03 +0000
commitfbd3fbbd53128af13d41ed94d4d47f3c782a7b28 (patch)
treeccb254dfcb7d11a1207ae6e0269e0cc12dc8bae2 /installer/rb5/flash-all-aosp.sh
parent46a01ce97449e3882f61aaf7b28dc48927b6a661 (diff)
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>
Diffstat (limited to 'installer/rb5/flash-all-aosp.sh')
-rwxr-xr-xinstaller/rb5/flash-all-aosp.sh25
1 files changed, 17 insertions, 8 deletions
diff --git a/installer/rb5/flash-all-aosp.sh b/installer/rb5/flash-all-aosp.sh
index 9eea95b..28eb0e4 100755
--- a/installer/rb5/flash-all-aosp.sh
+++ b/installer/rb5/flash-all-aosp.sh
@@ -2,32 +2,38 @@
INSTALLER_DIR="`dirname ${0}`"
-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_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`"
ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/rb5"
fi
if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
- echo "FLASH-ALL-AOSP: error in locating out/target directory, check if it exist"
+ echo "FLASH-ALL-AOSP: error in locating ${ANDROID_PRODUCT_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/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 "FLASH-ALL-AOSP: No firmware directory? Make sure binaries have been provided"
+if [ ! -d "${FIRMWARE_DIR}/" ]; then
+ echo "FLASH-ALL-AOSP: 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
+pushd "${FIRMWARE_DIR}/rb5-bootloader-ufs-aosp" > /dev/null
+echo "FLASH-ALL-AOSP: Flash bootloader images"
./flashall
popd > /dev/null
+echo "android out dir:${ANDROID_PRODUCT_OUT}"
+
echo "FLASH-ALL-AOSP: Flash boot img"
fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img
echo "FLASH-ALL-AOSP: Flash super/dynamic image"
@@ -39,9 +45,12 @@ fastboot flash vendor_boot "${ANDROID_PRODUCT_OUT}"/vendor_boot.img
echo "FLASH-ALL-AOSP: Formatting metadata"
fastboot format:ext4 metadata
+echo "FLASH-ALL-AOSP: Rebooting"
fastboot reboot
echo "FLASH-ALL-AOSP: Updating lt9611uxc firmware version"
+echo " Waiting for adb.."
+echo
adb wait-for-device
VERSION=`adb shell su 0 cat /sys/bus/i2c/devices/5-002b/lt9611uxc_firmware`
if [ "$VERSION" -lt "43" ] ; then