From: Tom Rini Date: Wed, 5 Sep 2012 16:58:00 -0700 Subject: [U-Boot] [PATCH V2 4/4] cmd_part: add partition-related command In-Reply-To: <5047E59E.8060503@gmail.com> References: <1346882624-12783-1-git-send-email-swarren@wwwdotorg.org> <1346882624-12783-4-git-send-email-swarren@wwwdotorg.org> <5047E59E.8060503@gmail.com> Message-ID: <20120905235800.GC6780@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > > > 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 > > --- > > 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