u-boot/doc
Mattijs Korpershoek 125d9f3306 bootstd: Add a bootmeth for Android
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:
3.a. Get slot (A/B) from BCB
3.b. Run AVB (Android Verified Boot) on boot partitions
3.c. Load boot and vendor_boot partitions
3.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.

[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/

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Tested-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-07-18 13:51:30 -06:00
..
android Merge tag 'u-boot-dfu-20240419' of https://source.denx.de/u-boot/custodians/u-boot-dfu 2024-04-19 07:28:24 -06:00
api riscv: allow resume after exception 2023-11-02 16:22:06 +08:00
arch doc: arch: arm64: describe pagetable debugging 2024-06-25 17:22:30 -06:00
board doc: board: phytec: phycore-am6: Describe UART based boot 2024-07-05 13:57:01 -06:00
build doc: build: fix gen_compile_commands section level 2024-04-13 11:03:12 +02:00
chromium doc: Replace examples of MD5 and SHA1 with SHA256 2023-12-17 13:06:48 +01:00
develop bootstd: Add a bootmeth for Android 2024-07-18 13:51:30 -06:00
device-tree-bindings arm: exynos: Migrate E850-96 board to OF_UPSTREAM 2024-05-28 11:45:09 +09:00
imx imx: hab: add documentation about the required keys/certs 2024-05-24 11:33:15 -03:00
learn doc: Add a short intro video 2023-10-12 08:32:27 +02:00
media
mvebu
sphinx doc: update requirements.txt 2024-06-30 13:58:31 +02:00
sphinx-static doc: import Sphinx theme.css and pygments.css 2024-01-17 08:40:19 +01:00
SPI doc: board: ti: Move documentation from README to .rst 2023-09-09 06:12:47 +02:00
SPL global: Use proper project name U-Boot 2023-06-12 13:24:31 +02:00
usage Merge branch 'next' 2024-07-01 15:00:56 -06:00
.gitignore
bounces
conf.py doc: add sphinx_rtd_theme extension 2024-01-17 08:40:19 +01:00
dumpimage.1
feature-removal-schedule.txt
genindex.rst doc: add generated index to table of contents 2024-01-17 08:40:19 +01:00
git-mailrc git-mailrc: Add renesas entry and update rmobile entry 2024-03-02 14:29:37 -05:00
I2C_Edge_Conditions
index.rst doc: add generated index to table of contents 2024-01-17 08:40:19 +01:00
kwboot.1
Makefile
mkeficapsule.1 mkeficapsule: add FMP Payload Header 2023-06-08 09:20:36 +02:00
mkfwumdata.1 tools: mkfwumdata: add logic to append vendor data to the FWU metadata 2024-05-24 13:40:04 -06:00
mkimage.1 Revert "mkimage: update man page and -h output" 2023-10-11 15:32:39 -04:00
README.arm-caches
README.arm-relocation
README.armada-secureboot
README.asn1
README.atmel_mci
README.atmel_pmecc
README.autoboot
README.bcmns3
README.bitbangMII
README.bootcount
README.boston
README.cfi
README.commands.itest
README.commands.spl
README.console
README.davinci tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
README.davinci.nand_spl
README.dfutftp
README.displaying-bmps
README.dns
README.enetaddr
README.esbc_validate
README.ext4
README.fec_mxc
README.fsl-ddr
README.fsl-esdhc
README.fsl-hwconfig
README.fsl-trustzone-components
README.fsl_iim
README.fuse
README.generic-board
README.generic_usb_ohci
README.gpio
README.gpt
README.Heterogeneous-SoCs
README.hwconfig
README.i2c
README.iomux
README.JFFS2_NAND
README.kconfig
README.kwbimage
README.LED
README.link-local
README.malta
README.marvell
README.mediatek
README.memory-test
README.mpc83xx.ddrecc
README.mpc83xxads
README.mpc85xx
README.mpc85xx-sd-spi-boot
README.mpc85xx-spin-table
README.mpc85xxcds
README.multi-dtb-fit
README.mxc_ocotp
README.nand
README.odroid
README.OFT
README.omap-ulpi-viewport
README.omap3 tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
README.pblimage
README.pcap global: Use proper project name U-Boot 2023-06-12 13:24:31 +02:00
README.POST post: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:25 -04:00
README.power-framework
README.pxe
README.ramboot-ppc85xx
README.rockchip doc: rockchip: Update and improve info on rk3308, TPL and TF-A 2023-10-07 16:49:41 +08:00
README.rockusb
README.s5p4418 global: Use proper project name U-Boot 2023-06-12 13:24:31 +02:00
README.s5pc1xx
README.sata
README.sched
README.scrapyard
README.serial_dt_baud serial: zynqmp: Fetch baudrate from dtb and update 2023-11-07 13:47:08 +01:00
README.serial_multi
README.silent
README.SNTP
README.socfpga
README.splashprepare
README.srio-pcie-boot-corenet
README.standalone
README.t1040-l2switch
README.tee
README.TPL
README.ubi
README.ubispl
README.ublimage
README.udp
README.unaligned-memory-access.txt
README.uniphier
README.update
README.usb
README.vf610
README.video
README.VLAN
README.VSC3316-3308
README.watchdog
README.zfs

This patch series adds support for ZFS listing and load to u-boot.

To Enable zfs ls and load commands, modify the board specific config file with
#define CONFIG_CMD_ZFS

Steps to test:

1. After applying the patch, zfs specific commands can be seen
   in the boot loader prompt using
	UBOOT #help

	zfsload- load binary file from a ZFS file system
	zfsls  - list files in a directory (default /)

2. To list the files in zfs pool, device or partition, execute
	zfsls <interface> <dev[:part]> [POOL/@/dir/file]
	For example:
	UBOOT #zfsls mmc 0:5 /rpool/@/usr/bin/

3. To read and load a file from an ZFS formatted partition to RAM, execute
	zfsload <interface> <dev[:part]> [addr] [filename] [bytes]
	For example:
	UBOOT #zfsload mmc 2:2 0x30007fc0 /rpool/@/boot/uImage

References :
	-- ZFS GRUB sources from Solaris GRUB-0.97
	-- GRUB Bazaar repository

Jorgen Lundman <lundman at lundman.net> 2012.