Mattijs Korpershoek | b30baa9 | 2024-07-10 10:40:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Bootmethod for Android |
| 4 | * |
| 5 | * Copyright (C) 2024 BayLibre, SAS |
| 6 | * Written by Mattijs Korpershoek <mkorpershoek@baylibre.com> |
| 7 | */ |
| 8 | |
| 9 | enum android_boot_mode { |
| 10 | ANDROID_BOOT_MODE_NORMAL = 0, |
| 11 | |
| 12 | /* |
| 13 | * Android "recovery" is a special boot mode that uses another ramdisk. |
| 14 | * It can be used to "factory reset" a board or to flash logical partitions |
| 15 | * It operates in 2 modes: adb or fastbootd |
| 16 | * To enter recovery from Android, we can do: |
| 17 | * $ adb reboot recovery |
| 18 | * $ adb reboot fastboot |
| 19 | */ |
| 20 | ANDROID_BOOT_MODE_RECOVERY, |
| 21 | |
| 22 | /* |
| 23 | * Android "bootloader" is for accessing/reflashing physical partitions |
| 24 | * Typically, this will launch a fastboot process in U-Boot. |
| 25 | * To enter "bootloader" from Android, we can do: |
| 26 | * $ adb reboot bootloader |
| 27 | */ |
| 28 | ANDROID_BOOT_MODE_BOOTLOADER, |
| 29 | }; |