Commit Graph

11 Commits

Author SHA1 Message Date
Stephen Warren 653447b407 part: fix "part list ... -bootable varname" to use hex
Unfortunately U-Boot assumes that almost all numbers are in hex, including
partition numbers passed to e.g. "load". So, the command "part list mmc 0
-bootable devplist" should use hex when writing partition numbers into
$devplist, so they'll be correctly interpreted.

Change-Id: I9a70b19749643876baadb45efbc3decaef8bfee2
Fixes: 0798d6fd41 ("part: Add support for list filtering on bootable partitions")
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2015-12-13 20:22:01 -05:00
Paul Kocialkowski 8607c4f127 common: cmd_part: start and size sub-commands introduction
This introduces the part start and part size sub-commands. The purpose of these
is to store the start block and size of a partition in a variable, given the
device and partition number.

This allows reading raw data that fits a single partition more easily.
For instance, this could be used to figure out the start block and size of a
kernel partition when a partition table is present, given the partition number.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Stephen Warren <swarren@nvidia.com>
[trini: Change "%lx" to LBAF]
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-06-19 16:46:47 -04:00
Paul Kocialkowski a78f78ebeb common: cmd_part: Proper alignment
This fixes a misaligned declaration.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-06-19 16:46:47 -04:00
maxin.john@enea.com 8ca584ecfb cmd_part: fix usage text
Fix the usage info from:
part part uuid <interface> <dev>:<part>
to
part uuid <interface> <dev>:<part>

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Reviewed-By: Sjoerd Simons <sjoerd.simons@collabora.co.uk
2015-05-10 07:29:38 -04:00
Sjoerd Simons 0798d6fd41 part: Add support for list filtering on bootable partitions
Add an optional -bootable parameter to the part list commands to only
put the list of bootable partitions in the environment variable

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2015-03-25 12:15:15 -04:00
Sjoerd Simons e86df6ef4f part: let list put the list in an environment variable
Add an optional third argument to the "part list" command which puts a
space seperated list of valid partitions into the given environment
variable. This is useful for allowing boot scripts to iterate of all
partitions of a device.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2015-01-29 13:36:54 -05:00
Jeroen Hofstee 0e350f81e1 common: commands: make commands static
Since most commands are not public, make them static. This
prevents warnings that no common prototype is available.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Stephen Warren 8210a343cd cmd_part: fix typo in part command help text
All the sub-commands start with the main command name, but it was
missing from one of the help texts.

<panto> typos fix.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2014-05-23 12:00:18 +03:00
Wolfgang Denk 1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Stephen Warren 92668d68c1 cmd_part: don't print cmd name twice in help
The core implementation of "help" already prints the command name before
the help text of a specific command. Remove it from part's own help text
to avoid it being printed twice:

Tegra114 (Dalmore) # help part
part - disk partition related commands

Usage:
part part uuid <interface> <dev>:<part>
    - print partition UUID
...

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-03-11 17:00:28 -04:00
Stephen Warren 5cf41dccff cmd_part: add partition-related command
This implements the following:

part uuid mmc 0:1
  -> print partition UUID
part uuid mmc 0:1 uuid
  -> set environment variable to partition UUID
part list mmc 0
  -> list the partitions on the specified device

"part uuid" 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} ...

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-09-25 15:05:47 -07:00