[U-Boot] [PATCH v4 0/2] Extend 'part' cmd and C API to get part info
Igor Opaniuk
igor.opaniuk at gmail.com
Fri Jun 14 13:56:19 UTC 2019
Please ignore this patch-set,
"disk: part: Extend API to get partition info" won't be used and was
sent by by confusion.
I'll re-send a single "cmd: part: Add 'number' sub-command" as v5.
On Fri, Jun 14, 2019 at 4:04 PM Igor Opaniuk <igor.opaniuk at gmail.com> wrote:
>
> This patch-series extends `part` cmd and disk/part C API for getting
> partition info by it's name:
>
> 1. part "number" sub-command serves for getting the partition index from
> partition name. Also it can be used to test the existence of specified
> partition.
>
> 2. Introduces part_get_info_by_dev_and_name_or_num() function which
> allows us to get partition info from its number or name. Partition of
> interest is specified by string like "device_num:partition_number" or
> "device_num#partition_name".
>
> Initially these patches were a part of
> "android: implement A/B boot process" [1] patch-series, but then
> due to multiple requests decided to send it separately, while the
> work on A/B series is still in progress.
>
>
> Use case:
>
> For example, in Linaro Lab this U-Boot command for automatic testing
> of Linux rootfs is used:
>
> => setenv bootpart 1:f
>
> where 0xf is "userdata" partition. But the number of "userdata"
> partition can be changed any time, when partition table is changed.
>
> So it would be nice to get rid of that 0xf magic number and use
> partition name instead, like this:
>
> => part number mmc 1 userdata part_num
> => setenv bootpart 1:${part_num}
>
>
> [1] https://patchwork.ozlabs.org/cover/1044152/
>
> Ruslan Trofymenko (2):
> cmd: part: Add 'number' sub-command
> disk: part: Extend API to get partition info
>
> cmd/part.c | 16 +++++++++++-
> disk/part.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
> include/part.h | 21 ++++++++++++++++
> 3 files changed, 104 insertions(+), 1 deletion(-)
>
> --
> 2.17.1
>
--
Best regards - Freundliche GrĂ¼sse - Meilleures salutations
Igor Opaniuk
mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk
More information about the U-Boot
mailing list