Amit Pundir | ed3f821 | 2019-07-01 18:02:54 +0000 | [diff] [blame] | 1 | These instructions will help you flashing the prebuilt bootloader |
| 2 | and AOSP images(built from sources) on db845c. |
| 3 | |
| 4 | First, you wil need to have first built AOSP for the |
| 5 | db845c-userdebug lunch target. |
| 6 | |
| 7 | |
| 8 | Boot the board into fastboot mode: |
| 9 | ---------------------------------- |
| 10 | The easiest way to boot into fastboot mode is to run something |
| 11 | like "adb reboot bootloader" from the host, or |
| 12 | "reboot bootloader" on the device. However, this |
| 13 | functionality may depend on the software installed on the board |
| 14 | to work, so you may need to manually enter fastboot mode as |
| 15 | follows. |
| 16 | |
| 17 | |
| 18 | To manually enter fastboot mode: |
| 19 | -------------------------------- |
| 20 | * To manually boot the board into fastboot mode, press DOWN arrow |
| 21 | key over serial UART console when restarting the board. |
| 22 | |
| 23 | OR |
| 24 | |
| 25 | * Disconnect the power *and* USB-C cable. Flip the board over, and |
| 26 | while holding down the "VOL-" button plug in the power cable. |
| 27 | Continue holding down the "VOL-" button and tap the "ON/OFF" |
| 28 | button. The board should then boot to fastboot mode. Be sure to |
| 29 | then re-connect the USB-C cable so that you can flash the board. |
| 30 | |
| 31 | If HDMI is plugged in, you should see a text based |
| 32 | "FastBoot Mode" prompt on your screen. Or you can check by running |
| 33 | "fastboot devices" on your host which will print something like: |
| 34 | |
| 35 | $ fastboot devices |
| 36 | c4e1189c fastboot |
| 37 | |
| 38 | |
| 39 | Flash the board: |
| 40 | ---------------- |
| 41 | Once the board is in fastboot mode, you can then flash it by |
| 42 | running the following from the |
| 43 | device/linaro/dragonboard/installer/db845c/ directory: |
| 44 | |
| 45 | $ ./flash-all-aosp.sh <optional_kernel_binary> |
| 46 | |
| 47 | |
| 48 | This will flash the bootloader binaries, AOSP images (userdata.img |
| 49 | and super.img), and will also generate and flash boot.img if kernel |
| 50 | binary (in Image.gz-dtb format) is passed to the script. |
| 51 | |
| 52 | |
| 53 | Troubleshooting: |
| 54 | ---------------- |
| 55 | * Make sure the USB-C cable is connected. As it has to be |
| 56 | removed to fully power the device down, it is easy to forget |
| 57 | to reconnect it! |
| 58 | |
| 59 | * If you cannot get the board into fastboot mode, or for some |
| 60 | reason the flash-all-aosp.sh script does not work, you can do |
| 61 | a full recovery flash of the board using the following |
| 62 | instructions. |
| 63 | |
| 64 | |
| 65 | Recovery: |
| 66 | -------- |
| 67 | First boot into recovery mode. After removing the power cable |
| 68 | and the USB-C cable, connect power while holding the "USB" |
| 69 | button (next to volume buttons near the USB-A ports). While |
| 70 | continuing to hold down the "USB" button, tap the "ON/OFF" |
| 71 | button. Then re-connect USB-C cable. There will be no HDMI |
| 72 | display output in recovery mode, and initially no serial output. |
| 73 | |
| 74 | Then run the recovery script from the |
| 75 | device/linaro/dragonboard/installer/db845c/ directory: |
| 76 | |
| 77 | $ ./recovery.sh |
| 78 | |
| 79 | This will do a recovery flash of the ptable and bootloader |
| 80 | binaries. After it is finished, the board will reboot. |
| 81 | |
| 82 | Depending on the state of the board, it will enter fastboot |
| 83 | or may boot to a previously installed kernel. At that point |
| 84 | you may start again from the top of this document. |