[U-Boot] [PATCH V2 4/4] cmd_part: add partition-related command
Tom Rini
trini at ti.com
Thu Sep 6 01:58:00 CEST 2012
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.
[snip]
> > Signed-off-by: Stephen Warren <swarren at nvidia.com>
> > ---
> > 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.
--
Tom
More information about the U-Boot
mailing list