[PATCH v2 4/4] doc: fastboot: Document block device selection syntax
Simon Glass
sjg at chromium.org
Tue Apr 28 20:22:51 CEST 2026
Hi Balaji,
On 2026-04-27T12:06:41, Balaji Selvanathan
<balaji.selvanathan at oss.qualcomm.com> wrote:
> doc: fastboot: Document block device selection syntax
>
> Add documentation for the device selection syntax in fastboot
> block device operations. Users can now specify target devices
> using 'N:partition' format where N is the device number.
>
> Document usage examples for regular partition operations like
> "fastboot flash 0:boot boot.img" and partition table operations
> like "fastboot flash 1:gpt gpt.img". When no device number is
> specified, the default from CONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID
> is used.
>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek at kernel.org>
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
>
> doc/android/fastboot.rst | 41 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
> diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
> @@ -147,6 +147,38 @@ The Fastboot implementation in U-Boot allows to write images into disk
> partitions. Target partitions are referred on the host computer by
> their names.
>
> +Device Selection for Block Devices
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Other subsection headings in this file use sentence case ('USB
configuration', 'Partition aliases', etc). Please rename to 'Device
selection for block devices' to match - and likewise 'Partition name
formats' below.
> diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
> @@ -186,6 +218,15 @@ configuration options:
> CONFIG_FASTBOOT_GPT_NAME
> CONFIG_FASTBOOT_MBR_NAME
>
> +When using block devices (`FASTBOOT_FLASH_BLOCK), you can specify the target
> +device by prefixing with the device number::
> +
> + fastboot flash 0:gpt gpt.img # Write GPT to device 0
> + fastboot flash 1:mbr mbr.img # Write MBR to device 1
> +
> +If no device number is specified, the default device from
> +CONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID is used.
This duplicates what was added a few paragraphs up in 'Device
Selection for Block Devices' (same '0:gpt'/'1:mbr' examples and the
same default-device sentence). How about dropping this block and
adding a one-liner cross-reference, e.g. 'See above for the
N:partition syntax when using FASTBOOT_FLASH_BLOCK'.
> diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
> @@ -147,6 +147,38 @@ The Fastboot implementation in U-Boot allows to write images into disk
> +This syntax is supported for:
> +
> +* Regular partition flashing
> +* GPT partition table updates (gpt or N:gpt)
> +* MBR partition table updates (mbr or N:mbr`)
> +* Partition erasing operations
Just to check, does erase actually go through the same parser? It does
today via fastboot_block_get_part_info(), but worth confirming it's
exercised since the commit message only mentions flash.
Regards,
Simon
More information about the U-Boot
mailing list