diff mbox series

[9/9] fastboot: Document alternate partition names

Message ID 20201231224853.1431364-10-sean.anderson@seco.com
State Superseded
Delegated to: Tom Rini
Headers show
Series This series adds support for flashing eMMC boot partitions, and for | expand

Commit Message

Sean Anderson Dec. 31, 2020, 10:48 p.m. UTC
This documents the new partition names added in the previous commit.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

 doc/android/fastboot.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Heinrich Schuchardt Jan. 1, 2021, 12:36 a.m. UTC | #1
On 12/31/20 11:48 PM, Sean Anderson wrote:
> This documents the new partition names added in the previous commit.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
>   doc/android/fastboot.rst | 28 ++++++++++++++++++++++++++++
>   1 file changed, 28 insertions(+)
>
> diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
> index 2877c3cbaa..2ca80ae844 100644
> --- a/doc/android/fastboot.rst
> +++ b/doc/android/fastboot.rst
> @@ -151,6 +151,34 @@ The device index starts from ``a`` and refers to the interface (e.g. USB
>   controller, SD/MMC controller) or disk index. The partition index starts
>   from ``1`` and describes the partition number on the particular device.
>
> +
> +Alternate Partition Names
> +^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Partitions may also be specified like::
> +
> +    devnum.hwpartnum#partname

Thank you for getting this all documented.

Don't we need the interface (mmc), too?

> +
> +or like::
> +
> +    devnum.hwpartnum:partnum

I think this is the wrong place to document how partitions are addressed
as it is not Android specific. I would prefer a sub-chapter of doc/usage/.

Cf.
https://u-boot.readthedocs.io/en/latest/usage/index.html

Best regards

Heinrich

> +
> +Where
> +
> +  * ``devnum`` is the MMC device number. This defaults to 0.
> +  * ``hwpartnum`` is the hardware partition number. This defaults to 0 (the user
> +    partition on eMMC devices).
> +  * ``partname`` is the partition name on GPT devices. Partitions do not have
> +    names on MBR devices.
> +  * ``partnum`` is the partition number, starting from 1. The partition number 0
> +    is special, and specifies that the whole device is to be used as one
> +    "partition."
> +
> +If neither ``partname`` nor ``partnum`` is specified and there is a partition
> +table, then partition 1 is used. If there is no partition table, then the whole
> +device is used as one "partion." Examples of alternate partition names include
> +``0.1``, ``0#boot``, and ``:3``.
> +
>   Writing Partition Table
>   -----------------------
>
>
Sean Anderson Jan. 1, 2021, 1:54 a.m. UTC | #2
On 12/31/20 7:36 PM, Heinrich Schuchardt wrote:
> On 12/31/20 11:48 PM, Sean Anderson wrote:
>> This documents the new partition names added in the previous commit.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
>> ---
>>
>>   doc/android/fastboot.rst | 28 ++++++++++++++++++++++++++++
>>   1 file changed, 28 insertions(+)
>>
>> diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
>> index 2877c3cbaa..2ca80ae844 100644
>> --- a/doc/android/fastboot.rst
>> +++ b/doc/android/fastboot.rst
>> @@ -151,6 +151,34 @@ The device index starts from ``a`` and refers to the interface (e.g. USB
>>   controller, SD/MMC controller) or disk index. The partition index starts
>>   from ``1`` and describes the partition number on the particular device.
>>
>> +
>> +Alternate Partition Names
>> +^^^^^^^^^^^^^^^^^^^^^^^^^
>> +
>> +Partitions may also be specified like::
>> +
>> +    devnum.hwpartnum#partname
> 
> Thank you for getting this all documented.
> 
> Don't we need the interface (mmc), too?

No. At the moment only mmc is supported. I suppose I could build in some
forward-compatibility and have something like

     iface,devnum.hwpartnum#partname

It should be relatively easy to extend the MMC code to be block-generic,
but it's out of scope for this series.

> 
>> +
>> +or like::
>> +
>> +    devnum.hwpartnum:partnum
> 
> I think this is the wrong place to document how partitions are addressed
> as it is not Android specific. I would prefer a sub-chapter of doc/usage/.

Sure. Though atm only fastboot and android a/b uses the #partname syntax
as far as I can tell.

--Sean

> 
> Cf.
> https://u-boot.readthedocs.io/en/latest/usage/index.html
> 
> Best regards
> 
> Heinrich
> 
>> +
>> +Where
>> +
>> +  * ``devnum`` is the MMC device number. This defaults to 0.
>> +  * ``hwpartnum`` is the hardware partition number. This defaults to 0 (the user
>> +    partition on eMMC devices).
>> +  * ``partname`` is the partition name on GPT devices. Partitions do not have
>> +    names on MBR devices.
>> +  * ``partnum`` is the partition number, starting from 1. The partition number 0
>> +    is special, and specifies that the whole device is to be used as one
>> +    "partition."
>> +
>> +If neither ``partname`` nor ``partnum`` is specified and there is a partition
>> +table, then partition 1 is used. If there is no partition table, then the whole
>> +device is used as one "partion." Examples of alternate partition names include
>> +``0.1``, ``0#boot``, and ``:3``.
>> +
>>   Writing Partition Table
>>   -----------------------
>>
>>
>
Simon Glass Jan. 7, 2021, 12:36 p.m. UTC | #3
On Thu, 31 Dec 2020 at 15:49, Sean Anderson <sean.anderson@seco.com> wrote:
>
> This documents the new partition names added in the previous commit.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
>  doc/android/fastboot.rst | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

(for content, not location)
diff mbox series

Patch

diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
index 2877c3cbaa..2ca80ae844 100644
--- a/doc/android/fastboot.rst
+++ b/doc/android/fastboot.rst
@@ -151,6 +151,34 @@  The device index starts from ``a`` and refers to the interface (e.g. USB
 controller, SD/MMC controller) or disk index. The partition index starts
 from ``1`` and describes the partition number on the particular device.
 
+
+Alternate Partition Names
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Partitions may also be specified like::
+
+    devnum.hwpartnum#partname
+
+or like::
+
+    devnum.hwpartnum:partnum
+
+Where
+
+  * ``devnum`` is the MMC device number. This defaults to 0.
+  * ``hwpartnum`` is the hardware partition number. This defaults to 0 (the user
+    partition on eMMC devices).
+  * ``partname`` is the partition name on GPT devices. Partitions do not have
+    names on MBR devices.
+  * ``partnum`` is the partition number, starting from 1. The partition number 0
+    is special, and specifies that the whole device is to be used as one
+    "partition."
+
+If neither ``partname`` nor ``partnum`` is specified and there is a partition
+table, then partition 1 is used. If there is no partition table, then the whole
+device is used as one "partion." Examples of alternate partition names include
+``0.1``, ``0#boot``, and ``:3``.
+
 Writing Partition Table
 -----------------------