From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 9/9] fastboot: Partition specification
Date: Mon, 1 Feb 2021 17:38:40 -0500 [thread overview]
Message-ID: <91ed55d1-933b-030e-ed5d-c7f8317aedba@gmail.com> (raw)
In-Reply-To: <6c9904fb-a800-e97e-1fe6-6b68ab527a48@gmx.de>
On 2/1/21 5:30 PM, Heinrich Schuchardt wrote:
> On 01.02.21 17:43, Sean Anderson wrote:
>> This documents the way U-Boot understands partitions specifications.
>> This also updates the fastboot documentation for the changes in the
>> previous commit.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v3:
>> - Rebase onto dfu/master
>>
>> Changes in v2:
>> - Move partition documentation under doc/usage
>>
>> doc/android/fastboot.rst | 4 ++++
>> doc/usage/index.rst | 1 +
>> doc/usage/part.rst | 33 +++++++++++++++++++++++++++++++++
>> 3 files changed, 38 insertions(+)
>> create mode 100644 doc/usage/part.rst
>>
>> diff --git a/doc/android/fastboot.rst b/doc/android/fastboot.rst
>> index 16b11399b3..ce513a2a0f 100644
>> --- a/doc/android/fastboot.rst
>> +++ b/doc/android/fastboot.rst
>> @@ -154,6 +154,10 @@ 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.
>>
>> +Alternatively, partition types may be specified using :ref:`U-Boot's
>> partition
>> +syntax <partitions>`. This allows specifying partitions like ``0.1``,
>> +``0#boot``, or ``:3``. The interface is always ``mmc``.
>> +
>> Writing Partition Table
>> -----------------------
>>
>> diff --git a/doc/usage/index.rst b/doc/usage/index.rst
>> index 83cfbafd90..9b64434cb2 100644
>> --- a/doc/usage/index.rst
>> +++ b/doc/usage/index.rst
>> @@ -6,6 +6,7 @@ Use U-Boot
>>
>> fdt_overlays
>> netconsole
>> + part
>>
>> Shell commands
>> --------------
>> diff --git a/doc/usage/part.rst b/doc/usage/part.rst
>
> There is a part command. That command should be in doc/usage/part.rst.
>
> How about doc/usage/partitions.rst?
Ok. Perhaps commands should be in a subdirectory of doc/usage then? This
will help separate general usage documentation from man pages.
>
>
>> new file mode 100644
>> index 0000000000..e58b529147
>> --- /dev/null
>> +++ b/doc/usage/part.rst
>> @@ -0,0 +1,33 @@
>> +.. SPDX-License-Identifier: GPL-2.0+
>> +.. _partitions:
>> +
>> +Partitions
>> +==========
>> +
>> +Many U-Boot commands allow specifying partitions like::
>> +
>> + some_command <interface> <devnum.hwpartnum:partnum>
>> +
>> +or like::
>> +
>> + some_command <interface> <devnum.hwpartnum#partname
>
> From the above it is not clear what is optional and what can go together.
>
> Is this what you meant:
>
> ::
>
> <command> <interface> <devnum>[.<hwpartnum>][:<partnum>|#<partname>]
Yes. This will work.
>
>> +
>> +Where
>> +
>> + * ``interface`` is the device interface, like ``mmc`` or ``scsi``.
>> For a full
>> + list of supported interfaces, consult the ``if_typename_str`` array in
>> + ``drivers/block/blk-uclass.c``
>> + * ``devnum`` is the device number. This defaults to 0.
>> + * ``hwpartnum`` is the hardware partition number. This defaults to 0
>
> Could you, please, use a text form like:
>
> interface
> the device interface like mmc or scsi ...
>
> devnum
> the device number ...
>
> to match our existing man-pages.
>
> Here interface and devnum will automatically be rendered in bold without
> adding disturbing mark-up. Cf.
> https://u-boot.readthedocs.io/en/latest/usage/for.html
>
>
>> (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 "partition." If none of ``devnum``, ``hwpartnum``,
>> +``partnum``, or ``partname`` is specified, then ``devnum`` defaults to
>> the value
>> +of the ``bootdevice`` environmental variable.
>
> Please, add examples with their interpretation.
Ok.
--Sean
>
> A reference to the part command might be of interest.
>
> Best regards
>
> Heinrich
>
prev parent reply other threads:[~2021-02-01 22:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 16:34 [PATCH v3 0/9] fastboot: Add better support for specifying partitions Sean Anderson
2021-02-01 16:35 ` [PATCH v3 1/9] mmc: sandbox: Add support for writing Sean Anderson
2021-02-01 16:37 ` [PATCH v3 2/9] test: dm: Add test for fastboot mmc partition naming Sean Anderson
2021-02-01 16:38 ` [PATCH v3 3/9] part: Give several functions more useful return values Sean Anderson
2021-02-01 16:38 ` [PATCH v3 4/9] part: Support getting whole disk from part_get_info_by_dev_and_name_or_num Sean Anderson
2021-02-01 16:39 ` [PATCH v3 5/9] part: Support string block devices in part_get_info_by_dev_and_name Sean Anderson
2021-02-01 16:40 ` [PATCH v3 6/9] fastboot: Remove mmcpart argument from raw_part_get_info_by_name Sean Anderson
2021-02-01 16:41 ` [PATCH v3 7/9] fastboot: Move part_get_info_by_name_or_alias after raw_part_get_info_by_name Sean Anderson
2021-02-01 16:42 ` [PATCH v3 8/9] fastboot: Allow u-boot-style partitions Sean Anderson
2021-02-01 16:43 ` [PATCH v3 9/9] fastboot: Partition specification Sean Anderson
2021-02-01 22:30 ` Heinrich Schuchardt
2021-02-01 22:38 ` Sean Anderson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91ed55d1-933b-030e-ed5d-c7f8317aedba@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox