summaryrefslogtreecommitdiff
path: root/installer/hikey960/uefi-flash-all.sh
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:02:55 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:02:55 +0000
commit73c92a64f58ac5df928b292fd2937a71963fb54f (patch)
tree90aacb633d142c11c6922b13965018a37799de0e /installer/hikey960/uefi-flash-all.sh
parent0f093620bf86767800575bbd7644fde3c29963b1 (diff)
parent9f8b1d25aaf497ac7a04690a235050323519aecb (diff)
downloadhikey-android13-mainline-ipsec-release.tar.gz
Snap for 8570526 from 9f8b1d25aaf497ac7a04690a235050323519aecb to mainline-ipsec-releaseaml_ips_331910010aml_ips_331312000aml_ips_331310000aml_ips_331111030aml_ips_331014020android13-mainline-ipsec-release
Change-Id: Ifa10d59a1723a844b9c0cc7b6477c757815f6542
Diffstat (limited to 'installer/hikey960/uefi-flash-all.sh')
-rwxr-xr-xinstaller/hikey960/uefi-flash-all.sh76
1 files changed, 0 insertions, 76 deletions
diff --git a/installer/hikey960/uefi-flash-all.sh b/installer/hikey960/uefi-flash-all.sh
deleted file mode 100755
index fe42486c..00000000
--- a/installer/hikey960/uefi-flash-all.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-
-INSTALLER_DIR="`dirname ${0}`"
-ECHO_PREFIX="=== "
-
-# for cases that don't run "lunch hikey960-userdebug"
-if [ -z "${ANDROID_BUILD_TOP}" ]; then
- ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../
- ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/hikey960"
-fi
-
-if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
- echo ${ECHO_PREFIX}"error in locating out directory, check if it exist"
- exit
-fi
-
-echo ${ECHO_PREFIX}"android out dir:${ANDROID_PRODUCT_OUT}"
-
-function check_partition_table_version () {
- fastboot erase reserved
- if [ $? -eq 0 ]
- then
- IS_PTABLE_1MB_ALIGNED=true
- else
- IS_PTABLE_1MB_ALIGNED=false
- fi
-}
-
-function flashing_atf_uefi () {
- fastboot flash ptable "${INSTALLER_DIR}"/prm_ptable.img
- fastboot flash xloader "${INSTALLER_DIR}"/hisi-sec_xloader.img
- fastboot reboot-bootloader
-
- fastboot flash fastboot "${INSTALLER_DIR}"/l-loader.bin
- fastboot flash fip "${INSTALLER_DIR}"/fip.bin
- fastboot flash nvme "${INSTALLER_DIR}"/hisi-nvme.img
- fastboot flash fw_lpm3 "${INSTALLER_DIR}"/hisi-lpm3.img
- fastboot flash trustfirmware "${INSTALLER_DIR}"/hisi-bl31.bin
- fastboot reboot-bootloader
-
- fastboot flash ptable "${INSTALLER_DIR}"/prm_ptable.img
- fastboot flash xloader "${INSTALLER_DIR}"/hisi-sec_xloader.img
- fastboot flash fastboot "${INSTALLER_DIR}"/l-loader.bin
- fastboot flash fip "${INSTALLER_DIR}"/fip.bin
-
- fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img
- fastboot flash system "${ANDROID_PRODUCT_OUT}"/system.img
- fastboot flash vendor "${ANDROID_PRODUCT_OUT}"/vendor.img
- fastboot flash cache "${ANDROID_PRODUCT_OUT}"/cache.img
- fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img
-}
-
-function upgrading_ptable_1mb_aligned () {
- fastboot flash xloader "${INSTALLER_DIR}"/hisi-sec_xloader.img
- fastboot flash ptable "${INSTALLER_DIR}"/hisi-ptable.img
- fastboot flash fastboot "${INSTALLER_DIR}"/hisi-fastboot.img
- fastboot reboot-bootloader
-}
-
-echo ${ECHO_PREFIX}"Checking partition table version..."
-check_partition_table_version
-
-if [ "${IS_PTABLE_1MB_ALIGNED}" == "true" ]
-then
- echo ${ECHO_PREFIX}"Partition table is 1MB aligned. Flashing ATF/UEFI..."
- flashing_atf_uefi
-else
- echo ${ECHO_PREFIX}"Partition table is 512KB aligned."
- echo ${ECHO_PREFIX}"Upgrading to 1MB aligned version..."
- upgrading_ptable_1mb_aligned
- echo ${ECHO_PREFIX}"Flasing ATF/UEFI..."
- flashing_atf_uefi
- echo ${ECHO_PREFIX}"Done"
-fi
-
-fastboot reboot