[U-Boot] [PATCH V2 4/4] cmd_part: add partition-related command

Stephen Warren swarren at wwwdotorg.org
Fri Sep 7 21:42:25 CEST 2012


On 09/05/2012 05:58 PM, Tom Rini wrote:
> On Wed, Sep 05, 2012 at 06:51:58PM -0500, Rob Herring wrote:
>> On 09/05/2012 05:03 PM, Stephen Warren wrote:
>>> From: Stephen Warren <swarren at nvidia.com>
>>>
>>> This implements the following:
>>>
>>> part uuid mmc 0:1
>>>   -> print partition UUID
>>> part uuid mmc 0:1 uuid
>>>   -> set environment variable to partition UUID
>>
>> What's the reason to not always both print out and set the uuid env var?
>>
>> Perhaps the env name should be partuuid or part_uuid as you could have
>> uuid's for other purposes?
>>
>>>
>>> This can be useful when writing a bootcmd which searches all known
>>> devices for something bootable, and then wants the kernel to use the
>>> same partition as the root device, e.g.:
>>>
>>> part uuid ${devtype} ${devnum}:${rootpart} uuid
>>> setenv bootargs root=PARTUUID=${uuid} ...
>>>
>>> It is expected that further part sub-commands will be added later, e.g.
>>> to find which partition on a disk is marked bootable, to write new
>>> partition tables to disk, etc.
>>
>> A list command would be useful and would be better located here than
>> under scsi or other interface commands. Perhaps instead of printing a
>> single part uuid, you should make a list command that prints all
>> partitions and their UUIDs. That would address my first question.
> 
> Sounds like a good idea to me as well.

In order to avoid too much feature creep in this patch-set, would it be
OK to implement a "part list" command that simply calls print_part(),
without changing what print_part() does right now, and then later send
patches to enhance print_part() to print the various partition UUIDs and
attributes?

>>> v2: validate that CONFIG_PARTITION_UUID is defined when CONFIG_CMD_PART is
>>>
>>> Note: If Rob Herring's proposed patch "disk/part: introduce
>>> get_device_and_partition" is applied, the body of do_partuuid() should
>>> be reworked to use Rob's new function get_device_and_partition().
> 
> I think the best idea here would be to make the next version just depend
> on Rob's series.

OK. Is it fairly certain that Rob's patches will be accepted then? There
hasn't been much feedback on them...

Rob, it sounds like we agreed to change the default partition
specification to use "auto" to mean "select a default partition". Were
you going to repost for that, or do you want me to make the modifications?

Thanks.


More information about the U-Boot mailing list