u-boot/arch/sandbox
Tom Rini 4595600007 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:
84cceb912b

[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
2024-07-18 17:03:47 -06:00
..
cpu sandbox: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
dts bootstd: Add test for bootmeth_android 2024-07-18 13:51:30 -06:00
include/asm sandbox: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
lib sandbox: cleanup linker scripts and sections 2024-07-03 07:36:33 +01:00
config.mk efi_loader: move HOST_ARCH to version_autogenerated.h 2024-04-08 13:04:48 +02:00
Kconfig sandbox: improve description of CONFIG_SANDBOX_CRASH_RESET 2024-04-12 08:53:31 -06:00
Makefile sandbox: fix build failure with musl and SDL 2022-02-09 12:26:12 -07:00