Amit Pundir | 697d566 | 2023-10-19 13:09:12 +0530 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | INSTALLER_DIR="`dirname ${0}`" |
| 4 | |
Amit Pundir | e0b34ce | 2023-10-19 18:29:28 +0530 | [diff] [blame] | 5 | # for cases that don't run "lunch linaro_hikey960-userdebug" |
Amit Pundir | 697d566 | 2023-10-19 13:09:12 +0530 | [diff] [blame] | 6 | if [ -z "${ANDROID_BUILD_TOP}" ]; then |
| 7 | ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../ |
Amit Pundir | e0b34ce | 2023-10-19 18:29:28 +0530 | [diff] [blame] | 8 | ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/linaro_hikey960" |
Amit Pundir | 697d566 | 2023-10-19 13:09:12 +0530 | [diff] [blame] | 9 | fi |
| 10 | |
| 11 | if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then |
| 12 | echo "error in locating out directory, check if it exist" |
| 13 | exit |
| 14 | fi |
| 15 | |
| 16 | echo "android out dir:${ANDROID_PRODUCT_OUT}" |
| 17 | |
| 18 | fastboot flash xloader "${INSTALLER_DIR}"/hisi-sec_xloader.img |
| 19 | fastboot flash ptable "${INSTALLER_DIR}"/hisi-ptable.img |
| 20 | fastboot flash fastboot "${INSTALLER_DIR}"/hisi-fastboot.img |
| 21 | fastboot reboot-bootloader |
| 22 | fastboot flash nvme "${INSTALLER_DIR}"/hisi-nvme.img |
| 23 | fastboot flash fw_lpm3 "${INSTALLER_DIR}"/hisi-lpm3.img |
| 24 | fastboot flash trustfirmware "${INSTALLER_DIR}"/hisi-bl31.bin |
| 25 | fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img |
| 26 | fastboot flash dts "${ANDROID_PRODUCT_OUT}"/dt.img |
| 27 | fastboot flash super "${ANDROID_PRODUCT_OUT}"/super.img |
| 28 | fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img |
| 29 | fastboot format:ext4:10000000 cache |
| 30 | fastboot reboot |