diff options
Diffstat (limited to 'installer/hikey960/flash-all.sh')
-rwxr-xr-x | installer/hikey960/flash-all.sh | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/installer/hikey960/flash-all.sh b/installer/hikey960/flash-all.sh index c894558c..70bb4328 100755 --- a/installer/hikey960/flash-all.sh +++ b/installer/hikey960/flash-all.sh @@ -5,7 +5,7 @@ ECHO_PREFIX="=== " # for cases that don't run "lunch hikey960-userdebug" if [ -z "${ANDROID_BUILD_TOP}" ]; then - ANDROID_BUILD_TOP=$(cd ${INSTALLER_DIR}/../../../../../; pwd) + ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../ ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/hikey960" fi @@ -16,22 +16,6 @@ fi echo ${ECHO_PREFIX}"android out dir:${ANDROID_PRODUCT_OUT}" -. "${ANDROID_BUILD_TOP}/device/linaro/hikey/vendor-package-ver.sh" - -VENDOR_DIR=$ANDROID_BUILD_TOP/vendor/linaro/hikey960/${EXPECTED_LINARO_VENDOR_VERSION}/ - -# TODO: Pull one-time recovery/qdl path out of standard install -# Flash bootloader firmware files -if [ ! -d "${VENDOR_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 $VENDOR_DIR/bootloader/ - function check_partition_table_version () { fastboot erase reserved if [ $? -eq 0 ] @@ -43,21 +27,21 @@ function check_partition_table_version () { } function flashing_atf_uefi () { - fastboot flash ptable prm_ptable.img - fastboot flash xloader hisi-sec_xloader.img + fastboot flash ptable "${INSTALLER_DIR}"/prm_ptable.img + fastboot flash xloader "${INSTALLER_DIR}"/hisi-sec_xloader.img fastboot reboot-bootloader - fastboot flash fastboot l-loader.bin - fastboot flash fip fip.bin - fastboot flash nvme hisi-nvme.img - fastboot flash fw_lpm3 hisi-lpm3.img - fastboot flash trustfirmware hisi-bl31.bin + 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 prm_ptable.img - fastboot flash xloader hisi-sec_xloader.img - fastboot flash fastboot l-loader.bin - fastboot flash fip fip.bin + 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 super "${ANDROID_PRODUCT_OUT}"/super.img @@ -66,9 +50,9 @@ function flashing_atf_uefi () { } function upgrading_ptable_1mb_aligned () { - fastboot flash xloader hisi-sec_xloader.img - fastboot flash ptable hisi-ptable.img - fastboot flash fastboot hisi-fastboot.img + 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 } @@ -89,4 +73,3 @@ else fi fastboot reboot -popd |