"Das U-Boot" Source Tree
at master 39 lines 1.6 kB view raw
1.. SPDX-License-Identifier: GPL-2.0+: 2 3Android Bootmeth 4================ 5 6Android provides a mechanism for booting its Operating System from eMMC storage, 7described on `source.android.com <https://source.android.com/docs/core/architecture/bootloader>`_. 8 9Android has strong requirements about partitioning layout which are described 10`here <https://source.android.com/docs/core/architecture/partitions>`_. 11Because multiple partitions are required, this bootmeth only operates on whole mmc 12devices which have a valid partition table. 13 14When invoked on a bootdev, this bootmeth searches for the ``misc`` partition in order 15to read the *boot mode*, which can be one of following: 16 17Normal 18 Boot the regular Android Operating System. 19 20Recovery 21 Boot a slimmed down Recovery Operating System. Can be used 22 to factory reset the device or to apply system updates. 23 24Bootloader 25 Stay in U-Boot and wait for fastboot commands from the host. 26 27After the *boot mode* has been determined, this bootmeth will read the *slot suffix* 28from the ``misc`` partition. For details about slots, see 29`the AOSP documentation <https://source.android.com/docs/core/ota/ab#slots>`_. 30 31When both the *boot mode* and the *slot suffix* are known, the bootflow is created. 32 33When the bootflow is booted, the bootmeth reads the kernel, the boot arguments and 34the vendor ramdisk. 35It then boots the kernel using bootm. The relevant devicetree blob is extracted 36from the ``boot`` partition based on the ``adtb_idx`` environment variable. 37 38The compatible string "u-boot,android" is used for the driver. It is present 39if `CONFIG_BOOTMETH_ANDROID` is enabled.