diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2018-03-06 23:36:27 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2018-03-06 23:36:27 +0530 |
commit | e9e87f655086ea95f3f6e37a3523cf869dc545bc (patch) | |
tree | 40d93c48df874b80c8895647fabdb80aff439340 /installer | |
parent | 85a5b8b81841b97ba0d4dcd94c03fc0fff56e01f (diff) |
db410c: Add helper script to flash bootloader and AOSP images
Added flash-all-aosp.sh script to help flash bootloader firmware
files as well as AOSP images. Also added a README file with
instructions on how to boot into fastboot mode for flashing.
Change-Id: Ia55e5eda64646db7e306f7d48f66111ff6313977
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'installer')
-rw-r--r-- | installer/db410c/README | 19 | ||||
-rwxr-xr-x | installer/db410c/flash-all-aosp.sh | 51 |
2 files changed, 70 insertions, 0 deletions
diff --git a/installer/db410c/README b/installer/db410c/README new file mode 100644 index 0000000..3b699b3 --- /dev/null +++ b/installer/db410c/README @@ -0,0 +1,19 @@ +These instructions will help you in flashing the prebuilt bootloader +and AOSP images(built from sources) on db410c. + +To flash the bootloader or AOSP images, first boot into fastboot mode. +Connect a USB Micro-B cable to the OTG port and your HOST device. +Now boot into fastboot mode by pressing and holding S4 button on +db410c while switching "ON" the power and wait for following message + +“fastboot: processing commands” + +on the serial console on startup. Run the flash-all-aosp.sh script on +your Host device to flash boot and AOSP files using fastboot. It +assumes that you have already build db410c AOSP images locally, or are +flashing factory images. + +$ ./flash-all-aosp.sh + +Follow detailed flashing and board recovery instructions here + https://www.96boards.org/documentation/consumer/dragonboard410c/installation/linux-fastboot.md.html diff --git a/installer/db410c/flash-all-aosp.sh b/installer/db410c/flash-all-aosp.sh new file mode 100755 index 0000000..3319612 --- /dev/null +++ b/installer/db410c/flash-all-aosp.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +INSTALLER_DIR="`dirname ${0}`" + +# for cases that don't run "lunch db410c32_only-userdebug" +if [ -z "${ANDROID_BUILD_TOP}" ]; then + ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../ + ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/db410c32_only" +fi + +if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then + echo "error in locating out directory, check if it exist" + exit +fi + +echo "android out dir:${ANDROID_PRODUCT_OUT}" + +# Flash Bootloader firmware files +fastboot flash partition "${INSTALLER_DIR}"/gpt_both0.bin +fastboot flash hyp "${INSTALLER_DIR}"/hyp.mbn +fastboot flash modem "${INSTALLER_DIR}"/NON-HLOS.bin +fastboot flash rpm "${INSTALLER_DIR}"/rpm.mbn +fastboot flash sbl1 "${INSTALLER_DIR}"/sbl1.mbn +fastboot flash tz "${INSTALLER_DIR}"/tz.mbn +fastboot flash aboot "${INSTALLER_DIR}"/emmc_appsboot.mbn +fastboot flash cdt "${INSTALLER_DIR}"/sbc_1.0_8016.bin + +# Android (for some reasons) have bak partition with duplicate.. +fastboot flash sbl1bak "${INSTALLER_DIR}"/sbl1.mbn +fastboot flash hypbak "${INSTALLER_DIR}"/hyp.mbn +fastboot flash rpmbak "${INSTALLER_DIR}"/rpm.mbn +fastboot flash tzbak "${INSTALLER_DIR}"/tz.mbn +fastboot flash abootbak "${INSTALLER_DIR}"/emmc_appsboot.mbn + +# Erase AOSP partition images (not sure if we need to do that explicitly) +fastboot erase boot +fastboot erase recovery +fastboot erase system +fastboot erase userdata +fastboot erase cache +fastboot erase devinfo +fastboot erase persist +fastboot erase sec + +# Flash AOSP images +fastboot reboot-bootloader +fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img +fastboot flash system "${ANDROID_PRODUCT_OUT}"/system.img +fastboot flash cache "${ANDROID_PRODUCT_OUT}"/cache.img +fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img +fastboot reboot |