[U-Boot] [PATCH v5 1/1] cmd: part: Add 'number' sub-command

Tom Rini trini at konsulko.com
Wed Jul 24 20:05:55 UTC 2019


On Fri, Jun 14, 2019 at 05:01:26PM +0300, Igor Opaniuk wrote:

> From: Ruslan Trofymenko <ruslan.trofymenko at linaro.org>
> 
> This sub-command serves for getting the partition index from
> partition name. Also it can be used to test the existence of specified
> partition.
> 
> Use case:
> For example, in most CI environments 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}
> 
> Signed-off-by: Ruslan Trofymenko <ruslan.trofymenko at linaro.org>
> Signed-off-by: Igor Opaniuk <igor.opaniuk at gmail.com>
> Reviewed-by: Alistair Strachan <astrachan at google.com>
> Reviewed-by: Sam Protsenko <semen.protsenko at linaro.org>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Reviewed-by: Sam Protsenko <semen.protsenko at linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190724/8f62a61e/attachment.sig>


More information about the U-Boot mailing list