Merge patch series "bootstd: Add Android support"
Mattijs Korpershoek <mkorpershoek@baylibre.com> says: Android boot flow is a bit different than a regular Linux distro. Android relies on multiple partitions in order to boot. A typical boot flow would be: 1. Parse the Bootloader Control Block (BCB, misc partition) 2. If BCB requested bootonce-bootloader, start fastboot and wait. 3. If BCB requested recovery or normal android, run the following: a. Get slot (A/B) from BCB b. Run AVB (Android Verified Boot) on boot partitions c. Load boot and vendor_boot partitions d. Load device-tree, ramdisk and boot The AOSP documentation has more details at [1], [2], [3] This has been implemented via complex boot scripts such as [4]. However, these boot script are neither very maintainable nor generic. Moreover, DISTRO_DEFAULTS is being deprecated [5]. Add a generic Android bootflow implementation for bootstd. For this initial version, only boot image v4 is supported. This has been tested on sandbox using: $ ./test/py/test.py --bd sandbox --build -k test_ut This has also been tested on the AM62X SK EVM using TI's Android SDK[6] To test on TI board, the following (WIP) patch is needed as well: https://gitlab.baylibre.com/baylibre/ti/ti-u-boot/-/commit/84cceb912bccd7cdd7f9dd69bca0e5d987a1fd04 [1] https://source.android.com/docs/core/architecture/bootloader [2] https://source.android.com/docs/core/architecture/partitions [3] https://source.android.com/docs/core/architecture/partitions/generic-boot [4] https://source.denx.de/u-boot/u-boot/-/blob/master/include/configs/meson64_android.h [5] https://lore.kernel.org/r/all/20230914165615.1058529-17-sjg@chromium.org/ [6] https://software-dl.ti.com/processor-sdk-android/esd/AM62X/09_02_00/docs/android/Overview.html
No related branches found
No related tags found
Showing
- MAINTAINERS 7 additions, 0 deletionsMAINTAINERS
- arch/sandbox/dts/test.dts 8 additions, 0 deletionsarch/sandbox/dts/test.dts
- boot/Kconfig 17 additions, 0 deletionsboot/Kconfig
- boot/Makefile 2 additions, 0 deletionsboot/Makefile
- boot/bootflow.c 12 additions, 0 deletionsboot/bootflow.c
- boot/bootmeth_android.c 553 additions, 0 deletionsboot/bootmeth_android.c
- boot/bootmeth_android.h 29 additions, 0 deletionsboot/bootmeth_android.h
- boot/image-android.c 5 additions, 0 deletionsboot/image-android.c
- boot/image-fdt.c 1 addition, 1 deletionboot/image-fdt.c
- cmd/abootimg.c 10 additions, 0 deletionscmd/abootimg.c
- configs/sandbox_defconfig 1 addition, 1 deletionconfigs/sandbox_defconfig
- doc/develop/bootstd.rst 6 additions, 0 deletionsdoc/develop/bootstd.rst
- include/bootflow.h 9 additions, 0 deletionsinclude/bootflow.h
- include/image.h 14 additions, 0 deletionsinclude/image.h
- test/boot/bootflow.c 65 additions, 3 deletionstest/boot/bootflow.c
- test/py/tests/test_ut.py 79 additions, 0 deletionstest/py/tests/test_ut.py
Loading
Please register or sign in to comment